Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentbot.raveculture.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Cron API

Create, list, and delete cron jobs directly on the OpenClaw gateway, and trigger platform-level automated tasks. Cron jobs run recurring tasks on your agent using the gateway’s built-in scheduler.
These endpoints manage cron jobs on the gateway itself via POST /tools/invoke. For application-level scheduled tasks stored in the database, see the scheduled tasks API.
Cron is enabled by default on all new instances. The provisioning template sets a maximum of 2 concurrent runs and 24-hour session retention. You can adjust these limits using the config API.
All gateway cron endpoints require session authentication. The blog-daily endpoint uses bearer-token authentication with CRON_SECRET.

List cron jobs

GET /api/cron
Returns all cron jobs from the gateway, including disabled jobs.

Response

{
  "jobs": [
    {
      "id": "heartbeat",
      "name": "Heartbeat",
      "enabled": true,
      "schedule": {
        "kind": "every",
        "everyMs": 1800000
      },
      "payload": {
        "kind": "systemEvent",
        "text": "Heartbeat check — review emails, calendar, and recent activity."
      },
      "lastRun": "2026-03-30T01:00:00Z",
      "nextRun": "2026-03-30T01:30:00Z"
    }
  ],
  "total": 1,
  "source": "gateway"
}

Job object

FieldTypeDescription
idstringJob identifier
namestringJob display name
enabledbooleanWhether the job is active
scheduleobjectSchedule configuration. Contains kind (every for interval-based) and timing fields like everyMs (interval in milliseconds) or expr (cron expression).
payloadobjectJob payload sent to the agent when the job runs
lastRunstring | nullISO 8601 timestamp of the last execution
nextRunstring | nullISO 8601 timestamp of the next scheduled execution

Response fields

FieldTypeDescription
jobsarrayList of cron job objects
totalnumberTotal number of jobs
sourcestringData source — gateway on success, gateway-error when the gateway is unreachable

Gateway errors

When the gateway is unreachable, the endpoint returns HTTP 200 with an empty job list and the error detail:
{
  "jobs": [],
  "error": "Gateway unreachable",
  "source": "gateway-error"
}

Example

curl -X GET https://agentbot.sh/api/cron \
  -H "Cookie: next-auth.session-token=YOUR_SESSION"

Create a cron job

POST /api/cron
Adds a new cron job to the gateway.

Request body

FieldTypeRequiredDescription
namestringYesJob name
scheduleobjectYesSchedule configuration. Use { "kind": "every", "everyMs": 3600000 } for interval-based schedules, or { "kind": "cron", "expr": "0 9 * * *" } for cron expressions.
payloadobjectYesJob payload sent to the agent on each run
enabledbooleanNoWhether the job starts active. Defaults to true.

Example request

{
  "name": "Daily digest",
  "schedule": {
    "kind": "every",
    "everyMs": 86400000
  },
  "payload": {
    "kind": "systemEvent",
    "text": "Generate a daily activity digest."
  }
}

Response

{
  "success": true,
  "source": "gateway"
}

Errors

CodeDescription
400name, schedule, and payload required — one or more required fields are missing
401Unauthorized — no valid session
502Gateway error — the gateway rejected the request or is unreachable

Example

curl -X POST https://agentbot.sh/api/cron \
  -H "Content-Type: application/json" \
  -H "Cookie: next-auth.session-token=YOUR_SESSION" \
  -d '{
    "name": "Daily digest",
    "schedule": { "kind": "every", "everyMs": 86400000 },
    "payload": { "kind": "systemEvent", "text": "Generate a daily activity digest." }
  }'

Delete a cron job

DELETE /api/cron?jobId=heartbeat
Removes a cron job from the gateway.

Query parameters

ParameterTypeRequiredDescription
jobIdstringYesID of the job to delete

Response

{
  "success": true,
  "source": "gateway"
}

Errors

CodeDescription
400jobId required — the jobId query parameter is missing
401Unauthorized — no valid session
502Gateway error — the gateway rejected the request or is unreachable

Example

curl -X DELETE "https://agentbot.sh/api/cron?jobId=heartbeat" \
  -H "Cookie: next-auth.session-token=YOUR_SESSION"

Daily blog publish

GET /api/cron/blog-daily
Generates and publishes a daily operations brief to the auto-blog. This endpoint is designed to be called by a Vercel cron schedule (hourly) but only publishes when the current hour is 9 AM Europe/London, ensuring the post time does not drift during daylight-saving changes. Posts are stored in KV (Upstash Redis) and appear on the blog index alongside static posts.
This endpoint is invoked automatically by the Vercel cron scheduler. You do not need to call it manually unless you want to force-publish outside the normal window.

Authentication

Requires a CRON_SECRET bearer token in the Authorization header.
Authorization: Bearer <CRON_SECRET>

Query parameters

ParameterTypeRequiredDescription
forcestringNoSet to "1" to publish regardless of the current hour

Response

On successful publish:
{
  "success": true,
  "slug": "daily-ops-2026-04-09",
  "publishedAt": "2026-04-09T08:00:00.000Z"
}
When skipped because the current hour is outside the publish window:
{
  "skipped": true,
  "reason": "outside_publish_window",
  "targetHour": 9,
  "timezone": "Europe/London",
  "isoDate": "2026-04-09"
}
When skipped because today’s post was already published:
{
  "success": true,
  "skipped": true,
  "reason": "already_published",
  "slug": "daily-ops-2026-04-09"
}

Response fields

FieldTypeDescription
successbooleantrue when the request completed without error
skippedbooleantrue when no new post was created
reasonstringWhy the post was skipped — outside_publish_window or already_published
slugstringSlug of the published or existing post (format daily-ops-YYYY-MM-DD)
publishedAtstringISO 8601 timestamp of the publish time (only on new publishes)
targetHournumberThe London-local hour the cron targets (always 9)
timezonestringTimezone used for the publish window (Europe/London)
isoDatestringCurrent date in YYYY-MM-DD format

Errors

CodeDescription
401Unauthorized — missing or invalid CRON_SECRET bearer token

Example

Force-publish today’s daily blog post:
curl -X GET "https://agentbot.sh/api/cron/blog-daily?force=1" \
  -H "Authorization: Bearer YOUR_CRON_SECRET"

Broadcast scheduler

GET /api/cron/broadcast
Finds mixtapes and ad campaigns due to broadcast, creates Mux live streams, and triggers FFmpeg-based broadcasting via the platform OpenClaw runtime. Runs every 5 minutes via Vercel Cron with a 5-minute look-ahead window. When the OpenClaw runtime is unavailable, the endpoint generates a ready-to-use FFmpeg command and sends an admin alert so the broadcast can be triggered manually.

Authentication

Requires a CRON_SECRET bearer token in the Authorization header.
Authorization: Bearer <CRON_SECRET>

Broadcast sources

The scheduler checks two sources for items due to broadcast:
  • Mixtapes — records with status scheduled and scheduled_at within the look-ahead window that have a playback_id
  • Ad campaigns — records with status approved, starts_at within the look-ahead window, a playback_id, and remaining broadcast slots

Response

When no broadcasts are due:
{
  "checked": true,
  "jobs": 0,
  "ts": "2026-04-12T10:00:00.000Z"
}
When broadcasts are processed:
{
  "checked": true,
  "jobs": 2,
  "results": [
    { "id": "clxyz456def", "kind": "mixtape", "outcome": "triggered" },
    { "id": "clxyz789ghi", "kind": "ad", "outcome": "needs_operator" }
  ],
  "ts": "2026-04-12T10:00:00.000Z"
}
FieldTypeDescription
checkedbooleanAlways true
jobsnumberNumber of broadcast jobs processed
resultsarrayPer-job results (only present when jobs > 0)
results[].idstringMixtape or campaign identifier
results[].kindstringSource type: mixtape or ad
results[].outcomestringResult: triggered (broadcast started via OpenClaw), needs_operator (requires manual FFmpeg), or error: <message>
tsstringISO 8601 timestamp of the cron run

Errors

CodeDescription
401Unauthorized — missing or invalid CRON_SECRET bearer token
500Mux not configured — Mux credentials are missing
When a broadcast job fails, the scheduler rolls back the database status to its previous state and cleans up the Mux live stream. The job appears in results with an error: outcome.

Example

curl -X GET https://agentbot.sh/api/cron/broadcast \
  -H "Authorization: Bearer YOUR_CRON_SECRET"

Verify X ownership claims

GET /api/cron/verify-x-claims
Automatically verifies pending X (Twitter) ownership claims by searching the X API for challenge codes. Runs hourly via Vercel Cron. For each pending claim, the endpoint searches recent tweets for the challenge code. When a match is found, the claim is approved and the linked agent receives verified status with a trust score increase of 50 points. Claims that have passed their expiry date are marked as expired. Each run processes up to 10 pending claims (oldest first) to stay within X API rate limits.
This endpoint is invoked automatically by the Vercel cron scheduler. You do not need to call it manually. For details on starting a verification claim, see the Social API verification section.

Authentication

Requires a CRON_SECRET bearer token in the Authorization header.
Authorization: Bearer <CRON_SECRET>

Environment variables

VariableRequiredDescription
CRON_SECRETYesShared secret checked by Vercel to authorize cron requests
X_API_BEARER_TOKENYesTwitter/X API v2 Bearer Token used to search recent tweets
When X_API_BEARER_TOKEN is not configured, the endpoint skips processing and returns a skipped response.

Response

On successful run:
{
  "checked": 10,
  "verified": 2,
  "expired": 1,
  "remaining": 7
}
When X_API_BEARER_TOKEN is not configured:
{
  "skipped": true,
  "reason": "X_API_BEARER_TOKEN not configured"
}

Response fields

FieldTypeDescription
checkednumberTotal number of pending claims processed in this run (max 10)
verifiednumberNumber of claims that were successfully verified
expirednumberNumber of claims that were marked as expired
remainingnumberNumber of claims that are still pending (not yet verified or expired)
skippedbooleantrue when the run was skipped due to missing configuration
reasonstringWhy the run was skipped

Claim lifecycle

When a claim is verified, the following updates are applied in a single transaction:
  1. The claim’s status is set to verified and verifiedAt is recorded.
  2. The linked agent’s verificationStatus is set to verified.
  3. The linked agent’s trustScore is incremented by 50.
When a claim has passed its expiresAt timestamp, it is marked as expired and no further verification attempts are made.

Errors

CodeDescription
401Unauthorized — missing or invalid CRON_SECRET bearer token

Example

curl -X GET https://agentbot.sh/api/cron/verify-x-claims \
  -H "Authorization: Bearer YOUR_CRON_SECRET"

Weekly MoltX update

GET /api/cron/moltx-weekly
Generates and publishes a weekly platform summary to MoltX. The post includes live agent counts, installed skills, service health, and recent blog highlights. Content is automatically trimmed to stay within the MoltX 500-character post limit. Posts are deduplicated by ISO week key (for example 2026-W15). If the current week has already been posted, the endpoint returns a success response with skipped: true unless you pass force=1.
This endpoint requires the MOLTX_API_KEY environment variable. When the key is not configured, the endpoint returns the generated content without posting.

Authentication

Accepts either of:
  • A CRON_SECRET bearer token in the Authorization header.
  • An authenticated admin session cookie.
Authorization: Bearer <CRON_SECRET>

Query parameters

ParameterTypeRequiredDescription
forcestringNoSet to "1" to re-post even if this week was already published
dryRunstringNoSet to "1" to return the generated content without posting to MoltX

Response

On successful publish:
{
  "success": true,
  "weekKey": "2026-W15",
  "content": "Weekly Agentbot/baseFM update\n50+ deployed / 12 live agents\n...",
  "response": { "id": "post_abc123" }
}
When skipped because this week was already posted:
{
  "success": true,
  "skipped": true,
  "reason": "already_posted",
  "weekKey": "2026-W15",
  "existing": { "postedAt": "2026-04-07T09:00:00.000Z", "weekKey": "2026-W15" }
}
When running in dry-run mode:
{
  "success": true,
  "dryRun": true,
  "weekKey": "2026-W15",
  "content": "Weekly Agentbot/baseFM update\n..."
}
When MOLTX_API_KEY is not configured:
{
  "success": false,
  "skipped": true,
  "reason": "missing_moltx_api_key",
  "weekKey": "2026-W15",
  "content": "Weekly Agentbot/baseFM update\n..."
}

Response fields

FieldTypeDescription
successbooleantrue when the post was published or the request completed without error
skippedbooleantrue when no new post was created
reasonstringWhy the post was skipped — already_posted or missing_moltx_api_key
weekKeystringISO week identifier (format YYYY-Www)
contentstringThe generated post content
dryRunbooleantrue when the request was a dry run
responseobjectThe response body from the MoltX API (only on successful publish)
existingobjectPrevious post state for this week (only when reason is already_posted)

Errors

CodeDescription
401Unauthorized — missing or invalid CRON_SECRET bearer token and no admin session
502moltx_post_failed — the MoltX API rejected the post. The response includes the upstream status and body.

Example

Dry-run to preview this week’s post:
curl -X GET "https://agentbot.sh/api/cron/moltx-weekly?dryRun=1" \
  -H "Authorization: Bearer YOUR_CRON_SECRET"
Force-publish this week’s update:
curl -X GET "https://agentbot.sh/api/cron/moltx-weekly?force=1" \
  -H "Authorization: Bearer YOUR_CRON_SECRET"