Get started
Mitosis for developers
The four developer surfaces: MCP server, REST API, CLI, and TypeScript SDK.
Cortex is a knowledge graph that belongs to one team. It takes what a team has already written (mail, calendar, documents, contacts, chat history, notes), does the expensive semantic work once while ingesting it, and then serves it to agents as scored, typed, cited evidence.
Two properties are worth knowing before you write any code:
- The work happens at ingest. Embedding and extraction are paid once per item, no matter how many agents read it later.
- There is no LLM at query time. A query runs vector kNN, full-text and a one-hop graph expansion, fused with reciprocal rank fusion. You get evidence; your agent does the reasoning.
What Cortex is is the five-minute version of the whole model.
Sixty seconds
Put something into a cortex, then ask it back. Same loop in three surfaces:
import { MitosisClient } from '@mitosislabs/sdk';
const client = new MitosisClient({
endpoint: 'https://m.mitosislabs.ai',
apiKey: process.env.MI_API_KEY,
});
const [office] = await client.offices.list();
const cortex = client.cortex(office.id);
// Ingest
const { feedKey } = await cortex.ensureFeed(office.id, 'handbook');
await cortex.pushRows(office.id, feedKey, [{
external_id: 'handbook:pricing',
title: 'Pricing policy',
content: 'Solo moved to $19.99 per seat in July 2026.',
}], { deferEmbed: true });
// Query
const answer = await cortex.answer(office.id, { query: 'what did pricing move to?' });
console.log(answer.results[0].preview, answer.results[0].universal_id);npx -y -p @mitosislabs/sdk@latest mi login
OFFICE=$(mi offices list | jq -r '.[0].id')
mi cortex ingest ./handbook/pricing.md --office "$OFFICE" --feed handbook
mi cortex ask "what did pricing move to?" --office "$OFFICE"claude mcp add --transport http mitosis https://mitosislabs.ai/api/mcp
# then, from the agent:
# cortex_ask({ question: "what did pricing move to?" })
# cortex_remember({ text: "Solo is $19.99/seat as of July 2026." })The full worked loop, with batching, local files, provenance on write-back and the plain-HTTP equivalents, is in ingest and query.
The four ways in
The graph is one thing. These are four ways to reach it, on the same data and the same auth. Pick whichever fits where your code runs.
MCP server
Streamable HTTP at /api/mcp. The route most agents take. Claude, ChatGPT,
Cursor and Grok connect to it directly, with OAuth 2.1 and open client
registration.
REST API
Nine public operations under /api/v1. Read endpoints need no credential.
RFC 9457 problem+json errors, rate-limit headers, Idempotency-Key support.
CLI
mi ships inside the SDK package. The fastest way to query a memory from a
terminal or a shell script.
TypeScript SDK
@mitosislabs/sdk. Full control over offices, agents, tasks, files,
integrations and credits.
What lives in a cortex
A cortex (an office, in the API, and a memory in the docs) is one graph
belonging to one person or team. Connecting a source (Gmail, Calendar and Drive
through Google Workspace, plus WhatsApp, GitHub, Notion and Obsidian) ingests its
contents, embeds them, and links them into the graph. Agents then read the graph through any of the four surfaces above, and
write back to it with cortex_remember.
Retrieval returns nearest matches, not a thresholded set. A question whose answer lives in a source the user never connected comes back with the closest thing in the graph rather than with nothing, so responses carry explicit source-gap signals that tell you when the answer is missing rather than merely poor.
Each office is its own namespace, database and pods. Data does not flow between cortexes; see cortexes and access.
Concepts worth reading first
Why not files
Identity, relationships, provenance and ranking: the four things a folder of notes cannot carry.
Typed entities
How a flat row becomes a node, and why canonical normalization is the whole trick.
How Cortex re-fits data
The derivation ladder, re-enrichment on rule change, and the consolidation cycle.
Context and inference cost
Why paying for inference once at ingest beats paying for it on every query.
Start here
Connect an agent to a memory
The quickstart gets an MCP client answering questions from a real graph in about five minutes.
Get a credential
Public endpoints need none. Everything touching a memory does. See authentication.
Build against the sandbox
dev.mitosislabs.aimirrors every production surface with disposable data and no billing side effects.
Machine-readable surfaces
Agents that discover services on their own can start from any of these:
| Document | What it carries |
|---|---|
/openapi.json | OpenAPI 3.1 spec for the public API |
/.well-known/mcp/server-card.json | MCP server card (SEP-1649), mirrors tools/list |
/auth.md | How an agent registers and authenticates |
/llms.txt | Service summary for language models |
/.well-known/agent-skills/index.json | Installable agent skills |
/.well-known/agent-card.json | A2A agent card |