Query Parameters
The session ID to continue the agent session conversation. If not provided, a
new agent session will be created.
Request Body
The task or message to run the agent with.
The mode of the agent. Can be
flash
, fast
or max
. Flash mode is great
for simple, one-off tasks. Fast mode is much faster and cheaper, with
comparable performance to max
mode. The Agents API defaults to fast
.A system prompt to provide system information to the agent. The Agents API
defaults to the Agentbase default system prompt.
A set of MCP servers to provide to the agent. MCP servers configs are not
stored within the agent, so each request must include the MCP servers configs,
and you can modify them each time. You need to provide both
serverName
and
serverUrl
. We have backward compatibility with the old /sse
endpoint.A set of rules to provide to the agent. Rules are a set of constraints that
the agent must follow. Defaults to no rules.
Whether to stream the agent messages token by token. Defaults to
false
.