curl --request POST \
--url https://api.orq.ai/v2/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"role": "<string>",
"description": "<string>",
"instructions": "<string>",
"path": "Default",
"model": "<string>",
"settings": {
"max_iterations": 100,
"max_execution_time": 600,
"tool_approval_required": "respect_tool",
"tools": [],
"evaluators": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
],
"guardrails": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
]
},
"display_name": "<string>",
"system_prompt": "<string>",
"fallback_models": [
"<string>"
],
"memory_stores": [],
"knowledge_bases": [],
"team_of_agents": [],
"variables": {}
}
'{
"_id": "<string>",
"key": "<string>",
"display_name": "<string>",
"project_id": "<string>",
"role": "<string>",
"description": "<string>",
"instructions": "<string>",
"status": "live",
"model": {
"id": "<string>",
"integration_id": "<string>",
"parameters": {
"audio": {
"voice": "alloy",
"format": "wav"
},
"frequency_penalty": 123,
"max_tokens": 123,
"max_completion_tokens": 123,
"logprobs": true,
"top_logprobs": 10,
"n": 2,
"presence_penalty": 123,
"response_format": {
"type": "text"
},
"reasoning_effort": "none",
"verbosity": "<string>",
"seed": 123,
"stop": "<string>",
"stream_options": {
"include_usage": true
},
"thinking": {
"type": "disabled"
},
"temperature": 1,
"top_p": 0.5,
"top_k": 123,
"tool_choice": "none",
"parallel_tool_calls": true,
"modalities": [
"text"
],
"guardrails": [
{
"id": "orq_pii_detection",
"execute_on": "input"
}
]
},
"retry": {
"count": 3,
"on_codes": [
429,
500,
502,
503,
504
]
},
"fallback_models": [
"<string>"
]
},
"path": "Default",
"memory_stores": [
"<string>"
],
"team_of_agents": [
{
"key": "<string>",
"role": "<string>"
}
],
"created_by_id": "<string>",
"updated_by_id": "<string>",
"created": "<string>",
"updated": "<string>",
"system_prompt": "<string>",
"settings": {
"max_execution_time": 600,
"max_iterations": 100,
"tool_approval_required": "respect_tool",
"tools": []
},
"version_hash": "<string>",
"metrics": {
"total_cost": 0
},
"variables": {},
"knowledge_bases": [
{
"knowledge_id": "customer-knowledge-base"
}
]
}Creates a new agent with the specified configuration, including model selection, instructions, tools, and knowledge bases. Agents are intelligent assistants that can execute tasks, interact with tools, and maintain context through memory stores. The agent can be configured with a primary model and optional fallback models for automatic failover, custom instructions for behavior control, and various settings to control execution limits and tool usage.
curl --request POST \
--url https://api.orq.ai/v2/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"role": "<string>",
"description": "<string>",
"instructions": "<string>",
"path": "Default",
"model": "<string>",
"settings": {
"max_iterations": 100,
"max_execution_time": 600,
"tool_approval_required": "respect_tool",
"tools": [],
"evaluators": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
],
"guardrails": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
]
},
"display_name": "<string>",
"system_prompt": "<string>",
"fallback_models": [
"<string>"
],
"memory_stores": [],
"knowledge_bases": [],
"team_of_agents": [],
"variables": {}
}
'{
"_id": "<string>",
"key": "<string>",
"display_name": "<string>",
"project_id": "<string>",
"role": "<string>",
"description": "<string>",
"instructions": "<string>",
"status": "live",
"model": {
"id": "<string>",
"integration_id": "<string>",
"parameters": {
"audio": {
"voice": "alloy",
"format": "wav"
},
"frequency_penalty": 123,
"max_tokens": 123,
"max_completion_tokens": 123,
"logprobs": true,
"top_logprobs": 10,
"n": 2,
"presence_penalty": 123,
"response_format": {
"type": "text"
},
"reasoning_effort": "none",
"verbosity": "<string>",
"seed": 123,
"stop": "<string>",
"stream_options": {
"include_usage": true
},
"thinking": {
"type": "disabled"
},
"temperature": 1,
"top_p": 0.5,
"top_k": 123,
"tool_choice": "none",
"parallel_tool_calls": true,
"modalities": [
"text"
],
"guardrails": [
{
"id": "orq_pii_detection",
"execute_on": "input"
}
]
},
"retry": {
"count": 3,
"on_codes": [
429,
500,
502,
503,
504
]
},
"fallback_models": [
"<string>"
]
},
"path": "Default",
"memory_stores": [
"<string>"
],
"team_of_agents": [
{
"key": "<string>",
"role": "<string>"
}
],
"created_by_id": "<string>",
"updated_by_id": "<string>",
"created": "<string>",
"updated": "<string>",
"system_prompt": "<string>",
"settings": {
"max_execution_time": 600,
"max_iterations": 100,
"tool_approval_required": "respect_tool",
"tools": []
},
"version_hash": "<string>",
"metrics": {
"total_cost": 0
},
"variables": {},
"knowledge_bases": [
{
"knowledge_id": "customer-knowledge-base"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier for the agent within the workspace
1 - 255The role or function of the agent
1A brief description of what the agent does
1Detailed instructions that guide the agent's behavior
The path where the agent will be stored in the project structure. The first element identifies the project, followed by nested folders (auto-created as needed).
With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
"Default"
A model ID string (e.g., openai/gpt-4o or anthropic/claude-haiku-4-5-20251001). The agent can be run with a wide range of models with different capabilities, performance characteristics, and price points. Only models that support tool calling (function_calling) can be used to run agents. See (supported models)[/docs/proxy/supported-models] documentation for the complete list of available models.
Configuration settings for the agent's behavior
Show child attributes
agent display name within the workspace
255A custom system prompt template for the agent. If omitted, the default template is used.
1Optional array of fallback models used when the primary model fails. Fallbacks are attempted in order. All models must support tool calling.
A fallback model ID string (e.g., openai/gpt-4o-mini). Will be used if the primary model request fails. Must support tool calling.
Optional array of memory store identifiers for the agent to access. Accepts both memory store IDs and keys.
Optional array of knowledge base configurations for the agent to access
Show child attributes
The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
Show child attributes
Show child attributes
Agent successfully created and ready for use. Returns the complete agent manifest including the generated ID, configuration, and all settings.
Unique identifier for the agent within the workspace
1The status of the agent. Live is the latest version of the agent. Draft is a version that is not yet published. Pending is a version that is pending approval. Published is a version that was live and has been replaced by a new version.
live, draft, pending, published Show child attributes
Entity storage path in the format: project/folder/subfolder/...
The first element identifies the project, followed by nested folders (auto-created as needed).
With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
"Default"
Array of memory store identifiers. Accepts both memory store IDs and keys.
The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
Show child attributes
1Show child attributes
Show child attributes
Extracted variables from agent instructions
Show child attributes
Agent knowledge bases reference
Show child attributes
Was this page helpful?