Qoder Agent SDK lets a TypeScript or Python application run Qoder as a coding agent. Instead of returning only generated text, the agent can inspect a project, use approved tools, edit files, run commands, and report a structured result.
The SDK is suitable for adding agentic coding capabilities to a script, service, CI job, developer tool, or internal workflow without automating an interactive terminal.
The SDK is the application-facing API.
Published SDK packages include a compatible qodercli runtime for supported platforms, so normal installations do not require a separate CLI setup. Applications can also point the SDK to a specific qodercli executable when the runtime is managed separately.
For the detailed startup, communication, and agent loop, see How it works.
Use the same language as the application hosting the Agent.
See Quick Start for complete, runnable examples in both languages.
A typical integration has four parts:
The SDK References page maps common concepts to each language's API.
An agent can make real changes. Its working directory, tools, credentials, and permission policy are part of the application's security boundary.
SDK and qodercli responsibilities
The SDK is the application-facing API. qodercli is the agent runtime that plans the task, communicates with the model, and executes tools in the target environment.
Choose an SDK
Use the same language as the application hosting the Agent.
| TypeScript | Python | |
|---|---|---|
| Package | @qoder-ai/qoder-agent-sdk | qoder-agent-sdk |
| Runtime requirement | Node.js 18+ | Python 3.10+ |
| One-off tasks | query() | query() |
| Multi-turn sessions | Async message input to query() | QoderSDKClient |
| Output | Async stream of typed messages | Async stream of typed message objects |
Programming model
A typical integration has four parts:
- Describe the task. Send a prompt and set the working directory, model, system prompt, and turn limits as needed.
- Set boundaries. Select allowed tools and a permission mode, or provide a callback for decisions that need application approval.
- Consume the message stream. Handle assistant content, tool activity, progress events, and the final
resultmessage. - Control the session when needed. Long-lived integrations can send follow-up messages, interrupt work, change selected runtime settings, or query session state.
query() with a string prompt. For a conversation in which the next input depends on earlier output, use the language-specific multi-turn form shown in Input Modes.
Configurable capabilities
| Area | Application capability |
|---|---|
| Input and output | One-off or multi-turn input, structured messages, and partial streaming events |
| Tools | Built-in file and command tools, custom tools, and external or in-process MCP servers |
| Agent behavior | System prompts, models, skills, plugins, reusable agent definitions, and subagents |
| Safety and control | Tool allowlists, permission modes, approval callbacks, hooks, interruption, and turn limits |
| Session management | Working directory, persistent sessions, resume, checkpoints, usage, and context information |
Execution boundaries
An agent can make real changes. Its working directory, tools, credentials, and permission policy are part of the application's security boundary.
- The SDK-to-qodercli channel is local by default, but qodercli communicates with the Qoder model service. Prompts and the context needed for inference can be sent to that service.
- File writes and commands run in the environment where qodercli is started. Set
cwddeliberately and use Permissions to limit actions. - The model does not access files or run commands directly. It requests tool calls, and qodercli validates and executes them under the configured policy.
- Permission-bypass modes are intended only for environments with an appropriate external isolation boundary.
Next steps
- Quick Start — install, authenticate, and run the first task
- How it works — understand SDK communication and the qodercli agent loop
- Input Modes — choose one-off or multi-turn input
- Permissions — control tool access and approvals
- SDK References — find TypeScript and Python APIs