> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Qoder Agent SDK is officially open, letting you build production-grade agents quickly.

Qoder Agent SDK opens the Harness behind the Qoder product family in SDK form. Task planning, tool invocation, context and session management, permission control, and long- and short-term memory — this whole runtime is now embeddable directly in a TypeScript or Python application.

## What you can build

Qoder Agent SDK provides a mature agent runtime and flexible integration points. Through SDK integration you can wire your own tools, internal data, and business systems into an agent's execution path, and get a production-grade agent that completes tasks end to end inside your own product.

| Agent shape          | Typical use                                                                                                                                                                |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Coding agent         | Embedded in an IDE or an in-house dev tool: the agent reads the whole repository, then writes code, fixes bugs, and runs tests while developers review the result          |
| Terminal agent       | Diagnosing production incidents on a server, bulk-editing configuration, running ops scripts, with dangerous commands escalated for human approval                         |
| Workplace agent      | Pulling data from several internal systems to compile weekly reports, clean up spreadsheets, and produce documents from company templates, delivered as ready-to-use files |
| Pipeline integration | Fixing failing tests, completing documentation, and reviewing every commit inside CI, running read-only and exiting when done                                              |
| Vertical agent       | A domain assistant for finance, healthcare, and similar fields, connected to industry systems and proprietary data, working inside a compliance boundary                   |

<div id="sdk-and-qodercli-responsibilities" />

## Qoder Agent SDK and Qoder CLI responsibilities

Qoder Agent SDK is the application-facing API. Qoder CLI is the agent runtime that plans the task, communicates with the model, and executes tools in the target environment.

```text
TypeScript or Python application
                 |
                 |  Qoder Agent SDK
                 |  prompts, options, events, controls
                 v
              qodercli
                 |
                 +-- Qoder model service
                 +-- files, commands, MCP tools, and subagents
```

Published Qoder Agent SDK packages include a compatible Qoder CLI runtime, so a separate Qoder CLI setup is normally not required. If you manage the runtime yourself, you can point to a specific `qodercli` executable.

For the detailed startup, communication, and agent loop, see [How it works](/cli/sdk/how-it-works).

## 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 |

<CodeGroup>
  ```bash TypeScript
  npm install @qoder-ai/qoder-agent-sdk
  ```

  ```bash Python
  pip install qoder-agent-sdk
  ```
</CodeGroup>

See [Quick Start](/cli/sdk/quick-start) for complete, runnable examples in both languages.

<div id="programming-model" />

## Integration flow

A typical integration has four parts:

1. **Describe the task.** Send a prompt, and set the working directory, model, system prompt, and turn limit as needed.
2. **Set boundaries.** Pick the allowed tools and permission mode; for actions that need application-side approval, hand the decision back through a callback.
3. **Consume the message stream.** Handle model replies, tool activity, progress events, and the final `result` message.
4. **Control the session when needed.** Long-lived integrations can send follow-up messages, interrupt the run, adjust selected runtime settings, or query session state.

For a one-off task, pass a string prompt to `query()`. When the next input depends on the previous output, use the language-specific multi-turn form in [Input Modes](/cli/sdk/input-modes).

<div id="capabilities" />

## Configurable capabilities

| Capability area    | What it covers                                                                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Input and output   | One-off or multi-turn input, image 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 and output styles, models, skills, plugins, reusable agent definitions, and subagents                           |
| Safety and control | Tool allowlists, permission modes, approval callbacks, hooks, interruption, and turn limits                                    |
| Code security      | [Static checks on the agent's own edits, plus lightweight and deep repository scans](/cli/sdk/security-scan)                   |
| Memory             | [Native user and project memory, or application-owned generation and consumption](/cli/sdk/memory) **(TypeScript only)**       |
| Session management | Working directory, persistent sessions, resume and fork, checkpoints, external session storage, usage, and context information |
| Task execution     | Background tasks, task listing and cancellation, and per-task interruption                                                     |
| Configuration      | Inline settings, filesystem setting sources, and resolved-settings inspection                                                  |

The [SDK References](/cli/sdk/references) page maps concepts across languages. A few capabilities exist in only one language; they are marked inline and listed together in [Language differences](/cli/sdk/references#language-differences).

## Execution boundaries

An agent produces real changes to its environment. Its working directory, tools, credentials, and permission policy are part of the application's security boundary.

- The SDK-to-Qoder CLI channel is local by default, but Qoder CLI talks to the Qoder model service; prompts and the context needed for inference are sent there.
- File writes and commands run in the environment where Qoder CLI is running. Set `cwd` explicitly, and tighten what can execute with [Permissions](/cli/sdk/permissions).
- The model does not read or write files or run commands directly. It only requests tool calls, which Qoder CLI validates and executes under the configured policy.
- Permission-bypass modes are only appropriate in environments that already provide an external isolation boundary.

## Next steps

- [Quick Start](/cli/sdk/quick-start) — install, authenticate, and run your first task
- [How it works](/cli/sdk/how-it-works) — understand the SDK communication channel and the Qoder CLI agent loop
- [Customize the system prompt](/cli/sdk/system-prompt) — reshape the agent for a non-coding purpose
- [Permissions](/cli/sdk/permissions) — tighten tool access and approvals
- [Troubleshooting](/cli/sdk/troubleshooting) — match a symptom to its fix
- [SDK References](/cli/sdk/references) — look up TypeScript and Python APIs
