Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt

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

Connecting Linear to AgentRail lets you import Linear issues directly into the AgentRail task lifecycle. Once imported, issues go through the routing engine, which evaluates your configured routing rules to assign the task to the right agent. Run agentrail provider connect linear to set this up.

Connect Linear

agentrail provider connect linear
The interactive setup prompts for your Linear API key in a hidden prompt, validates credentials, runs provider readiness checks, and reports any blockers it cannot resolve automatically.
For non-interactive environments such as CI pipelines, set the LINEAR_API_KEY environment variable before running the connect command.
export LINEAR_API_KEY=lin_api_...
agentrail provider connect linear

Import a Linear issue

After connecting, import issues into AgentRail using the identifier, full Linear URL, or UUID:
agentrail linear import ENG-123
AgentRail fetches the issue from Linear, normalizes it into an AgentRail task candidate, and passes it through the routing engine.

How routing works

Imported issues do not automatically become assigned tasks. They go through AgentRail’s routing engine, which evaluates your configured routing rules to decide which agent should handle the work.
If routing is not configured, AgentRail fails closed. It does not create hidden unassigned work. Set up routing rules before importing issues to ensure they are assigned correctly.
To configure routing, run agentrail init and follow the routing setup prompts, or use agentrail agent create to add a routing rule for a specific agent.

Verify the connection

Check the health of your Linear connection:
agentrail provider doctor linear
You can also check all connected providers at once:
agentrail provider status
agentrail provider doctor

Troubleshooting

SymptomLikely causeFix
Imported issue is not assignedRouting is not configuredRun agentrail init or agentrail agent create to create a routing rule, then reimport.
401 or credential errorLINEAR_API_KEY is missing or invalidConfirm the key is set and re-run agentrail provider connect linear.
Import command returns no taskIssue already imported or routing failed closedCheck routing config with agentrail doctor and inspect routing audit records.