Skip to main content
POST
Execute Reasoning Agent Completion

Headers

x-api-key
string
required

Body

application/json
agent_name
string | null
default:reasoning-agent

The unique name assigned to the reasoning agent.

description
string | null
default:A reasoning agent that can answer questions and help with tasks.

A detailed explanation of the reasoning agent's purpose and capabilities.

model_name
string | null
default:claude-sonnet-4-20250514

The name of the AI model that the reasoning agent will utilize.

system_prompt
string | null

The initial instruction or context provided to the reasoning agent.

max_loops
integer | null
default:1

The maximum number of times the reasoning agent is allowed to repeat its task.

swarm_type
enum<string> | null
default:reasoning_duo

The type of reasoning swarm to use (e.g., reasoning duo, self-consistency, IRE).

Available options:
reasoning-duo,
self-consistency,
ire,
reasoning-agent,
consistency-agent,
ire-agent,
ReflexionAgent,
GKPAgent,
AgentJudge
num_samples
integer | null
default:1

The number of samples to generate for the reasoning agent.

output_type
enum<string> | null
default:dict-all-except-first

The type of output format for the reasoning agent.

Available options:
list,
dict,
dictionary,
string,
str,
final,
last,
json,
all,
yaml,
xml,
dict-all-except-first,
str-all-except-first,
basemodel,
dict-final,
list-final
num_knowledge_items
integer | null

The number of knowledge items to use for the reasoning agent.

memory_capacity
integer | null

The memory capacity for the reasoning agent.

task
string | null

The task to be completed by the reasoning agent.

Response

Successful Response

job_id
string
required

Unique identifier for the reasoning agent run.

outputs
any
required

The output generated by the reasoning agent. Shape varies by reasoning type.

timestamp
string
required

ISO-formatted timestamp of when the run was executed.

agent_name
string
required

Name of the agent.

agent_type
string
required

Type of the agent (swarm type).

agent_id
string
required

Unique identifier for the agent instance.

usage
Usage · object
required

Token usage statistics including input, output, and total tokens.

status
string
default:success

Status of the reasoning agent run.