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
| Resource | URL | Format | Use case |
|---|---|---|---|
| OpenAPI spec | https://api.trigrun.com/openapi.json | OpenAPI 3.1 JSON | Full API contract — request/response schemas, auth, examples |
| llms.txt | https://api.trigrun.com/llms.txt | Markdown | Concise API summary for LLM context windows |
| llms-full.txt | https://api.trigrun.com/llms-full.txt | Markdown | Complete documentation in one file |
| MCP server | See Product MCP | MCP protocol | Operate 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:
- Fetch
/openapi.json— This is your primary reference. It contains every endpoint, request/response schema, auth requirements, and examples. - Auth header format:
Authorization: Bearer <token>— either a JWT from login or an API token starting withcron_pat_. - Error format: All errors return
{ "error": { "code": "...", "message": "...", "details": ... } }. - Base URL:
https://api.trigrun.com
Minimal example: create a job
Common agent workflows
| Task | Endpoint | Method |
|---|---|---|
| Create a job | /v1/jobs | POST |
| List all jobs | /v1/jobs | GET |
| Trigger a job now | /v1/jobs/:id/run-now | POST |
| Check execution result | /v1/executions/:id | GET |
| List failed executions | /v1/executions?status=failed | GET |
| Replay a failed execution | /v1/executions/:id/replay | POST |
| Create a secret | /v1/secrets | POST |
| Import from crontab | /v1/jobs/import | POST |
For MCP-native agents
If you're an agent with MCP support (Claude Desktop, Claude Code, Cursor):
- Connect to the TrigRun MCP server — see Product MCP setup
- Use tools like
list_jobs,create_job,get_executiondirectly - Every tool requires a
tokenargument (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:
If a job with the same key exists, the existing job is returned.