Skip to content

Linear Setup

This guide walks you through connecting Itervox to your Linear workspace so AI agents can pick up issues and resolve them automatically.

  • A Linear workspace with at least one team and project
  • A Linear Personal API key (see below)
  • The itervox binary installed and available on your $PATH
  • The repository you want agents to work in checked out locally
  1. Open Linear and go to Settings → API.
  2. Under Personal API keys, click Create new API key.
  3. Give the key a descriptive label (e.g. itervox-local) and click Create.
  4. Copy the key immediately — it will not be shown again.

Store the key in an environment variable rather than hard-coding it:

Terminal window
export LINEAR_API_KEY="lin_api_xxxxxxxxxxxxxxxxxxxx"

The project slug identifies which Linear project Itervox should poll. You can find it in two ways:

  1. From Linear URLs — it is the short identifier shown in issue prefixes (e.g. issues prefixed ENG- belong to the ENG project slug)
  2. From the dashboard — start the daemon without a project_slug and use the web dashboard’s project dropdown to browse available projects interactively

What Itervox reads is the AND of three optional filters in the tracker block:

tracker:
kind: linear
api_key: $LINEAR_API_KEY
project_slug: my-project # optional: one project (omit for every project)
assignee: me # optional: me (the API key's user), a user id, or an email
team: ENG # optional, with assignee: only this team (key or id)
labels: ["agent", "bot"] # optional: issues carrying ANY of these labels
  • Only project_slug — that project’s issues, exactly as before. Nothing set — every project, as before.
  • Only assignee — the issues assigned to that user in any project of any team the key can read; team narrows it to one team. me resolves to the API key’s own user (Linear’s viewer): create a dedicated “Itervox” Linear user, generate the key as that user, and assign tickets to it to hand them to the agents; reassign a ticket to take it back. An email resolves through Linear’s user list; anything else is a user id. The user is resolved once at startup and on every WORKFLOW.md reload, and cached; a user that does not resolve fails the polls (it never widens to every issue).
  • project_slug + assignee — the intersection: that user’s issues inside the project (or projects).
  • labels — ANDed with the above: an issue must carry at least one of the listed labels.
  • active_states, terminal_states, working_state, completion_state and backlog_states keep their meaning.
  • Every read uses the same scope: the poll, the tracker store’s full and incremental pulls, webhook refreshes, the dependency analyzer’s issue set and automation polls.
  • Leaving the scope mid-run — an issue reassigned to someone else, whose matching label is removed, or that is moved to another project while an agent works on it: the running worker finishes, no new run (or retry) is dispatched, and the dashboard marks the run “out of scope”. Bring it back into scope and it is picked up again.
  • The agent’s own writes — state moves, comments, the branch name, follow-up issues — never set an assignee, so a run cannot push its own issue out of scope. Follow-up issues an agent creates are unassigned until a person routes them.
  • At runtime the dashboard’s Settings → Tracker Scope card has three independent controls — projects (or all), assignee (anyone, me, or a user from your workspace; resolved before saving) and labels — and saving writes project_slug, assignee and labels to WORKFLOW.md (a cleared key is commented out) without a reload. The dashboard header shows the active scope, e.g. ENG · assigned to me · label: agent.
  • itervox doctor checks that the assignee resolves to a user the key can see (exit 1 if not, or if team names no team the key can read) and that the key can read the issues assigned to that user across its teams.
  • tracker.sync (the local issue sync) accepts assignee and labels with its required project_slug: they narrow the project it pulls from.

The keys above are one AND of three filters. For anything else — several required labels, excluded labels, OR across fields, teams, priority, states, cycles or milestones — write tracker.filter instead (#198): a list of groups, every condition in a group must match, and an issue is read when any group matches.

tracker:
kind: linear
api_key: $LINEAR_API_KEY
filter:
- projects: [eng-platform] # the agent lane of one project…
labels_any: [agent, ai]
labels_none: [blocked, needs-human]
- assignee: me # …OR anything assigned to the bot
- teams: [OPS] # …OR urgent ops work in the current cycle
priority: [1]
cycle: current
  • Conditions: projects, teams (key or id), assignee (me, a user id or an email), labels_any, labels_all, labels_none, priority (0 none, 1 urgent, 2 high, 3 normal, 4 low), states (narrows active_states; working_state always stays in, so a dispatched issue is not lost), cycle (current or a cycle id) and milestone (a project milestone name). See the configuration reference.
  • filter replaces project_slug, assignee, team and labels; setting both is a config error naming the keys. The legacy keys mean exactly the one group {projects, assignee, teams (with the assignee), labels_any}.
  • Itervox compiles the filter to one Linear IssueFilter ({or: [{and: [...]}, ...]}), so the poll, the store’s pulls, the webhook refresh, the dependency analyzer and automation polls read the same issues. labels_all requires each label (one labels.some per label); labels_none keeps unlabelled issues.
  • Settings → Tracker Scope is a group builder: add or remove groups, add conditions with pickers fed by your projects, teams, labels and users, with AND inside a group and OR between groups marked, and a live count of the issues the draft matches (read-only, refreshed as you edit). Saving writes tracker.filter to WORKFLOW.md as one line and comments the legacy keys out, without a reload. The header summarises it, e.g. eng-platform · agent|ai · ¬blocked ¬needs-human OR me.
  • itervox doctor validates the filter, resolves its assignees and prints how many issues in the active states it matches.

Run the init command from the root of your repository:

Terminal window
itervox init --tracker linear

This creates a WORKFLOW.md file with YAML front matter and a default Liquid prompt template. Open the file and fill in the required fields.

Linear workflows are fully customisable, so you need to tell Itervox which states mean “work to do”, which mean “finished”, and which states to surface in the dashboard.

A typical configuration looks like this:

---
itervox_schema_version: 2
tracker:
kind: linear
api_key: $LINEAR_API_KEY # resolved from env at runtime
project_slug: my-project # the slug from the previous step
# assignee: me # optional: also only issues assigned to this user
# labels: ["agent"] # optional: also only issues with any of these labels
# States that trigger agent dispatch (issues in these states get picked up)
active_states:
- Todo
# State to transition the issue to when an agent starts working on it
working_state: "In Progress"
# State to transition the issue to when the agent finishes successfully
completion_state: "In Review"
# States that permanently stop the issue from being re-dispatched
terminal_states:
- Done
- Cancelled
- Duplicate
# States shown as the leftmost column(s) in the dashboard (defaults to ["Backlog"])
backlog_states:
- Backlog
# State to move issues to when max retries are exhausted (optional)
failed_state: "Blocked"
agent:
max_concurrent_agents: 3
polling:
interval_ms: 30000 # poll every 30 seconds
---
You are an AI agent resolving Linear issue {{ issue.identifier }}: {{ issue.title }}.
{{ issue.description }}
Complete the task, push your changes, and open a pull request.
FieldDefaultDescription
active_states["Todo", "In Progress"]Issues in these states are dispatched to agents
working_state"In Progress"Issue is moved here when an agent starts
completion_state(empty)Issue is moved here on success; leave empty to skip
terminal_states["Closed", "Cancelled", "Canceled", "Duplicate", "Done"]Issues in these states are never re-dispatched
backlog_states["Backlog"]Shown in the leftmost dashboard column(s)
failed_state(empty)Issue is moved here after max retries; leave empty to pause instead

From the directory containing WORKFLOW.md:

Terminal window
itervox

Itervox starts polling Linear every interval_ms milliseconds. When it finds an issue in an active_states state it spawns an agent and transitions the issue to working_state.

Open the dashboard at http://localhost:8090 to watch issues move through the board in real time.

Backlog ──(manual move)──► Todo ──(Itervox picks up)──► In Progress
│
┌────────────────────────┤
│ │
(success) (max retries)
│ │
▼ ▼
In Review Blocked
│
(human merges)
│
▼
Done

If you want at most one agent running in In Progress at any time:

agent:
max_concurrent_agents: 10
max_concurrent_agents_by_state:
"In Progress": 1

Without failed_state, issues that exhaust their retry budget are paused — they stay in their current state but Itervox stops dispatching them. Setting failed_state gives them a dedicated state so they are easy to find in Linear.

The default is 30 seconds (30000 ms). For faster feedback during development you can lower it, but be mindful of Linear API rate limits.

polling:
interval_ms: 10000 # poll every 10 seconds

If Linear does rate-limit Itervox (it answers with HTTP 400 and a RATELIMITED error), Itervox reads Linear’s published reset time and stops sending requests until then. Queued comments and state changes wait in the outbox, show a rate limited until HH:MM chip in the dashboard, and are delivered once the window lifts — never dropped and never posted twice. When the window lifts, writes go ahead of polling reads.