Integrations
The 3-part integration pattern — Secret + Knowledge Doc + Primitive. GitHub, Linear, Slack, Stripe examples.
No integration is hard-coded. Every external service follows the same 3-part pattern: Secret + Knowledge Doc + Primitive. Infinitely extensible without writing code.
The 3-Part Integration Pattern
Integration = Secret + Knowledge Doc + Primitive
1. SECRET → /company/secrets/{service}.yaml
API key + allowed agents list
2. KNOWLEDGE DOC → /company/knowledge/integrations/{service}.md
API docs, endpoints, conventions, examples
3. TOOL → Agent calls http() or MCP server tool
Orchestrator auto-injects credentialsWhy This Works
- Infinitely extensible -- add any integration without code changes
- Agent-native -- agents learn from knowledge docs, not hard-coded adapters
- Secure -- secrets are scoped per agent
- Debuggable -- every API call is logged
- No vendor lock-in -- switch from Linear to Jira by changing the knowledge doc
Integration Examples
GitHub (MCP Server)
GitHub is best integrated via its MCP server, which provides typed tools like create_pull_request, search_code, and create_issue.
Linear (fetch + GraphQL)
Linear uses a GraphQL API. Agents learn the query format from the knowledge doc and call it via fetch.
Slack (Webhook)
Slack can be used two ways: outbound messages via the Bot API, and inbound events via webhooks that trigger agents.
Stripe (http + Secret)
Stripe uses a REST API with form-urlencoded bodies. The secret provides the API key; the knowledge doc teaches agents the endpoint patterns.
When to Use MCP vs http
| Method | When to Use | Examples |
|---|---|---|
MCP server | Well-maintained MCP server exists | GitHub, Figma, Playwright |
http + secret | Any REST or GraphQL API | Linear, Stripe, Slack |
run_command | A CLI tool exists on the host | kubectl, terraform, gh |
Agent SDK built-in | Web browsing and search | WebSearch, WebFetch |
Integration Checklist
- Add the secret --
autopilot secrets add <service> - Write the knowledge doc -- create
knowledge/integrations/<service>.md - Set allowed agents -- decide which agents need access
- (Optional) Configure MCP -- if an MCP server exists
- (Optional) Add webhooks -- if the service sends events
- Test it -- give an intent that uses the integration