The Linear integration lets you delegate issues to a LAP agent directly from the Linear UI. When you assign an issue to the configured agent app, Linear fires a webhook, the platform spawns a sandbox session, and the agent picks up the issue automatically. The round trip from delegation to the first “Picking up…” activity appearing on the issue takes roughly 1.5 seconds.Documentation Index
Fetch the complete documentation index at: https://docs.litellm-agent-platform.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Linear workspace where you have admin access
- A publicly reachable HTTPS URL for your LAP deployment (
BASE_URL) - For local development: an ngrok or cloudflared tunnel to expose
localhost
Step 1: Create the OAuth app in Linear
Go to Linear → Settings → API → Applications → Create new and fill in the following fields:| Field | Value |
|---|---|
| Name | LAP agent (or any name you prefer) |
| Developer URL | <BASE_URL> |
| Callback URLs | <BASE_URL>/api/integrations/oauth/linear/callback |
| Webhook URL | <BASE_URL>/api/integrations/webhooks/linear |
| Webhook events | Agent session events (required) |
- Client ID
- Client secret
- Webhook signing secret
read, write, app:assignable, app:mentionable) — no manual scope configuration is needed.
Step 2: Set the environment variables
Add the following to your.env file (or your deployment’s secret store) and restart the platform:
LINEAR_* variables is missing, the integration stays disabled and its routes return 404. The rest of the platform is unaffected.
Step 3: Install into your Linear workspace
Visit the authorize endpoint from a browser that is signed into the LAP dashboard:linear.app/oauth/authorize. Sign in if prompted, then click Authorize. After the OAuth exchange completes, you land on a “Linear connected for <workspace>” confirmation page and the integration is recorded in the platform.
Step 4: Bind an agent to the install
After the OAuth flow completes, you need to bind a specific LAP agent to receive delegated issues. This tells the platform which agent to use when Linear fires a webhook for your workspace.The web UI for managing agent bindings is not yet available. Contact your platform administrator to create the binding via the platform’s admin interface or API.
How it works at runtime
Linear fires the webhook
Linear sends an
AgentSessionEvent webhook to <BASE_URL>/api/integrations/webhooks/linear. The platform verifies the HMAC-SHA256 signature against LINEAR_WEBHOOK_SECRET.Platform spawns a session
The platform looks up the integration install, finds the bound agent, and calls
POST /api/v1/managed_agents/agents/{id}/session.Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
404 on /api/integrations/webhooks/linear | A LINEAR_* env var is missing | Set all three and restart the platform |
401 bad signature on the webhook | LINEAR_WEBHOOK_SECRET does not match | Re-copy the signing secret from the Linear app settings page |
404 install not found on the webhook | OAuth install never completed | Re-run step 3 |
404 no agent bound to this install | No agent binding exists for this workspace | Set up the agent binding per step 4 |
204 on the webhook (silent, no activity) | The event was an AppUserNotification, not an AgentSessionEvent | Expected for non-delegation events; no action needed |
| Thought activity never appears in Linear UI | Stale OAuth token or missing scope | Uninstall the app from Linear (Settings → Applications), then redo steps 3–4 |
| OAuth callback returns “already installed” | App was previously installed in the workspace | Uninstall from Linear → Settings → Applications, then redo step 3 |
Local development
Use a tunnel to expose your local server to Linear’s edge:BASE_URL, put the three secrets into .env, and restart: