Connect your AI agent to Linear so it acts on issue mentions and assignments — replying with comments, updating issues, and emitting agent activities.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
- CLI
- YAML
- Python SDK
Linear Setup
Create OAuth App or API Key
In Linear, go to Settings → API → Create OAuth App or Personal API Key. OAuth tokens require
Bearer prefix; API keys are sent raw.Configure Webhook
Set up a webhook pointing to
https://your-host:8080/webhook with these events:- AgentSession (for mentions/assignments)
- Comment (for comment threads)
- Issue (for issue updates)
How It Works
| Step | Description |
|---|---|
| Webhook Reception | Linear sends AgentSession webhook when bot is mentioned or assigned |
| Signature Verification | HMAC-SHA256 signature check with 60-second timestamp validation |
| Issue Processing | Agent analyzes issue title, description, and requirements |
| Tool Execution | Agent uses Linear and GitHub tools to implement solutions |
| Response Delivery | Bot posts comments back to Linear with progress updates |
User Interaction Flow
Alice assigns issue ENG-42 “Add user authentication to API” to the bot. The bot:- Receives webhook → AgentSession event triggers the bot
- Analyzes issue → Reads title, description, and acceptance criteria
- Plans implementation → Breaks down into authentication middleware, tests, docs
- Posts status comment → “Working on authentication implementation…”
- Executes solution → Creates GitHub branch, writes code, adds tests
- Updates Linear → Comments with PR link and implementation summary
- Creates activity → Records bot response in Linear’s agent activity log
OAuth vs API Key Authentication
| Auth Type | Header Format | Use Case |
|---|---|---|
| OAuth Token | Authorization: Bearer <token> | Team integrations, shared bots |
| Personal API Key | Authorization: <key> (raw) | Individual developer bots |
OAuth tokens take precedence. If
LINEAR_OAUTH_TOKEN is set, LINEAR_API_KEY is ignored.Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
token | str | "" | Linear OAuth token or API key |
agent | Agent | None | Agent instance to handle messages |
config | BotConfig | Auto-created | Bot configuration object |
signing_secret | str | "" | Webhook HMAC verification secret |
webhook_port | int | 8080 | Port for webhook HTTP server |
webhook_path | str | "/webhook" | Path for webhook endpoint |
Built-in Commands
The Linear bot includes these slash commands:| Command | Description |
|---|---|
/status | Show bot status, uptime, and Linear connection info |
/new | Reset conversation session and start fresh |
/help | Display available commands and bot capabilities |
Webhook Security
The bot implements Linear’s recommended security measures:- HMAC-SHA256 signature verification using webhook secret
- 60-second replay protection via timestamp validation
- HTTPS enforcement recommended for production webhooks
Linear Tools
The following Linear tools work with the bot for comprehensive issue management:| Tool | Description |
|---|---|
linear_search_issues | Search Linear issues by text, status, or team |
linear_get_issue | Get detailed issue information by ID |
linear_add_comment | Add comments to Linear issues |
linear_update_issue | Update issue status, assignee, or properties |
linear_list_teams | List all teams in the Linear workspace |
linear_list_issue_states | Get available issue states for workflow |
Common Patterns
Read-Only Triage Bot
Read-Only Triage Bot
Perfect for issue categorization and initial analysis without modifications:
Full Coder Bot with GitHub Integration
Full Coder Bot with GitHub Integration
Complete development workflow from Linear issues to GitHub pull requests:
Gateway Multi-Bot Setup
Gateway Multi-Bot Setup
YAML configuration for gateway deployment:
Best Practices
Always Configure Webhook Secrets
Always Configure Webhook Secrets
Use
LINEAR_WEBHOOK_SECRET to enable HMAC signature verification. This prevents replay attacks and ensures webhook authenticity.Scope OAuth Tokens Appropriately
Scope OAuth Tokens Appropriately
Grant minimum required permissions. For read-only bots, use tokens with limited scopes. For coding bots, ensure write access to issues and comments.
Use HTTPS in Production
Use HTTPS in Production
Deploy webhook endpoints behind HTTPS reverse proxies. Never expose HTTP webhook endpoints to the internet.
Rotate Secrets Regularly
Rotate Secrets Regularly
Implement secret rotation for both OAuth tokens and webhook secrets. Update Linear webhook configurations when rotating.
Related
Messaging Bots
Platform support and bot protocols
Bot Gateway
Multi-platform bot orchestration
Linear Tools
Complete Linear API tool reference
CLI Bot Command
Command-line bot management

