Coding agent setup
Updated
Install an SDK, then give your coding agent the skill and a server environment with your API key.
Install an SDK
Read the API key from the SYSTEM_ZERO_API_KEY environment variable. Keep these calls on your server.
Node 22 or newer, ES modules, server side only. Python 3.10 or newer, server side only.
TypeScript package README and Python package README.
SDK 0.4.7 adds typed decision provenance, webhook methods and request compression.
Tool selection: the RightNow decision model picks which of your tools to call next, or none, with a probability for each. It does not write arguments or messages, and it does not run tools.
Text, PDF and video allow 9 tools and none, or 10 when a tool is required; image or audio allows 25 tools and none, or 26 when a tool is required.
Use toolQuestions / tool_questions and selectTool / select_tool. See Tool selection.
First call
Send a state and a named question, then read the answer and list the available models.
Request bodies of 32 KB or more are sent gzip-compressed when that makes them at least 10 percent smaller; pass compressRequests: false / compress_requests=False to turn this off.
For a successful request, read answers.damaged.
SDK retries
| Rule | Behavior |
|---|---|
| Bounds | The default is 5 retries, also the maximum, with 150 seconds per attempt and a 60-second total retry budget. A single wait longer than 60 seconds raises the last error. |
| Safe requests | Only GET requests or requests carrying a non-empty idempotency key can retry. With retries enabled, decide POSTs receive a generated key when none is supplied. An explicit blank key omits the header and disables decision retries. Each retry retains the same key and serialized body. Setting the retry count or budget to zero disables retries. |
| Retry flags | Marked means error.retryable is true or the x-should-retry header is true. An explicit false in either marker vetoes retry. |
| 429 | capacity_exhausted, rate_limit_exceeded, concurrency_limit_exceeded or workspace_limit_exceeded. |
| 5xx | except 504 and maintenance, including service_unavailable and system_zero_unavailable. |
| 409 | idempotency_conflict. |
| Transport | A qualifying connection failure or timeout before any response byte can also retry, even if the request was sent. Failures after a response byte never retry. Errors of authentication and permission types never retry. |
| Wait | Use Retry-After-Ms, or Retry-After when milliseconds are absent. The wait is never shorter than a random backoff floor: a random fraction of 0.5 seconds doubled for each attempt, capped at 8 seconds. |
| Cold start | A cold pool returns marked 503 system_zero_unavailable with a wait in Retry-After. The SDK retries the same request body with the same idempotency key. An explicit false retry marker stops retries. |
Give the agent the docs and task. Keep your key on your server.
The prompt
Paste this instruction into your coding agent.
The skill
Read SKILL.md or download it before adding the integration.
The key
Set SYSTEM_ZERO_API_KEY where the app runs. Never paste a key into a prompt, a file, a commit or a log.
Next: Check the generated integration against the Quickstart.