Build AI agents in Linear with Trigger.dev
Build AI agents that run in Linear. Assign one an issue or @mention it, and it gets to work, from triaging a bug to writing the fix.
Two-way, not just webhooks in
Webhooks bring Linear events in, and the connector answers back in the same place.
Linear agents
@trigger.dev/linear- A @mention in an issue
- An issue assigned to the agent
- Follow-up prompts and approval choices
- Thoughts and actions as the agent works
- A plan, and an approval card when it needs a decision
- A response when it's done, all in Linear's agent session UI
Handled for you
Verification, the 5-second acknowledgement, the first activity Linear expects within 10 seconds, and dedup of Linear's retries.
What your agent can do
Each session is durable
Every Linear agent session becomes a Trigger.dev session. The user's prompt runs as a turn, and follow-ups in the session keep the context.
What the agent sees
On the first turn the model gets who summoned it and on which issue, your workspace's guidance for agents, the issue's context and comments, and the comment that mentioned it.
What Linear shows
A thought when a turn starts, each tool call as an action with its result, the reply as a response, and an error if a turn fails. Tool mirroring is on by default.
A plan the model keeps up to date
Add linearPlanTool() and Linear shows the agent's plan as a checklist, updated as steps finish.
Approvals and choices
A tool with no execute posts an approval card with Approve and Deny. interactions gives a tool its own options, and the choice resumes the run.
Stop
Pressing Stop in Linear aborts the running turn, and the text written so far posts as the response.
Prompts while it's working
A prompt sent mid-turn gets a thought straight away ("Got it, I'll take that into account.") and runs next, or is folded into the work in progress.
Helpers for full control
Post a thought or an action, replace the plan, add a link to the session header, or set its summary.
Answer from anywhere
Another webhook routed to the same session, a Sentry alert keyed on the issue for example, can answer into the Linear session as a response.
Get started
- 1
Set up the agent
Copy the starter prompt into your coding agent, like Claude Code, Cursor or Codex. It creates a Trigger.dev project and writes your Linear agent. Prefer to write it yourself? Start from the example below.
- 2
Create a Linear app
In Linear, under Settings, API, create an OAuth app with agent session webhooks turned on, and set its webhook URL to your agent's Trigger.dev URL.
- 3
Install it as an agent
A workspace admin installs the app as an agent, so people can assign it issues and @mention it. Then copy its signing secret into Trigger.dev.
- 4
Try it
Assign an issue to the agent, or @mention it in a comment. Linear shows its first thought within a few seconds, then its work.
Example
A Linear triage agent
One endpoint for Linear's agent session events, and an AI agent with tools and a plan that Linear shows as a checklist.
Related integrations
Ready to put your agent in Linear?
Declare an endpoint, run trigger dev, and paste the URL into your app's settings.


