Create or update an agent
Create a new agent or update an existing one.
- Create: Omit
idfrom the request body. Requiresorg:manage_agents:createpermission ororg:adminrole. - Update: Include the agent’s
idin the request body. Requiresorg:manage_agents:updatepermission ororg:adminrole.
Cloning an agent: There is no dedicated clone endpoint. To clone an agent,
GET /agents to retrieve the original, modify the payload (e.g., change the name),
and POST /agents without an id to create it as a new agent.
Tool schemas are automatically refreshed to match the latest platform definitions when saving.
Authorizations
JWT token from Clerk authentication.
Must be from a user with org:admin role.
Body
Agent name
"Customer Support Agent"
Agent ID — include to update an existing agent, omit to create a new one
1
Short description of the agent's purpose
"Handles customer inquiries and support tickets"
URL to the agent's logo image
Suggested conversation starters shown to users
[
"How can I help you today?",
"What issue are you experiencing?"
]Model identifier (e.g., openai:gpt-4o, anthropic:claude-sonnet-4-20250514)
"openai:gpt-4o"
Maximum number of tool call roundtrips per response
x >= 150
System prompt / instructions for the agent
"You are a helpful customer support agent. Be friendly and concise."
Tool definitions keyed by tool name (e.g., scrape_url,
search_knowledge_base). Two shapes are accepted:
- Native tools:
{ description, parameters }— copy these fromGET /tools. Schemas are refreshed to the latest platform definitions on save. - Provider tools (e.g.,
google:code_execution):{ "isProviderTool": true }keyed under theprovider:toolname.
Per-tool config (e.g., callableAgentIds for call_agent,
accessibleKnowledgeBaseIds for search_knowledge_base)
can be set under a config field and is preserved by
POST /agents/sync-tools.
Call GET /tools to discover the names and parameter
shapes available to the org.
List of enabled integration identifiers
List of MCP server IDs to connect (integer mcp_server.id values)
Agent lifecycle stage
development, released Whether the agent appears in the chat interface
Custom email slug for the agent's email address. Must be lowercase alphanumeric
with hyphens, cannot start or end with a hyphen, max 63 characters.
Must be unique across all agents. Cannot use reserved slugs
(admin, support, help, noreply, postmaster, etc.) and
cannot match the agent-{id} or kb-{id} system patterns.
63^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"support-bot"
Tag IDs to associate with this agent (must belong to the organization)
[1, 2]Response
Agent created or updated successfully
Unique agent identifier
1
Agent name
"Customer Support Agent"
Agent lifecycle stage
development, released "development"
Whether the agent appears in the chat interface
true
When the agent was created
"2024-01-15T10:30:00.000Z"
When the agent was last updated
"2024-01-20T14:00:00.000Z"
Short description of the agent's purpose
"Handles customer inquiries and support tickets"
URL to the agent's logo image
Suggested conversation starters shown to users
[
"How can I help you today?",
"What issue are you experiencing?"
]Model identifier (e.g., openai:gpt-4o)
"openai:gpt-4o"
Maximum number of tool call roundtrips per response
50
System prompt / instructions for the agent
Tool definitions keyed by tool name
Connected MCP server IDs (integer mcp_server.id values)
Custom email slug for the agent's email address
"support-bot"
ID of the agent_version snapshot this agent's config currently
reflects. Every save appends a version and advances this pointer;
see GET /agents/versions. The live agent fields above remain the
source of truth — this is bookkeeping for history and rollback.
42
Tags associated with this agent
