Create a new agent
Create a new agent. JSON or multipart (multipart for an image). 201 {id, key, image, workflow_id (workflow agents)}. A workflow agent may send workflow_graph to create its workflow in the same request; a graph that fails validation is 400 {success: false, message, error, errors}.
Personal access token scope: agents:write.
bearerAuthorizationBearer <token>A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).
application/json- body
agent_type?stringType of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility.
allow_system_prompt_override?booleanAllow API callers to override the system prompt via the v1 endpoint
chunks?integerChunks count
default_model_id?stringDefault model ID for this agent
description*stringDescription of the agent
folder_id?stringFolder ID to organize the agent
image?Image file upload
json_schema?JSON schema for enforcing structured output format
limited_request_mode?booleanWhether the agent is in limited request mode
limited_token_mode?booleanWhether the agent is in limited token mode
models?array<string>List of available model IDs for this agent
name*stringName of the agent
prompt_id?stringPrompt id, or a preset: default, creative or strict
request_limit?integerRequest limit for the agent in limited mode
retriever?stringRetriever ID
source?stringSource ID (legacy single source)
sources?array<string>List of source identifiers for multiple sources
starters?array<string>Up to 4 questions a new chat with the agent offers, each at most 200 characters; trimmed, blanks and case-insensitive duplicates dropped. Multipart sends a JSON string
status*stringStatus of the agent (draft or published)
token_limit?integerToken limit for the agent in limited mode
tools?array<string>List of tool identifiers
workflow?stringWorkflow ID for workflow-type agents
workflow_graph?Workflow agents only, instead of workflow: the graph saved with the agent in the same transaction, {nodes, edges, retry_defaults?} (a JSON string in a multipart form). A draft only its builder runs is checked for shape only; a published agent, one a key, webhook, schedule or public link runs, or one sharing its workflow with such an agent gets the full validation. Needs workflows:write for a token.
Success
curl -X POST 'http://localhost:7091/api/create_agent' \ -H 'Content-Type: application/json' \ -d '{ "description": "string", "name": "string", "status": "string"}'Webhook listener for agent events (POST) POST
Webhook listener for agent events (POST). Expects JSON payload, which is used to trigger processing. Honors an optional `Idempotency-Key` header: a repeat request with the same key within 24h returns the original cached response and does not re-enqueue the task. Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.
Dry-run an agent YAML import and return the resolution plan POST
Dry-run an agent YAML import and return the resolution plan. [Personal access token](/API/personal-access-tokens) scope: `agents:write`.