Agents
The agents endpoint connects you to Coda’s unified AI agent, which writes quantum circuits in the framework you request (defaulting to Qiskit), simulates and formally verifies them when useful, explains quantum computing concepts, and assists with quantum computing workflows. Responses are streamed back as server-sent events (SSE).
Example
The response is streamed. Each event contains a type field (for example token, thinking_token, tool_call, tool_result, files, completed, or error) and associated data. The stream always ends with a terminal completed, error, or cancelled event.
Effort budget
The budget field controls how much effort the agent spends on a request: low, medium, or high (default). Lower budgets scale down the model’s thinking effort, max output tokens, step limit, and parallel research-subagent pool, trading some response quality for speed and cost.
Code delivery
The code_mode field controls how the agent delivers final code:
Conversation threads
Pass a thread_id to continue a previous conversation:
The X-Thread-Id response header contains the thread ID for new conversations.
Deprecated fields
The mode and fast request fields are deprecated. They are still accepted for now, but new integrations should omit them.
mode: previously selected between separatebuildandlearnagents. These have been replaced by the unified agent, and all values (agent,build,learn) now route to the same agent. Omit the field.fast: previously requested a faster model for lower latency. The unified agent ignores this flag; usebudgetto trade quality for speed instead.
Related endpoints
POST /agents: chat with the Coda AI agentGET /agents: list available agents
See the Coda API Reference for full request and response schemas.