Build custom integrations with the Context Pilot API. Open source, MIT licensed, self-hosted.
Context Pilot is open source under the MIT License. Full API docs and source code on GitHub. No registration required — everything runs on your own instance.
All requests require a Bearer token. Generate tokens in Settings > API Keys.
Authorization: Bearer cp_xxxxxxxxxxxxx
Include in every request. Tokens are scoped to profiles and can be revoked anytime.
/api/v1/items
List all items. Supports pagination, filtering by tags, workspace, and date range.
/api/v1/items/:id
Get a single item by ID with content, metadata, tags, and version history.
/api/v1/items
Create a new item. Accepts Markdown content, tags, TTL, and metadata.
/api/v1/items/:id
Update an item. Creates a new version in the history.
/api/v1/items/:id
Delete an item. Optional soft-delete with recovery period.
/api/v1/search
Full-text, semantic, and hybrid search. Filter by tags, workspace, connector, and date range.
/api/v1/search/similar
Find items similar to a given item or text using vector embeddings.
/api/v1/assemble
Assemble context with a token budget. Returns compressed, ranked knowledge for your AI's context window.
/api/v1/assemble/formats
List available export formats: claude-md, copilot-md, markdown, json, zip.
/api/connectors
List all 17 connectors with status, last sync time, item counts, and configuration.
/api/connectors/{name}/history
Sync history for a connector: timestamps, item counts, duration, and error details per run.
/api/connectors/health
Health dashboard: aggregated status, error counts, last successful sync, and uptime metrics.
/api/v1/connectors/:id/sync
Trigger an immediate sync for a specific connector.
/api/templates
List all context templates with their tags, workspaces, token budget, compression, and weights.
/api/templates
Create a new template with name, tags, workspaces, token budget, compression, and block weights.
/api/templates/{name}
Delete a context template by name.
/api/templates/{name}/assemble
Assemble context using a saved template with its compression settings and block weights.
/api/templates/suggest
Auto-suggest templates based on query or workspace context. Returns ranked recommendations.
/api/v1/profiles
List all profiles with item counts and last activity.
/api/v1/profiles
Create a new profile. Profiles provide isolated knowledge namespaces.
/api/v1/export
Export your knowledge base. Formats: JSON, Markdown, ZIP. Includes metadata and history.
/api/v1/import
Import from a Context Pilot export file (ZIP/JSON). Merge or replace existing items.
/api/v1/webhooks
List all configured webhooks.
/api/v1/webhooks
Create a webhook. Events: item.created, item.updated, item.deleted, sync.completed, assembly.completed.
MCP tools exposed at /sse. Use with Claude Code, VS Code, JetBrains, or any MCP client.
search
Search knowledge items by query, tags, or workspace.
retrieve
Retrieve a specific knowledge item by ID.
assemble
Assemble context with token budget and compression.
tag
Add or remove tags from knowledge items.
list_templates
List all saved context templates with their configuration.
assemble_template
Assemble context using a named template with saved compression and weight settings.
suggest_templates
Auto-suggest templates based on current query or workspace context.