Create a reusable, versioned agent configuration.
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.
Think of an Agent as a "job description":
The Agent itself doesn't run anything — it's just configuration. The work happens inside a Session bound to that Agent.
Available
For custom client-side tools and permission policies, see Agent Tools.
For the full CRUD surface see the API Reference / Agents. Below are common workflow snippets.
A successful call returns 200 OK with
Updates must include the current
A successful call returns 200 OK with
Agents use optimistic concurrency control (OCC):
When the held version is stale:
Recovery:
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
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 |
Field reference
| Field | Type | Required | Description |
|---|---|---|---|
id | string | — | System-generated, agent_ prefix + 32 lowercase hex characters |
type | string | — | Always "agent" |
name | string | Yes | Agent name; lowercase kebab-case recommended (≤ 64 chars) |
description | string | No | Free-form description; defaults to "" |
model | string | Yes | Model identifier; see below |
system | string | No | System prompt; defaults to "" |
tools | array | No | List of tools the agent can use; see below |
skills | array | No | List of associated Skill IDs |
mcp_servers | array | No | List of MCP server configurations; defaults to [] |
multiagent | object|null | No | Multiagent orchestration configuration; returned as null when not set |
metadata | object | No | Custom key/value pairs for tagging and filtering |
version | integer | — | Version number, starting at 1 |
archived_at | string|null | — | Archive time (ISO 8601), null when not archived |
created_at | string | — | Creation timestamp (ISO 8601) |
updated_at | string | — | Last update timestamp |
model
model is a string identifying the model used by the Agent. Model IDs are lowercase:
| Value | Description |
|---|---|
auto | Automatic model selection |
qwen3.7-max | Qwen flagship |
qwen3.7-plus | Qwen multimodal |
qwen3.6-flash | Qwen lightweight |
deepseek-v4-pro | DeepSeek flagship |
deepseek-v4-flash | DeepSeek lightweight |
glm-5.1 | Zhipu flagship |
kimi-k2.6 | Moonshot AI |
minimax-m2.7 | MiniMax |
tools
tools is an array of tool objects. Built-in tools are configured through agent_toolset_20260401, which selectively enables atomic tools via the enabled_tools array:
enabled_tools values:
| Tool name | Description |
|---|---|
Bash | Run shell commands |
Read | Read file contents |
Write | Create or overwrite files |
Edit | Partially edit files |
Glob | Glob pattern file listing |
Grep | File content search |
WebFetch | HTTP GET a single page |
WebSearch | Web search |
ImageSearch | Search for images |
ImageGen | Generate images from text prompts |
DeliverArtifacts | Deliver files produced under /data/ to the user |
Managing Agents
For the full CRUD surface see the API Reference / Agents. Below are common workflow snippets.
Create
version set to 1.
Read
Update
Updates must include the current version. See "Versioning" below.
version incremented.
Versioning
Agents use optimistic concurrency control (OCC):
- On creation,
versionstarts at1. - Each successful update increments
version. - Updates must carry the current
version. Two failure cases:- Missing
versionfield — returns 400invalid_request_error("Field 'version' is required.") versionpresent but stale (does not match server) — returns 409conflict_error
- Missing
Handling 409
When the held version is stale:
GETthe Agent to fetch the latestversion.- Merge your changes.
POSTagain with the newversion.
Best practices
- Naming — use
team-purposeformat (e.g.backend-code-review,frontend-test-gen). - Tight prompts — be explicit in
systemabout 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 POST it back later (with the latest version).
Next
- Cloud Environments — set up the runtime your Agents execute in
- Sessions — create a working session with an Agent
- Agent Tools — tool types and permission policies in depth

