Agent API
Pick any agent stack. One simple API.
Claude Code, Codex, Hermes, and every other supported harness behind a single stateful API. Choose the harness when you create a spec; keep the same session, message, and event interfaces in your integration.
Agent API — https://api.agentsky.dev/v1
# 1 — Create a reusable agent spec
POST /v1/agents
{ "name": "pr-reviewer",
"agentType": "codex",
"llm": "gpt-5.6-sol" }
# Save response.agent.id (name is only a label).
# 2 — Start its cloud computer
POST /v1/sessions
{ "agent": "<response.agent.id>",
"initial_events": [{
"type": "user.message",
"content": [{ "type": "text",
"text": "Review PR #482" }]
}] }
# Save response.session.id for the endpoints below.
# 3 — Continue: POST /v1/sessions/{id}/events
# 4 — Stream: GET /v1/sessions/{id}/streamAgent sessions
Every session is a persistent cloud computer. State, workspace, and recovery are included on the same API call.
POST /v1/sessionsModels
Claude, GPT, DeepSeek, Kimi, GLM — choose the model that fits the job. Choose a compatible model when creating your agent spec.
POST /v1/agents · llmChannels
Slack, Telegram, Discord, the web, and a direct API. Every session is addressable from the channel your users prefer.
POST /v1/channels/bindingsConnectors
Attach skills and tool APIs, then authorize the connected apps your agent needs.
POST /v1/agents · capabilitiesSend a message
Send a message. Stream the reply.
Replace the example session ID with the ID returned at creation. Open the SSE stream, POST the message, then read events. These steps work for every supported harness.
POST /v1/sessions/{id}/events — send a turn: text, images and files
GET /v1/sessions/{id}/stream — SSE stream of events
GET /v1/sessions/{id}/events — paginated catch-up
# Requires curl 7.76+
set -euo pipefail
: "${SKY_API_TOKEN:?Set SKY_API_TOKEN first}"
BASE_URL='https://api.agentsky.dev/v1'
SESSION_ID='sess_example123'
PAYLOAD='{"events":[{"type":"user.message","content":[{"type":"text","text":"Review the diff in the current workspace."}]}]}'
# Open the SSE stream first so no reply event is missed.
(
sleep 0.5
curl --fail-with-body --silent --show-error \
--request POST "$BASE_URL/sessions/$SESSION_ID/events" \
--header "Authorization: Bearer $SKY_API_TOKEN" \
--header "Content-Type: application/json" \
--data "$PAYLOAD" >&2
) &
curl --fail-with-body --silent --show-error --no-buffer \
"$BASE_URL/sessions/$SESSION_ID/stream" \
--header "Authorization: Bearer $SKY_API_TOKEN"Supported agents
Every harness. One contract.
Choose a harness and compatible model when creating an agent spec. To try another harness, create a different spec and start a session from its returned ID.
| Agent / Harness | Compatible models | Context | Model billing |
|---|---|---|---|
| Claude Code | Claude Opus 5 · Claude Fable 5.1 · Claude Sonnet 5 · Claude Haiku 4.5 | Varies by model | per token or eligible BYO subscription |
| Codex | GPT-5.6 Sol · GPT-5.6 Terra · GPT-5.6 Luna · GPT-6 Astra · DeepSeek V4 Pro · DeepSeek V4.1 Flash | Varies by model | per token or eligible BYO subscription |
| Hermes | DeepSeek V4 Pro · DeepSeek V4.1 Flash · GPT-5.6 Sol · GPT-5.6 Terra · GPT-5.6 Luna · GPT-6 Astra · Gemini 3.8 Flash · GLM-5.3 · GLM-5.3-Flash · Kimi K3 · Kimi K2.7 Code · Grok 4.6 · Claude Opus 5 · Claude Fable 5.1 · Claude Sonnet 5 · Claude Haiku 4.5 | Varies by model | per token |
| OpenClaw | GPT-5.6 Sol · GPT-5.6 Terra · GPT-5.6 Luna · GPT-6 Astra · DeepSeek V4 Pro · DeepSeek V4.1 Flash · Gemini 3.8 Flash · GLM-5.3 · GLM-5.3-Flash · Kimi K3 · Kimi K2.7 Code · Grok 4.6 · Claude Opus 5 · Claude Fable 5.1 · Claude Sonnet 5 · Claude Haiku 4.5 | Varies by model | per token |
| pi | GPT-5.6 Sol · GPT-5.6 Terra · GPT-5.6 Luna · GPT-6 Astra · DeepSeek V4 Pro · DeepSeek V4.1 Flash · GLM-5.3 · GLM-5.3-Flash · Kimi K3 · Kimi K2.7 Code · Grok 4.6 · Claude Opus 5 · Claude Fable 5.1 · Claude Sonnet 5 · Claude Haiku 4.5 | Varies by model | per token |
| DeepSeek Harness | DeepSeek V4 Pro · DeepSeek V4.1 Flash · Kimi K3 · Kimi K2.7 Code · GLM-5.3 · GLM-5.3-Flash · Grok 4.6 | Varies by model | per token |
| Kimi Code | Kimi K3 · Kimi K2.7 Code · DeepSeek V4 Pro · DeepSeek V4.1 Flash · GPT-5.6 Sol · GPT-5.6 Terra · GPT-5.6 Luna · GPT-6 Astra · GLM-5.3 · GLM-5.3-Flash · Grok 4.6 · Claude Opus 5 · Claude Fable 5.1 · Claude Sonnet 5 · Claude Haiku 4.5 | Varies by model | per token |
| OpenCode | GPT-5.6 Sol · GPT-5.6 Terra · GPT-5.6 Luna · GPT-6 Astra · DeepSeek V4 Pro · DeepSeek V4.1 Flash · GLM-5.3 · GLM-5.3-Flash · Kimi K3 · Kimi K2.7 Code · Grok 4.6 · Claude Opus 5 · Claude Fable 5.1 · Claude Sonnet 5 · Claude Haiku 4.5 | Varies by model | per token |
Multi-agent flows
One task, many agents working in sequence.
Create a spec for each role, then start its session. Your orchestrator reads the planning session's events and sends the selected plan to the coding session; it passes the resulting code or repository reference to the testing session. The same message and event contract connects every step.
Try it now →# Create each role with POST /v1/agents
# Save each response's agent.id (names are labels).
{"name":"planner","agentType":"claude_code"}
{"name":"coder","agentType":"codex"}
{"name":"tester","agentType":"hermes"}
# After reading the planner's /events, send its
# output to the coder. Replace both placeholders.
POST https://api.agentsky.dev/v1/sessions
{
"agent": "<coder agent.id>",
"initial_events": [{
"type": "user.message",
"parts": [{"type":"text","index":0,
"text":"<plan read from the planner session>"}]
}]
}
# Read coder events; pass its result to the tester.Your own product
Give your users an agent, not a chat window.
Create a reusable spec with your product's instructions and tools. Save the returned agent ID, then create a separate session for each user. Your backend keeps each session ID and sends subsequent messages to that same session.
Try it now →# Create your product's agent spec
POST https://api.agentsky.dev/v1/agents
{
"name": "support-agent",
"agentType": "claude_code",
"prompt": "You are the support agent for Acme..."
}
# Save response.agent.id; name is not an ID.
# Each user gets their own session
POST https://api.agentsky.dev/v1/sessions
{
"agent": "<response.agent.id>",
"metadata": {"userId":"<your user ID>"}
}
# Save response.session.id for messages and events.Built with the API
Real software factories running in production.
Pricing
List price, per token. $0 while parked.
Compute is metered by the second — only while a session is active. Model tokens are billed at list price. Connect your own Claude or OpenAI subscription to pay $0 for eligible model usage.
Get your API key. Build today.
One key for the supported harnesses. Create a spec, start a session, and send your first task.
