POST
/
Run Agent
curl --request POST \
  --url https://api.agentbase.sh/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "message": "<string>",
  "mode": "<string>",
  "system": "<string>",
  "rules": [
    "<string>"
  ]
}'

Query Parameters

session
string
The session ID to continue the agent session conversation. If not provided, a new agent session will be created.

Request Body

message
string
required
The task or message to run the agent with.
mode
string
default:"fast"
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.
system
string
A system prompt to provide system information to the agent. The Agents API defaults to the Agentbase default system prompt.
rules
string[]
A set of rules to provide to the agent. Rules are a set of constraints that the agent must follow. Defaults to no rules.
See Streaming Message Types for event details.