Key concepts
You can think of an Agent as a "job description":
| Element | Description |
|---|---|
| model | The Agent's intelligence level |
| system prompt | The Agent's behavioral guidelines |
| tools | The actions the Agent performs |
| Skills | The high-level skills the Agent invokes |
Parameter reference
Parameter | Type | Required | Description |
| string | — | System-generated ID, with an |
| string | — | Always |
| string | Yes | The Agent name. The recommended format is kebab-case (≤ 64 characters). |
| string | No | A description for the Agent. Defaults to |
| string | Yes | The model identifier. See details below. |
| string | No | The system prompt. Defaults to |
| string | No | Behavioral instructions appended to the system prompt. |
| array | No | A list of available tools. See details below. |
| array | No | A list of associated Skill IDs. |
| array | No | A list of MCP server configurations. Defaults to |
| string | No | The default Environment ID for this Agent. Defaults to |
| object | No | Custom key-value pairs for tagging and filtering. |
| integer | — | The version number, which starts at 1 and increments with each update. |
| boolean | — | Whether the Agent has been archived. Defaults to |
| string|null | — | The archival timestamp in ISO 8601 format. |
| string | — | The creation timestamp in ISO 8601 format. |
| string | — | The timestamp of the last update. |
Model
The model field specifies the model that the Agent uses.
| 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
The tools field is an array of tool objects. Currently, only the agent_toolset_20260401 toolset is supported. You enable atomic tools within this toolset by listing them in the enabled_tools array:
enabled_tools (values are case-sensitive and must be in PascalCase):
| Tool name | Description |
|---|---|
Bash | Execute shell commands. |
Read | Read file content. |
Write | Create or overwrite a file. |
Edit | Edit part of a file. |
Glob | List files using wildcards. |
Grep | Search for content within files. |
WebFetch | Perform an HTTP GET request for a single webpage. |
WebSearch | Search the web. |
Manage agents
For all CRUD operations, see API Reference / Agents. The following examples cover common workflows.
Create
version starts at 1.
Query
Update
When you update an Agent, you must provide the current version. For more information, see Version management below.
version increments by 1.
Delete
Version management
The Agent API uses optimistic concurrency control (OCC):
- The
versionstarts from1upon creation. - After each successful update, the
versionis automatically incremented by 1. - Update requests must include the current
version. Two failure scenarios:- Missing
versionfield — returns 400invalid_request_error("Field 'version' is required.") - The
versionis provided but does not match the server-side version — returns 409conflict_error
- Missing
Handling 409 conflicts
If your request fails because the version is outdated, you receive this error:
GETthe latest Agent to retrieve the currentversion- Re-apply your desired changes to the latest object data.
- Use the new
versionto perform anotherPUT.
Best practices
- Naming conventions — Use the
team-purposeformat, such asbackend-code-review,frontend-test-gen. - Prompt refinement — Specify the role, output format, and constraints in the
systemfield. - Apply the principle of least privilege: Grant only the tools essential for the task to minimize risk.
- Use metadata effectively: Add key-value pairs to categorize Agents for easier filtering and auditing.
- Version locking in production — When creating a Session, use the
{"id": ..., "version": ...}format to lock the Agent version. This prevents new versions from affecting your online services.
FAQ
Q: Does updating an Agent affect currently running Sessions?No. A Session is bound to a specific Agent version upon creation.Q:Can the toolsarray be empty?Yes. An Agent without tools can only engage in text-based conversation and cannot perform actions.Q:Is there a length limit for the namefield?Keep it under 64 characters and use lowercase letters, numbers, and hyphens.Q: How do I roll back to an older version of an Agent?Automatic rollback is not supported. Save the Agent configuration before updating it. To revert, PUT the old configuration with the latest version number.
Next steps
- Cloud Environment — Configure the infrastructure where the Agent runs.
- Start a Session — Create a Session with an Agent.
- Agent Tool Configuration — Learn more about tool types and permission policies.