Automations

Schedule recurring prompts so agents run on a timer via Pocket Network relays — without opening chat.

Automations (API name: scheduled-tasks) are recurring jobs tied to an agent. On each tick the backend runs the same LLM + tool path as chat, against Pocket Network RPC when tools need chain data.

Web UI

Open Automations in the app nav (/scheduled-tasks). Create jobs from templates, toggle enable, inspect last result, expand relay breakdown, and copy a cURL snippet.

Prerequisites

  • An agent with a saved access token in the browser (or pass X-Agent-Access-Token for API calls).
  • Capabilities that match the prompt (e.g. read / compare for gas checks).
  • For write prompts: funded wallets, transact, and a safe spending cap.

Intervals

interval_seconds must be between 60 (1 minute) and 604800 (7 days). The scheduler polls about every 30 seconds and runs any due, enabled job.

UI presets include 5m, 15m, 1h, 6h, 12h, 24h, and weekly.

Starter templates

  • Daily portfolio report — full multi-chain summary with USD values (24h)
  • Hourly gas check — gas on major EVM L2s (1h)
  • Balance monitor — balances across chains (6h)
  • Weekly rebalance reminder — allocation concentration checks (7d)

Pocket relays

Each run records a row in scheduled_task_runs. Relay counts estimate how many Pocket RPC calls occurred during that run window (tools that hit the chain). Pure LLM replies with no tools may show 0 relays — that is expected.

Fetch breakdowns with GET …/relay-stats or the Relays column in the UI.

Quick API create

curl -X POST 'http://127.0.0.1:8000/api/scheduled-tasks' \
  -H 'Content-Type: application/json' \
  -H 'X-Agent-Access-Token: YOUR_TOKEN' \
  -d '{
    "agent_id": "agent-uuid",
    "prompt": "Compare gas on Arbitrum vs Base and summarize",
    "interval_seconds": 3600
  }'

Safety notes

  • Start with read-only prompts and short intervals while testing.
  • Disable or delete automations before large fund deposits if you are unsure.
  • Write automations use the same spending caps as chat — review caps before enabling.

Full endpoint list: Automations API.