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
| 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://docs.trigrun.com/llms.txt | Markdown | Concise API summary for LLM context windows |
| llms-full.txt | https://docs.trigrun.com/llms-full.txt | Markdown | Complete documentation in one file |
| Docs index | https://docs.trigrun.com/docs-index.json | JSON | Page index with slugs, titles, descriptions |
| MCP server | See Product MCP | MCP protocol | Operate TrigRun 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 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:
If a job with the same key exists, the existing job is returned.