SDKs
Official Node and Python SDKs for Jettson. Start an agent in 3 lines of code.
Two official SDKs, both MIT-licensed, both with zero or one runtime dependencies. The HTTP surface is the same — your code is faster to write.
Node.js
npm install @jettson/sdkimport { Jettson } from "@jettson/sdk";
const jettson = new Jettson({ apiKey: process.env.JETTSON_API_KEY! });
const agent = await jettson.agents.spawn({ task: "Research linear.app" });
const result = await jettson.agents.wait(agent.agent_id);
console.log(result.final_result);Requires Node 18+. Native fetch, zero runtime dependencies. Full reference: Node SDK docs.
Python
pip install jettsonfrom jettson import Jettson
client = Jettson(api_key=os.environ["JETTSON_API_KEY"])
agent = client.agents.spawn(task="Research linear.app")
result = client.agents.wait(agent.agent_id)
print(result.final_result)Requires Python 3.9+. One runtime dep (httpx). Sync today, async in the next release. Full reference: Python SDK docs.
Feature parity
Both SDKs cover the full v1 API surface as of today.
| Capability | Node | Python |
| --- | --- | --- |
| agents.spawn / get / list / cancel | ✓ | ✓ |
| agents.wait with exponential backoff | ✓ | ✓ |
| Full memory.* surface (10 methods) | ✓ | ✓ |
| Region selection (iad / lhr / syd) | ✓ | ✓ |
| Idempotency-key support | ✓ | ✓ |
| Auto-retry on 429 (honors Retry-After) | ✓ | ✓ |
| Auto-retry on 5xx (exp backoff) | ✓ | ✓ |
| Typed error hierarchy | ✓ | ✓ |
| Async API | — (next release) | — (next release) |
| Streaming progress events | — (next release) | — (next release) |
Which one to use
- Node.js if your stack is TypeScript / JavaScript or you're building a Next.js / Express / Fastify backend. Native fetch means no install warnings and no SSL config to worry about.
- Python if your stack is FastAPI / Django / Flask / a Jupyter notebook.
httpx.Clientintegrates cleanly with sync codebases; async support arrives in the next release.
The HTTP API works just as well — both SDKs are open source if you'd rather read the source than the docs.
Authentication
Both SDKs read your API key as a constructor argument. Get one at /console/api-keys, then:
new Jettson({ apiKey: process.env.JETTSON_API_KEY! })Jettson(api_key=os.environ["JETTSON_API_KEY"])See Authentication for hygiene practices.
Error handling
Every HTTP failure surfaces as a typed exception. Both SDKs ship the same hierarchy:
JettsonAuthError— bad API key (401)JettsonRateLimitError— per-key rate cap hit (429) — carriesretryAfterSecondsJettsonQuotaExceededError— plan quota hit (402) — carriesused,limit,planJettsonValidationError— bad request (400)JettsonNotFoundError— wrong / unowned ID (404)JettsonServerError— transient 5xx (auto-retried first)JettsonNetworkError— couldn't reach the APIAgentTimeoutError—wait()timeout
memory.get() is the one exception across both SDKs: instead of throwing on 404, it returns null/None so the "lookup or fallback" pattern stays clean.
Retries
The HTTP client retries automatically:
- 429 — waits the duration in
Retry-After, then retries (up tomaxRetries, default 3) - 5xx — exponential backoff (1s → 2s → 4s), up to
maxRetries - Network failure — one retry after the initial backoff window
Disable retries by passing maxRetries: 0 / max_retries=0 if you need first-failure semantics.
What's next
- Async —
AsyncJettsonin both SDKs lands in the next release. - Streaming progress —
agent.on("progress", …)for Node, async-iterator for Python. - Custom tools — register your own tool, invoked from inside the agent loop.
- Webhooks — agent lifecycle events delivered to your endpoint.
Other languages
The API works from any language. We'll ship official wrappers based on demand — until then, the API reference has cURL for every endpoint and writing a thin wrapper takes an afternoon.