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.
An Agent is the core configuration template in Qoder Cloud Agents — it defines what the AI agent can do: which model, what behavior, and which tools. One Agent can be reused across many Sessions, and updates to an Agent don’t affect Sessions already running.
Core elements
Think of an Agent as a “job description”:
| Element | What it controls |
|---|
| Model | The agent’s reasoning capability |
| System prompt | The agent’s behavior and rules |
| Tools | What actions the agent can perform |
| Skills | Higher-level skills the agent can invoke |
The Agent itself doesn’t run anything — it’s just configuration. The work happens inside a Session bound to that Agent.
Field reference
| Field | Type | Required | Description |
|---|
id | string | — | System-generated, prefixed with ag_ |
name | string | Yes | Agent name; lowercase kebab-case recommended (≤ 64 chars) |
model | string | Yes | Model identifier; see below |
system | string | No | System prompt that defines agent behavior |
tools | array | No | List of tools the agent can use; see below |
skills | array | No | List of associated Skill IDs |
metadata | object | No | Custom key/value pairs for tagging and filtering |
version | integer | — | Version number, starting at 1 |
created_at | string | — | Creation timestamp (ISO 8601) |
updated_at | string | — | Last update timestamp |
model
A string identifier for the model the Agent uses:
| Value | Description |
|---|
"ultimate" | The strongest model — best for complex reasoning and long tasks |
"auto" | Automatically picks the best price-performance model |
tools is an array of tool objects. Each entry declares one capability the Agent can perform:
{
"tools": [
{"type": "bash_20250124"},
{"type": "file_read"},
{"type": "file_write"},
{"type": "web_search"}
]
}
Common tool types:
| Type | Description |
|---|
bash | Run shell commands |
file_read | Read file contents |
file_write | Create or modify files |
web_search | Search the web |
For more (including permission policies), see Agent Tools.
Managing Agents
For the full CRUD surface see the API Reference / Agents. Below are common workflow snippets.
Create
curl -s -X POST https://openapi.qoder.sh/api/v1/cloud/agents \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "code-reviewer",
"model": "ultimate",
"system": "You are a code review expert. Review code line by line and emit issues and improvements as Markdown.",
"tools": [
{"type": "bash_20250124"},
{"type": "file_read"},
{"type": "file_write"}
],
"metadata": {
"team": "backend",
"purpose": "code-review"
}
}' | jq .
A successful call returns 201 Created with version set to 1.
Read
# Get a single Agent
curl -s https://openapi.qoder.sh/api/v1/cloud/agents/ag_xxx \
-H "Authorization: Bearer $QODER_PAT"
# Paginated list
curl -s "https://openapi.qoder.sh/api/v1/cloud/agents?limit=20" \
-H "Authorization: Bearer $QODER_PAT"
Update
Updates must include the current version. See “Versioning” below.
curl -s -X PUT https://openapi.qoder.sh/api/v1/cloud/agents/ag_xxx \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "code-reviewer",
"model": "ultimate",
"system": "You are a senior code reviewer focused on security and performance.",
"version": 1
}' | jq .
A successful call returns 200 OK with version incremented.
Delete
curl -s -X DELETE https://openapi.qoder.sh/api/v1/cloud/agents/ag_xxx \
-H "Authorization: Bearer $QODER_PAT"
Deleting an Agent does not terminate Sessions bound to it. Each Session snapshots the Agent’s configuration at creation time.
Versioning
Agents use optimistic concurrency control (OCC):
- On creation,
version starts at 1.
- Each successful update increments
version.
- Updates must carry the current
version, otherwise the API returns 409 Conflict.
This prevents concurrent updates from silently overwriting each other.
Handling 409
When the held version is stale:
{
"error": {
"type": "conflict",
"message": "Version mismatch: expected 2, got 1"
}
}
Recovery:
GET the Agent to fetch the latest version.
- Merge your changes.
PUT again with the new version.
Best practices
- Naming — use
team-purpose format (e.g. backend-code-review, frontend-test-gen).
- Tight prompts — be explicit in
system about role, output format, and constraints.
- Minimal tools — grant only what the task needs to reduce blast radius.
- Use metadata — tag Agents for later filtering and audit.
- Pin versions in production — when creating a Session, pass
{"id": ..., "version": ...} so production behavior doesn’t shift when the Agent is updated.
FAQ
Q: Will updating an Agent affect Sessions that are already running?
No. Each Session is bound to the Agent’s specific version at creation time; later updates don’t propagate.
Q: Is an empty tools array allowed?
Yes. An Agent without tools can only handle plain-text conversation — it can’t perform any actions.
Q: Are there limits on the name field?
Keep it under 64 characters and use lowercase letters, digits, and hyphens.
Q: How do I roll back to an older version of an Agent?
Automatic rollback isn’t supported yet. Snapshot the configuration before updating, then PUT it back later (with the latest version).
Next