POST /config
Set budget thresholds, Slack webhooks, and pause/resume agents.
POST /config
Create or update the configuration for an agent. This sets the daily budget limit and optional Slack webhook. The SDK calls this automatically on startup when you pass cost_threshold to AgentFlare(...).
Request
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
agent_id | string | Yes | — | The agent to configure. |
cost_threshold_usd | float | No | 10.0 | Daily spend limit in USD. The agent is auto-paused when this is exceeded. |
slack_webhook_url | string | No | null | Slack incoming webhook URL. A message is sent when the agent is auto-paused. |
Response
POST /config/pause
Manually pause or resume an agent. This overrides the threshold — you can pause an agent that hasn't hit its budget, or resume one that has.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | The agent to pause or resume. |
is_paused | boolean | Yes | true to pause, false to resume. |
Response
How config is stored
Config is stored in the agent_configs table in Supabase. The upsert is keyed on (agent_id, user_id), so calling POST /config twice for the same agent is safe — it updates, not duplicates.
Curl examples
Set threshold:
Resume a paused agent: