Skip to main content

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.

Connect your AI agent to Linear so it acts on issue mentions and assignments — replying with comments, updating issues, and emitting agent activities.

Quick Start

1

Set Environment Variables

export LINEAR_OAUTH_TOKEN="your-linear-oauth-token"
export LINEAR_WEBHOOK_SECRET="your-webhook-secret"
2

Start Linear Bot

praisonai bot linear --token $LINEAR_OAUTH_TOKEN --signing-secret $LINEAR_WEBHOOK_SECRET
3

Configure Linear Webhook

Configure your Linear webhook to point to http://your-host:8080/webhook with AgentSession, Comment, and Issue events enabled.

Linear Setup

1

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.
2

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)
3

Copy Signing Secret

Save the webhook signing secret for HMAC-SHA256 verification and 60-second replay protection.

How It Works

StepDescription
Webhook ReceptionLinear sends AgentSession webhook when bot is mentioned or assigned
Signature VerificationHMAC-SHA256 signature check with 60-second timestamp validation
Issue ProcessingAgent analyzes issue title, description, and requirements
Tool ExecutionAgent uses Linear and GitHub tools to implement solutions
Response DeliveryBot 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:
  1. Receives webhook → AgentSession event triggers the bot
  2. Analyzes issue → Reads title, description, and acceptance criteria
  3. Plans implementation → Breaks down into authentication middleware, tests, docs
  4. Posts status comment → “Working on authentication implementation…”
  5. Executes solution → Creates GitHub branch, writes code, adds tests
  6. Updates Linear → Comments with PR link and implementation summary
  7. Creates activity → Records bot response in Linear’s agent activity log

OAuth vs API Key Authentication

Auth TypeHeader FormatUse Case
OAuth TokenAuthorization: Bearer <token>Team integrations, shared bots
Personal API KeyAuthorization: <key> (raw)Individual developer bots
OAuth tokens take precedence. If LINEAR_OAUTH_TOKEN is set, LINEAR_API_KEY is ignored.

Configuration Options

OptionTypeDefaultDescription
tokenstr""Linear OAuth token or API key
agentAgentNoneAgent instance to handle messages
configBotConfigAuto-createdBot configuration object
signing_secretstr""Webhook HMAC verification secret
webhook_portint8080Port for webhook HTTP server
webhook_pathstr"/webhook"Path for webhook endpoint
For complete bot configuration options, see the messaging bots documentation.

Built-in Commands

The Linear bot includes these slash commands:
CommandDescription
/statusShow bot status, uptime, and Linear connection info
/newReset conversation session and start fresh
/helpDisplay available commands and bot capabilities

Webhook Security

Always set LINEAR_WEBHOOK_SECRET for production deployments. Missing secrets disable signature verification and log security warnings.
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:
ToolDescription
linear_search_issuesSearch Linear issues by text, status, or team
linear_get_issueGet detailed issue information by ID
linear_add_commentAdd comments to Linear issues
linear_update_issueUpdate issue status, assignee, or properties
linear_list_teamsList all teams in the Linear workspace
linear_list_issue_statesGet available issue states for workflow
See the complete Linear tools documentation for detailed usage examples.

Common Patterns

Perfect for issue categorization and initial analysis without modifications:
agent = Agent(
    name="Triage Assistant",
    instructions="Analyze incoming issues and provide initial categorization",
    tools=["linear_search_issues", "linear_add_comment"],
    auto_approve_tools=True
)
Complete development workflow from Linear issues to GitHub pull requests:
agent = Agent(
    name="PraisonAI Coder", 
    instructions="Implement solutions for Linear issues",
    tools=[
        "linear_search_issues", "linear_get_issue", "linear_add_comment",
        "linear_update_issue", "github_create_branch", "github_commit_and_push",
        "github_create_pull_request", "read_file", "write_file", "execute_command"
    ],
    memory=True,
    web_search=True
)
YAML configuration for gateway deployment:
platform: linear
channels:
  - name: "engineering"
    token: ${LINEAR_ENG_TOKEN}
    signing_secret: ${LINEAR_ENG_SECRET}
  - name: "design" 
    token: ${LINEAR_DESIGN_TOKEN}
    signing_secret: ${LINEAR_DESIGN_SECRET}

Best Practices

Use LINEAR_WEBHOOK_SECRET to enable HMAC signature verification. This prevents replay attacks and ensures webhook authenticity.
Grant minimum required permissions. For read-only bots, use tokens with limited scopes. For coding bots, ensure write access to issues and comments.
Deploy webhook endpoints behind HTTPS reverse proxies. Never expose HTTP webhook endpoints to the internet.
Implement secret rotation for both OAuth tokens and webhook secrets. Update Linear webhook configurations when rotating.

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