Cron Platform
Agent Integration

Agent Integration

How AI agents can consume TrigRun documentation and operate the platform programmatically.

TrigRun is designed for AI agents to use directly. Every feature is accessible through structured, machine-readable interfaces.

Quick access

ResourceURLFormatUse case
OpenAPI spechttps://api.trigrun.com/openapi.jsonOpenAPI 3.1 JSONFull API contract — request/response schemas, auth, examples
llms.txthttps://docs.trigrun.com/llms.txtMarkdownConcise API summary for LLM context windows
llms-full.txthttps://docs.trigrun.com/llms-full.txtMarkdownComplete documentation in one file
Docs indexhttps://docs.trigrun.com/docs-index.jsonJSONPage index with slugs, titles, descriptions
MCP serverSee Product MCPMCP protocolOperate TrigRun from Claude, Cursor, or any MCP client

For coding agents

If you're an AI agent writing code that integrates with TrigRun:

  1. Fetch /openapi.json — This is your primary reference. It contains every endpoint, request/response schema, auth requirements, and examples.
  2. Auth header format: Authorization: Bearer <token> — either a JWT from login or an API token starting with cron_pat_.
  3. Error format: All errors return { "error": { "code": "...", "message": "...", "details": ... } }.
  4. Base URL: https://api.trigrun.com

Minimal example: create a job

curl -X POST https://api.trigrun.com/v1/jobs \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "agent-created-job",
    "kind": "cron",
    "schedule": { "cron": "*/5 * * * *" },
    "request": {
      "url": "https://httpbin.org/post",
      "method": "POST"
    }
  }'

Common agent workflows

TaskEndpointMethod
Create a job/v1/jobsPOST
List all jobs/v1/jobsGET
Trigger a job now/v1/jobs/:id/run-nowPOST
Check execution result/v1/executions/:idGET
List failed executions/v1/executions?status=failedGET
Replay a failed execution/v1/executions/:id/replayPOST
Create a secret/v1/secretsPOST
Import from crontab/v1/jobs/importPOST

For MCP-native agents

If you're an agent with MCP support (Claude Desktop, Claude Code, Cursor):

  1. Connect to the TrigRun MCP server — see Product MCP setup
  2. Use tools like list_jobs, create_job, get_execution directly
  3. Every tool requires a token argument (API token or JWT)

For context-loading agents

If you need to load TrigRun docs into your context:

  • Small context: Fetch /llms.txt (~2K tokens) for a concise API overview
  • Full context: Fetch /llms-full.txt (~15K tokens) for complete docs with examples
  • Specific page: Fetch /docs-index.json, find the slug, then fetch the page's raw Markdown

Idempotency

When creating jobs programmatically, use the Idempotency-Key header to prevent duplicates:

curl -X POST https://api.trigrun.com/v1/jobs \
  -H "Idempotency-Key: deploy-v2.1.0" \
  ...

If a job with the same key exists, the existing job is returned.

On this page