Dashboard
Render synced data from your database, act on it with live API calls.
Agent
Hand an LLM the whole integration surface as tools and let it decide.
Knowledge base
Search everything you’ve synced and answer questions from it.
Workflow
An event in one service triggers actions in another.
The one contract
Every shape rests on the same rule. Each plugin exposes two namespaces:corsair.<plugin>.[db|api].<group>.<method>(args).
Every
.api response is upserted into your database automatically, and webhooks update the same rows in place. That’s why .db is the default for reads. It isn’t a cache you maintain, it’s a table Corsair keeps current. See Database.
Picking a shape
The deciding question is who chooses the operation. If you know at build time which endpoint to call, it’s a dashboard, knowledge base, or workflow, all plain TypeScript. If the operation is only known at runtime from a human sentence, it’s an agent, and you expose tools over MCP instead of hardcoding calls.
Combining shapes
Most real apps are two or three of these. A GitHub review tool might list open PRs (dashboard), let you say “close #458 as a duplicate” (agent), and post to Slack when a PR is merged (workflow). When you combine them, they share one foundation. Build it once:One corsair.ts
A single createCorsair call listing every plugin you need.
One handler route
The management and Hub delivery endpoint, mounted once.One connection per tenant
A plugin connected for a tenant is available to every shape in the app. Do not create a second Corsair instance for the chat feature, and don’t connect the same plugin twice. The agent reads and writes the samecorsair_entities rows the dashboard renders, which is what lets a chat command show up on the page immediately.
The shapes differ in reads, not in setup. If you’ve finished Quick Start, you already have everything all four need.
Shared setup
Every use case assumes this much is done:1
Install and configure
createCorsair({ plugins, database, kek, hub }) in src/server/corsair.ts, with the five tables migrated. Full walkthrough in Quick Start.2
withTenant() and start reading. Multi-tenant details are in Multi-tenancy.
What’s next
Quick Start
The shared foundation, in five steps.
Build with your agent
Point a coding agent at these docs and have it scaffold the app.
Plugins
Every integration, with its install id and endpoint reference.
Database
The five tables and how they stay fresh.