Skip to content

Agents & Scheduling

Blaick agents are reusable, configurable assistants you can run on demand or on a schedule. An agent bundles a system prompt, a model choice, optional tools, and a schedule — plus access to a per-user secret vault for the credentials those tools need.

Create an agent

POST https://api.blaick.ai/api/v1/agents
curl https://api.blaick.ai/api/v1/agents \
  -H "Authorization: Bearer $BLAICK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Morning news digest",
    "description": "Summarizes overnight headlines each morning.",
    "system_prompt": "You are a concise news analyst.",
    "run_prompt": "Fetch the latest headlines and summarize the top five.",
    "model_id": "claude-sonnet-4-20250514",
    "auto_route": false,
    "is_active": true,
    "tools_config": {
      "web_fetch": {"enabled": true},
      "send_webhook": {"enabled": true}
    },
    "schedule_enabled": true,
    "schedule_interval": "daily",
    "schedule_time": "09:00",
    "schedule_timezone": "America/New_York"
  }'
Field Description
name Display name.
description Optional summary.
system_prompt The persistent instructions that define the agent.
run_prompt The prompt executed on a scheduled or "run now" execution.
model_id Model to use (UUID or provider id).
auto_route Let Blaick pick the model per run. See Auto-routing.
is_active Whether the agent is enabled.
tools_config Which tools the agent may use (e.g. web_fetch, send_webhook), each toggled with enabled.
schedule_enabled Turn scheduling on.
schedule_interval daily, weekly, or monthly.
schedule_time Local time of day, HH:MM.
schedule_day_of_week For weekly schedules, e.g. monday.
schedule_timezone IANA timezone, e.g. America/New_York. Defaults to UTC.

When scheduling is enabled, Blaick computes the next run time and executes the agent automatically at each interval.

Manage agents

# List your agents
curl https://api.blaick.ai/api/v1/agents \
  -H "Authorization: Bearer $BLAICK_API_KEY"

# Get one
curl https://api.blaick.ai/api/v1/agents/{id} \
  -H "Authorization: Bearer $BLAICK_API_KEY"

# Update
curl -X PUT https://api.blaick.ai/api/v1/agents/{id} \
  -H "Authorization: Bearer $BLAICK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"schedule_time": "07:30"}'

# Delete
curl -X DELETE https://api.blaick.ai/api/v1/agents/{id} \
  -H "Authorization: Bearer $BLAICK_API_KEY"

Run an agent now

Trigger an immediate run without waiting for the schedule:

curl -X POST https://api.blaick.ai/api/v1/agents/{id}/runs \
  -H "Authorization: Bearer $BLAICK_API_KEY"

List past runs, or fetch one with its full output:

# Recent runs
curl https://api.blaick.ai/api/v1/agents/{id}/runs \
  -H "Authorization: Bearer $BLAICK_API_KEY"

# A single run, with output
curl https://api.blaick.ai/api/v1/agents/{id}/runs/{run_id} \
  -H "Authorization: Bearer $BLAICK_API_KEY"

Interactive agent chat

To converse with an agent (rather than run its scheduled prompt), post messages to its chat endpoint:

curl https://api.blaick.ai/api/v1/agents/{id}/chat \
  -H "Authorization: Bearer $BLAICK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "What did you find today?"}]}'

The secret vault

Agents often need credentials — a Slack webhook URL, a third-party API token. Store these in your per-user secret vault and reference them from tools, instead of hardcoding them.

# Create a secret
curl https://api.blaick.ai/api/v1/secrets \
  -H "Authorization: Bearer $BLAICK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "SLACK_WEBHOOK",
    "description": "Team channel incoming webhook",
    "value": "https://hooks.slack.com/services/…"
  }'

Secrets are stored encrypted and only ever returned masked:

curl https://api.blaick.ai/api/v1/secrets \
  -H "Authorization: Bearer $BLAICK_API_KEY"
{
  "secrets": [
    {
      "id": "…",
      "name": "SLACK_WEBHOOK",
      "description": "Team channel incoming webhook",
      "masked_value": "https://hooks.slack.com/…",
      "created_at": "2026-08-04T00:00:00Z"
    }
  ]
}

Update or delete a secret:

curl -X PATCH https://api.blaick.ai/api/v1/secrets/{id} \
  -H "Authorization: Bearer $BLAICK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": "https://hooks.slack.com/services/NEW"}'

curl -X DELETE https://api.blaick.ai/api/v1/secrets/{id} \
  -H "Authorization: Bearer $BLAICK_API_KEY"

Safety by default

When an agent uses a tool that fetches from the web, the returned content is sanitized by Blaick's safety layer before it re-enters the model — a guard against prompt-injection from untrusted pages.