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. At most 50.

Required range: 1 <= x <= 50
swarm_type
enum<string>
default:self-consistency

The type of reasoning agent to run: AgentJudge, ReflexionAgent, self-consistency or consistency-agent.

Available options:
AgentJudge,
ReflexionAgent,
self-consistency,
consistency-agent
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
memory_capacity
integer | null

The memory capacity for a ReflexionAgent.

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

Usage statistics: input, output and total tokens plus the run's total_cost (a float, so this cannot be Dict[str, int]).

status
string
default:success

Status of the reasoning agent run.