TrigRun
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. Its public API is machine-readable end to end, and the product MCP server covers the most common operational workflows around request-based jobs, executions, secrets, and notifications.

Quick access

ResourceURLFormatUse case
OpenAPI spechttps://api.trigrun.com/openapi.jsonOpenAPI 3.1 JSONFull API contract — request/response schemas, auth, examples
llms.txthttps://api.trigrun.com/llms.txtMarkdownConcise API summary for LLM context windows
llms-full.txthttps://api.trigrun.com/llms-full.txtMarkdownComplete documentation in one file
MCP serverSee Product MCPMCP protocolOperate common TrigRun workflows 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 features not yet exposed as MCP tools, use the REST API directly. Today that includes monitors and step-driven workflow/webhook-trigger job creation.

For context-loading agents

If you need to load TrigRun docs into your context:

  • Small context: Fetch https://api.trigrun.com/llms.txt (~2K tokens) for a concise API overview
  • Full context: Fetch https://api.trigrun.com/llms-full.txt (~15K tokens) for complete docs with examples
  • Specific page: Use the docs navigation or search, 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