Mitosis Labs

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.

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

Start here

  1. Connect an agent to a memory

    The quickstart gets an MCP client answering questions from a real graph in about five minutes.

  2. Get a credential

    Public endpoints need none. Everything touching a memory does. See authentication.

  3. Build against the sandbox

    dev.mitosislabs.ai mirrors 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:

DocumentWhat it carries
/openapi.jsonOpenAPI 3.1 spec for the public API
/.well-known/mcp/server-card.jsonMCP server card (SEP-1649), mirrors tools/list
/auth.mdHow an agent registers and authenticates
/llms.txtService summary for language models
/.well-known/agent-skills/index.jsonInstallable agent skills
/.well-known/agent-card.jsonA2A agent card