Linear
Developer Reference
This page covers internal implementation details. It is not included in the User Guide.
Linear is a routing target in the integrations agent. The agent classifies user queries as linear and forwards them to the code-gen agent for Python script generation.
Repo
escher-dbai/v4-integrations-agent-go — internal/integrations/linear/handler.go
Flow
User query (NL)
│
▼
Gateway detects "integration query" (generic)
│
▼
Integrations Agent
Phase 1 (Haiku): classifier emits {"integration": "linear", ...}
│
▼
Linear handler:
- emits SSE thinking_state
- constructs CodeGenRequest{ Action: "linear", UserQuery, ConversationContext, ... }
- calls Code-Gen Agent (POST /api/v1/generate-playbook)
- proxies the SSE response back to the clientThe handler is ~50 LOC. It does not implement Linear-specific business logic — it routes and proxies. All Linear API knowledge lives in the code-gen agent's prompt set, which generates Python scripts that talk to the Linear GraphQL API.
Adding capability
To extend what Escher can do in Linear, the lever is the code-gen agent's prompt corpus for action: "linear". The handler in this repo never changes when capability extends — only the prompts the code-gen agent uses.
To replace the routing model (e.g., add classifier examples to improve linear classification accuracy), edit prompts/integration-classifier.txt in this repo.
What's not in this code
- Field-mapping engine (Finding → Linear issue field translation)
- Two-way sync (Linear status changes back to Finding)
- Persistent OAuth installation
- Webhook receivers
These are all roadmap or out of scope. Today's shipped behaviour: query → script → script runs from the client.
See also
- Slack — handled in-house, not via code-gen
- Jira — same routing pattern as Linear
- Integrations Agent contract — request/response schemas