Skip to main content
POST
Generate Agent Configurations From a Task

Headers

x-api-key
string
required

Body

application/json
task
string
required

The task the generated team should be able to handle. This is the only required field.

Minimum string length: 1
name
string | null

The name of this auto agent builder run.

description
string | null

The description of this auto agent builder run.

model_name
string | null

The model backing the builder agent itself — not the models given to the generated agents; the builder chooses those per agent. Defaults to the framework's builder default.

max_agents
integer | null
default:5

Upper bound on roster size. This is a ceiling, not a target — the builder prefers the smallest roster that covers the task.

Required range: 1 <= x <= 100
num_agents
integer | null

Exact number of agents to generate. When set, this overrides max_agents and the builder's prefer-fewer guidance.

Required range: 1 <= x <= 100
system_prompt
string | null

Custom instructions for the builder agent. Defaults to the framework's builder system prompt.

agent_kwargs
Agent Kwargs · object | null

Extra keyword arguments carried on every generated agent, e.g. max_loops or streaming_on. Keys that collide with the fields the builder generates (agent_name, description, system_prompt, model_name) are ignored.

Response

Successful Response

job_id
string
required

The job ID of the auto agent builder run.

name
string
required

The name of the auto agent builder run.

description
string
required

The description of the auto agent builder run.

status
string
required

The status of the auto agent builder run.

agents
AgentSpec · object[]
required

The generated roster. Each entry is a complete AgentSpec that can be posted unmodified to /v1/swarm/completions or the other multi-agent endpoints.

usage
Usage · object
required

The usage of the auto agent builder run.

timestamp
string
required

The timestamp of the auto agent builder run.