Skip to main content

Linear Tracker Plugin

The Linear tracker plugin integrates with Linear’s issue tracking system, allowing Agent Orchestrator to manage tasks, track progress, and update issue state as agents work.

Overview

This plugin uses Linear’s GraphQL API and supports two authentication methods:
  1. Direct API: Using LINEAR_API_KEY environment variable
  2. Composio SDK: Using COMPOSIO_API_KEY for integrated workflow automation
The plugin automatically detects which method is available and routes requests accordingly.
Linear uses alphanumeric identifiers (e.g., INT-1234) rather than numeric issue numbers. Branch names follow the convention feat/INT-1234.

Configuration

Configure the Linear tracker plugin in your agent-orchestrator.yaml:

Configuration Options

string
required
Linear team UUID. Required for creating issues and filtering by team.Find your team ID in Linear’s URL or via the API.
string
Linear workspace URL slug for generating issue URLs.Example: If your Linear URL is https://linear.app/my-workspace/issue/INT-123, the slug is my-workspace.

Requirements

Prerequisites:
  • LINEAR_API_KEY environment variable (for direct API access) OR
  • COMPOSIO_API_KEY environment variable (for Composio SDK)
  • Network access to https://api.linear.app/graphql

Authentication Setup

Option 1: Direct API Key
Option 2: Composio SDK

Finding Your Team ID

Or use the Linear CLI:

Features

Issue Operations

Get Issue Fetch a single issue by identifier:
List Issues List issues with filters:
The Linear API automatically filters by teamId from the project config, so you only see issues for your team.
Create Issue Create a new issue:
Update Issue Update issue state, labels, assignee, or add comments:

Issue State Mapping

Linear State Type → Tracker State:
Linear has rich workflow states. The plugin maps them to standardized tracker states while preserving Linear’s native state information.

Priority Levels

Linear uses numeric priorities:

Prompt Generation

The plugin generates context-aware prompts for agents:
Example output:

Branch Naming

The plugin generates branch names from issue identifiers:
This follows Linear’s recommended convention for branch names.

Issue URLs and Labels

Usage Example

Start Agent on Issue

Auto-Update on Progress

Troubleshooting

The plugin couldn’t find authentication credentials.Solution:
The teamId field is missing from project configuration.Solution:
Find your team ID in Linear’s API explorer.
You’re using COMPOSIO_API_KEY but the SDK isn’t installed.Solution:
Or switch to direct API with LINEAR_API_KEY.
Your Linear team doesn’t have a workflow state of the required type.Linear requires specific workflow state types:
  • unstarted for “open”
  • started for “in_progress”
  • completed for “closed”
Solution: Check your team’s workflow settings in Linear and ensure you have states of each type.
Linear API requests have a 30-second timeout.Solutions:
  • Check network connectivity
  • Verify Linear API status: https://status.linear.app/
  • Check API rate limits (direct API has limits)
  • Use Composio SDK for better rate limit handling
The plugin looks up users by displayName (not email or ID).Solution:
Find display names in Linear’s user settings.
The plugin looks up labels by name for your team.Solution:
  • Create labels in Linear first (Settings → Labels)
  • Use exact label names (case-sensitive)
  • Labels are best-effort: if not found, issue is still created without them

API Reference

Tracker Interface Methods

getIssue(identifier, project)
  • Fetches issue details by Linear identifier
  • Returns: Issue object with all fields including priority
isCompleted(identifier, project)
  • Checks if issue is in completed or canceled state
  • Returns: boolean
issueUrl(identifier, project)
  • Generates Linear issue URL
  • Returns: string
issueLabel(url, project)
  • Extracts issue identifier from URL
  • Returns: string (e.g., "INT-1234")
branchName(identifier, project)
  • Generates branch name from identifier
  • Returns: string (e.g., "feat/INT-1234")
generatePrompt(identifier, project)
  • Creates context prompt for agent
  • Returns: string (formatted prompt with priority)
listIssues(filters, project)
  • Lists issues with optional filters
  • Automatically filters by teamId
  • Returns: Issue[]
updateIssue(identifier, update, project)
  • Updates issue state/labels/assignee/comments
  • Handles workflow state transitions
  • Returns: void
createIssue(input, project)
  • Creates a new issue
  • Returns: Issue (created issue)

Advanced Usage

GraphQL Transport

The plugin uses a transport abstraction that supports two backends:

Custom Workflow States

When updating issue state, the plugin:
  1. Queries your team’s workflow states
  2. Finds the appropriate state by type
  3. Updates the issue to that state

Label Management

Labels are additive: using updateIssue with labels merges them with existing labels, it doesn’t replace them.

Priority Workflow

Comment Workflow

Integration with Other Plugins

With SCM Plugin

The tracker and SCM plugins work together for full issue-to-PR workflow:
  1. Tracker generates prompt from Linear issue (with priority context)
  2. Agent writes code
  3. SCM creates PR with Linear issue link
  4. Reactions auto-close issue when PR merges

With Workspace Plugin

The tracker provides the branch name for workspace creation:

With Composio

When using Composio SDK, you get additional benefits:
  • Centralized credential management
  • Workflow automation triggers
  • Multi-tool integrations
  • Better rate limit handling

Performance Considerations

GraphQL Queries

The plugin uses optimized GraphQL queries:
  • Fetches only required fields
  • Uses variables to prevent injection
  • Batches related operations when possible

Caching

The Composio SDK client is cached:

Timeouts

All requests have a 30-second timeout to prevent hanging:
  • Direct API: native timeout in node:https
  • Composio SDK: Promise.race with timeout

Security Considerations

  • API keys are read from environment variables (never hardcoded)
  • GraphQL queries use variables (no string interpolation)
  • User input is validated before API calls
  • Team ID is required (prevents cross-team data access)
  • All requests are HTTPS-only

Source Code

Source: packages/plugins/tracker-linear/src/index.ts