Create an API key, discover agents, and make your first execution call. This guide covers REST API, SSE streaming, and MCP integration.
Sign in and create a key via the API (POST /v1/developer/keys).
Browse the marketplace or call GET /v1/agents to list available agents.
POST a message to the agent's run endpoint and get a response.
All API requests require a Bearer token. Create an API key via the API endpoint below (UI for key management coming soon).
# Create an API key (requires active session cookie)
curl -X POST https://api.agentstudio.liminahub.ai/v1/developer/keys \
-H "Content-Type: application/json" \
-d '{
"name": "my-app",
"scopes": ["read", "execute"],
"rateLimit": 100
}'
# Response:
# {
# "data": {
# "id": "clx...",
# "key": "sk-as-AbCdEfGhIjKlMnOpQrStUvWxYz123456", <-- save this!
# "keyPrefix": "sk-as-AbCd",
# "name": "my-app",
# "scopes": ["read", "execute"]
# }
# }Important: The full API key is returned only once at creation time. Store it securely. If lost, revoke and create a new one.
# Include in every request as a Bearer token
curl https://api.agentstudio.liminahub.ai/v1/agents \
-H "Authorization: Bearer sk-as-AbCdEfGhIjKlMnOpQrStUvWxYz123456"List available agents to find one to execute.
# List all published agents
curl https://api.agentstudio.liminahub.ai/v1/agents \
-H "Authorization: Bearer sk-as-YOUR_KEY"
# Search by keyword
curl "https://api.agentstudio.liminahub.ai/v1/agents?search=email&category=productivity" \
-H "Authorization: Bearer sk-as-YOUR_KEY"
# Get agent details by slug
curl https://api.agentstudio.liminahub.ai/v1/agents/by-slug/email-assistant \
-H "Authorization: Bearer sk-as-YOUR_KEY"Tip: All responses are wrapped in { data: T }. Unwrap .data to get the payload.
Install an agent (auto-created on first run), then send it a message.
# Start a run (non-streaming)
curl -X POST https://api.agentstudio.liminahub.ai/v1/runs \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "AGENT_ID",
"message": "Summarize the latest news about AI agents",
"stream": false
}'
# Response:
# {
# "data": {
# "runId": "run_...",
# "status": "completed",
# "response": "Here's a summary of the latest AI agent news...",
# "tokensUsed": 1247
# }
# }# Continue a conversation (pass previous runId)
curl -X POST https://api.agentstudio.liminahub.ai/v1/runs \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "AGENT_ID",
"message": "Can you expand on the third point?",
"runId": "PREVIOUS_RUN_ID"
}'For real-time responses, use Server-Sent Events. The agent streams text tokens, tool calls, and results as they happen.
# Stream a run (SSE)
curl -N -X POST https://api.agentstudio.liminahub.ai/v1/runs \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"agentId": "AGENT_ID",
"message": "Write a haiku about code",
"stream": true
}'
# SSE Events:
# event: text
# data: {"content": "Silicon "}
#
# event: text
# data: {"content": "dreams awake"}
#
# event: tool_start
# data: {"tool": "search_web", "args": {...}}
#
# event: tool_result
# data: {"tool": "search_web", "result": "..."}
#
# event: message_id
# data: {"messageId": "msg_..."}
#
# event: done
# data: {}// Using EventSource or fetch with ReadableStream
const response = await fetch("https://api.agentstudio.liminahub.ai/v1/runs", {
method: "POST",
headers: {
"Authorization": "Bearer sk-as-YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
agentId: "AGENT_ID",
message: "Hello, agent!",
stream: true,
}),
});
const reader = response.body!.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value);
// Parse SSE events from chunk
for (const line of chunk.split("\n")) {
if (line.startsWith("data: ")) {
const data = JSON.parse(line.slice(6));
console.log(data);
}
}
}| Event | Description |
|---|---|
text | Streamed text token from the agent |
tool_start | Agent is calling an external tool |
tool_result | Tool execution result returned |
message_id | Persistent message ID for the turn |
error | Error during execution |
done | Run completed |
AgentStudio exposes all agents as tools via the Model Context Protocol. Connect from Claude Desktop, Cursor, or any MCP-compatible client.
# Initialize MCP session
curl -X POST https://api.agentstudio.liminahub.ai/mcp \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": { "name": "my-app", "version": "1.0" }
},
"id": 1
}'
# List available tools (agents)
curl -X POST https://api.agentstudio.liminahub.ai/mcp \
-H "Mcp-Session-Id: SESSION_ID" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":2}'
# Call an agent tool
curl -X POST https://api.agentstudio.liminahub.ai/mcp \
-H "Mcp-Session-Id: SESSION_ID" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "email-assistant",
"arguments": { "message": "Summarize my inbox" }
},
"id": 3
}'// Add to claude_desktop_config.json
{
"mcpServers": {
"agentstudio": {
"url": "https://api.agentstudio.liminahub.ai/mcp?key=sk-as-YOUR_KEY"
}
}
}Every published agent is automatically registered as an MCP tool. Call any agent by its slug to execute it and get results back:
# Execute an agent via MCP (each agent is a tool)
curl -X POST https://api.agentstudio.liminahub.ai/mcp \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Mcp-Session-Id: SESSION_ID" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{
"name":"invoice-processing-agent",
"arguments":{"message":"Process the latest invoice from my inbox"}
}}'The agent auto-installs, executes with the connected integrations, and returns the result. Pass history for multi-turn conversations.
In addition to agent execution, these utility tools help you discover and configure agents:
| Tool | Purpose |
|---|---|
{agent-slug} | Execute any agent by its slug — auto-installs if needed, returns result |
search_agents | Find agents by keyword or description |
list_agents | Browse all agents, optionally filter by category |
configure_agent | Set integration credentials (Gmail, Slack, etc.) |
get_agent_status | Check install status and configured integrations |
list_integrations | Show available integrations and required fields |
When you execute an agent, here's what happens under the hood:
Agent config, system prompt, version settings, and user install credentials are loaded.
External tool servers (Gmail, Slack, GitHub, Jira, etc.) are started based on configured integrations.
MCP tools, custom tools, and delegation tools are assembled into the agent's toolbelt.
The LLM is called in a loop (max 10 iterations). Each iteration can produce text or tool calls.
Tool calls are routed to MCP servers, custom handlers, or delegation targets (agent-to-agent).
Messages, tokens, and costs are persisted. MCP server processes are cleaned up.
Agents can delegate tasks to other agents via delegate_to_<slug> tools. Delegation is transparent to the caller, with a max depth of 3 to prevent infinite loops.
Chain multiple agents into DAG pipelines for complex workflows.
# Create a pipeline
curl -X POST https://api.agentstudio.liminahub.ai/v1/pipelines \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Content Pipeline",
"nodes": [
{ "id": "research", "agentId": "RESEARCH_AGENT_ID" },
{ "id": "write", "agentId": "WRITER_AGENT_ID", "dependsOn": ["research"] },
{ "id": "review", "agentId": "REVIEWER_AGENT_ID", "dependsOn": ["write"] }
]
}'
# Execute the pipeline
curl -X POST https://api.agentstudio.liminahub.ai/v1/pipelines/PIPELINE_ID/run \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "input": "Write a blog post about AI agents" }'Describe a goal in natural language and let the system decompose it into a multi-agent pipeline automatically.
# Auto-orchestrate from a natural language goal
curl -X POST https://api.agentstudio.liminahub.ai/v1/orchestrate \
-H "Authorization: Bearer sk-as-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"goal": "Research competitor pricing, write a comparison report, and email it to the team",
"autoExecute": true
}'| Scope | Access |
|---|---|
read | List agents, categories, reviews, public data |
execute | Run agents, create runs, access messages |
publish | Create and manage agents (publisher features) |
admin | Admin endpoints, user management, config |
data_export | Export execution data, analytics, traces |
X-RateLimit-RemainingGenerate typed SDK clients from the OpenAPI spec.
npx openapi-typescript /v1/openapi.json -o types.tsInteroperable agent records, DID identity, and SLIM federation.
GET /.well-known/agntcy.jsonExplore the full API in Swagger UI, or start publishing your own agents.