Skip to content
中文

Create Agent

POST/anthropic/v1/agents◐ Partial

Official Claude documentation ↗

Request body

  • namestringrequired

    Display name of the agent, 1 to 256 characters after trimming, with no NUL or line breaks. A label, not a unique key: two agents may share a name.

  • modelstring | objectrequired

    A model ID from the Praxis model catalog (praxis.model.models.list), or a model_config object. Unlike Anthropic, Claude model IDs absent from the catalog are rejected.

    Expand sub-fields (4)
    • idstringrequired

      Model ID from the Praxis model catalog (praxis.model.models.list).

    • effortstring | objectoptional

      How hard the model works per inference: a bare level string (e.g. high) or a {type: high} object. On create, omitted resolves the per-model default; on update, omitting preserves it.

    • inference_geostringoptional

      Geographic region for inference; unset falls through to the workspace default. model is replaced wholesale — omitting the subfield on update clears it.

    • speedstringoptional

      Inference speed mode: fast generates output notably quicker at premium pricing. Not all models support it; invalid combinations are rejected at create time.

  • systemstringoptional

    The agent's system prompt.

  • descriptionstringoptional

    What the agent does.

  • mcp_serversarrayoptional

    MCP servers the agent connects to; up to 20 with unique names. Every server must be referenced by an mcp_toolset in tools, or the request is rejected.

    Expand sub-fields (3)
    • typestringrequired

      Server type: url for an HTTP or SSE endpoint, or stdio for a trusted local command.

      values url
    • namestringrequired

      Name unique within this list, 1-255 characters, referenced by mcp_toolset configurations.

    • urlstringrequired

      The MCP server's endpoint URL.

  • metadataobjectoptional

    Custom metadata key-value pairs; up to 16 keys of at most 512 characters each.

  • multiagentobjectoptional

    Multiagent topology: the session's primary thread orchestrates work by spawning session threads drawn from the agents roster.

    Expand sub-fields (2)
    • agentsarrayrequired

      A roster of 1-20 agent IDs, {type: agent, id, version?} references or at most one {type: self}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.

    • typestringrequired

      Topology type; only coordinator today.

      values coordinator
  • skillsarrayoptional◐ Partially supported

    Custom skills attached to the agent, [{type: "custom", skill_id, version?}]: skill_id comes from skills.create or skills.list, at most 20, no repeats. Omit version or send "latest" for the skill's newest version when a session starts; type anthropic returns 400.

  • toolsarrayoptional

    Tool configurations for the agent; up to 128 tools across all toolsets.

Returns

200

Supports text prompts, models, metadata, built-in tools and custom tool definitions. Custom definitions are stored and returned unchanged on both APIs: up to 32 tools, unique case-sensitive names matching [a-zA-Z0-9_-]{1,64} without built-in name collisions, descriptions of 1–1024 characters, and object input_schema with type=object and at most 16 KB of serialized UTF-8 JSON. Custom tool calls emit agent.custom_tool_use and wait for the client to send user.custom_tool_result. MCP and additional model controls are not supported and return 400. skills attaches uploaded skills as [{type:"custom",skill_id,version?}] and accepts only custom (type anthropic returns 400); at most 20, no repeated skill_id, and each skill and pinned version must exist in the organization and not be deleted. Omit version or send "latest" to use the skill's newest version at the moment a session is created; versions uploaded later do not change a running session. On update, omit skills to keep them, send an array to replace them or null to clear them. When the session has a machine, each skill is installed at /home/user/.praxis/skills/<name>/ when the session starts, and a skill with the same name already on the machine is not overwritten (the session receives a notice instead). A session without a machine installs nothing. The compatibility response always fills version: the pinned version or "latest". multiagent accepts null or a coordinator roster of 1–20 agent IDs, {type:"agent",id,version?} references or at most one {type:"self"}. Versions are pinned on create/update: an omitted version is pinned to the roster agent's current active version at save, and a bare string id is accepted and rewritten to the {type:"agent",id,version} object form. Members must be distinct, exist, be unarchived and have no multiagent topology. The compatibility API provides eight official built-in tools: bash, edit, glob, grep, read, write, web_search and web_fetch. configs rejects other tool names. Sessions created here do not provide background tasks, Monitor or subagents. Use /agent/v1 for all native tools. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.

Errors follow the Claude Managed Agents format — see error codes

Request

curl
curl https://api.deepraxis.com/anthropic/v1/agents \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: managed-agents-2026-04-01" \
  -H "Content-Type: application/json" \
  -d '{"name":"文档助手","model":"deepseek-flash","system":"用一句话简短回答。"}'
Python
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.deepraxis.com/anthropic",
    api_key="$PRAXIS_API_KEY",
)

result = client.beta.agents.create(name="文档助手", model="deepseek-flash", system="用一句话简短回答。")
print(result)
TypeScript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.deepraxis.com/anthropic",
  apiKey: "$PRAXIS_API_KEY",
});

const result = await client.beta.agents.create({
  "name": "文档助手",
  "model": "deepseek-flash",
  "system": "用一句话简短回答。"
});
console.log(result);

Response 200

{
  "id": "agent_d491cb4e-690a-4f8e-8977-d8186eee6919",
  "type": "agent",
  "name": "文档助手",
  "description": null,
  "system": "用一句话简短回答。",
  "model": {
    "id": "deepseek-flash"
  },
  "metadata": {},
  "tools": [
    {
      "type": "agent_toolset_20260401",
      "default_config": {
        "enabled": true,
        "permission_policy": {
          "type": "always_allow"
        }
      },
      "configs": [
        {
          "name": "bash",
          "enabled": true,
          "permission_policy": null
        },
        {
          "name": "edit",
          "enabled": true,
          "permission_policy": null
        },
        {
          "name": "glob",
          "enabled": true,
          "permission_policy": null
        },
        {
          "name": "grep",
          "enabled": true,
          "permission_policy": null
        },
        {
          "name": "read",
          "enabled": true,
          "permission_policy": null
        },
        {
          "name": "write",
          "enabled": true,
          "permission_policy": null
        },
        {
          "name": "web_search",
          "type": "web_search",
          "enabled": true,
          "permission_policy": null
        },
        {
          "name": "web_fetch",
          "type": "web_fetch",
          "enabled": true,
          "permission_policy": null
        }
      ]
    }
  ],
  "mcp_servers": [],
  "skills": [],
  "multiagent": null,
  "version": 1,
  "created_at": "2026-10-23T01:35:25.425Z",
  "updated_at": "2026-10-23T01:35:25.425Z",
  "archived_at": null
}

Response

HTTP 200

Successful response

application/json

Name Type Description
id string
archived_at null | string A timestamp in RFC 3339 format
created_at string A timestamp in RFC 3339 format
description null | string
mcp_servers array<object>
mcp_servers[].type string
mcp_servers[].name string
mcp_servers[].url string
metadata object
model object Model identifier and configuration.
model.id string A model id from the Praxis model catalog (praxis.model.models.list). Unlike Anthropic, Claude model ids other than those in the catalog are rejected.
model.effort object How hard Claude works on each turn. Sets output_config.effort on every Messages call the session makes.
model.inference_geo string Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
model.speed string Inference speed mode. fast provides significantly faster output token generation at premium pricing. Not all models support fast; invalid combinations are rejected at create time.
multiagent null | object Resolved coordinator topology with a concrete agent roster.
multiagent.agents array<object> Agents the coordinator may spawn as session threads, each resolved to a specific version.
multiagent.type string
name string
skills array<object>
skills[].skill_id string
skills[].type string
skills[].version string
system null | string
tools array<object>
tools[].configs array<object> | array | null
tools[].default_config object | object | null Resolved default configuration for agent tools.
tools[].type string
tools[].mcp_server_name string
tools[].description string
tools[].input_schema object JSON Schema for custom tool input parameters.
tools[].name string
type string
updated_at string A timestamp in RFC 3339 format
version number The agent's current version. Starts at 1 and increments when the agent is modified.