ContextOS is the persistent memory layer for AI Agents. It provides a multi-tenant "Hive Mind" that syncs your context across tools like Claude Desktop, Cursor, and ChatGPT. Stop pasting the same architectural decisions into your promptsβtell ContextOS once, and all your agents will know it forever.
ContextOS connects your local AI environments to a persistent cloud database using the Model Context Protocol (MCP) and REST APIs. It is backed by a bleeding-edge vector engine powered by Google's TurboQuant algorithm.
graph TD
subgraph "AI Agents"
Claude[Claude Desktop]
Cursor[Cursor IDE]
ChatGPT[ChatGPT Mobile]
end
subgraph "Local Environment"
MCPServer[libro-mcp-server\nNode.js]
end
subgraph "ContextOS (Vercel + Postgres)"
API[ContextOS Edge API\nREST & SDK]
DB[(Supabase Postgres\nRelational Passports)]
end
subgraph "Vector Engine (Hugging Face Space)"
VectorAPI[FastAPI\nPython Microservice]
Turbovec[(Turbovec Index\n4-bit Quantized RAM)]
end
Claude <-->|Model Context Protocol| MCPServer
Cursor <-->|Model Context Protocol| MCPServer
MCPServer <-->|HTTP /fetch & /ingest| API
ChatGPT <-->|OpenAPI Custom Actions| API
API --> DB
API <-->|REST API| VectorAPI
VectorAPI --> Turbovec
Libro provides enterprise-grade, memory-dense vector retrieval at a fraction of the latency and infrastructure cost of standard managed solutions like Mem0 and Zep. By running our vector engine directly in RAM via Turbovec (4-bit quantization), we eliminate network round-trips to heavy managed databases like Qdrant or Pinecone.
| Framework | P90 Retrieval (ms) | Storage Engine | Memory Footprint (10M) | Self-Host Difficulty |
|---|---|---|---|---|
| Libro (Turbovec) | ~336 ms | In-Memory SIMD | 4 GB (4-bit quant) | Easy (Serverless HF Space) |
| Mem0 (Embedchain) | ~240 ms (DB network hop) | Managed Vector DB | 31 GB (Float32) | Medium (Requires Docker DBs) |
| Zep | ~450 ms | Relational / Graph | 50+ GB (Nodes+Edges) | Hard (Enterprise Focus) |
| LangMem | ~180 ms | Bring Your Own DB | Varies heavily | Easy (Library Only) |
- The Mem0 Bottleneck (Network I/O): Mem0 defaults to managed vector databases (like Qdrant). Every memory recall requires a network hop taking 50-100ms just for the database query. Libro's Turbovec engine keeps the index directly in RAM, reducing retrieval latency to purely the HTTP request overhead.
- The Zep Bottleneck (Graph Complexity): Zep uses a temporal knowledge graph over Postgres, requiring massive database storage. Libro achieves a similar graph using lightweight relational 'Passports'.
- Storage & Scale: Mem0 and LangMem rely on Float32 embeddings (31 GB of RAM for 10M memories). Libro uses TurboQuant compression, fitting 10M vectors into just 4 GB of RAM while speeding up SIMD scan times by 20% compared to standard FAISS.
To give your AI agent persistent memory, you need your unique User ID and an API Key. Sign up or log into the dashboard at libro.co.in (using GitHub) to get your credentials.
The Model Context Protocol (MCP) allows local AI agents to seamlessly access the Libro Hive Mind.
For Claude Desktop, open your configuration file:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the libro server:
{
"mcpServers": {
"libro": {
"command": "npx",
"args": [
"-y",
"libro-mcp-server@latest"
],
"env": {
"LIBRO_API_KEY": "your_api_key_here",
"LIBRO_USER_ID": "your_user_id_here"
}
}
}
}Once installed, simply restart Claude or Cursor. Because of our strict privacy controls, the agent will not automatically save your data.
To use your Hive Mind, tell your agent to use the following manual commands:
/ingest [text]- Saves a new memory to your database. (e.g./ingest Our project codename is Apollo.)/fetch [query]- Retrieves relevant memories and injects them into the chat. (e.g./fetch What is the project codename?)
You can bring your Hive Mind to the ChatGPT iOS/Android app by creating a Custom Action.
- Create a new Custom GPT.
- In the Instructions, add: "To save memories, call ingestMemory. To retrieve context, call getContext. Use endUserId: 'your_user_id_here'"
- Create a New Action and paste our OpenAPI Schema.
- Set the Authentication to API Key, Auth Type Bearer, and paste your
LIBRO_API_KEY.
If you are building your own application, you can use our official SDK.
npm install @libro/sdkimport { LibroClient } from "@libro/sdk";
const client = new LibroClient({
apiKey: "your_api_key_here"
});
// 1. Save a new memory
await client.ingestMemory({
userId: "your_user_id_here",
text: "The new UI uses a dark mode palette."
});
// 2. Retrieve context
const context = await client.getContext({
userId: "your_user_id_here",
query: "What is the UI palette?"
});
console.log(context.context);
// Outputs: "[Memory 1] The new UI uses a dark mode palette."If you aren't using the SDK, you can call the API directly using curl or fetch.
Base URL: https://www.libro.co.in/api/v1
Authentication: Authorization: Bearer <YOUR_API_KEY>
Saves a new piece of context.
curl -X POST https://www.libro.co.in/api/v1/ingest \
-H "Authorization: Bearer libro_sk_..." \
-H "Content-Type: application/json" \
-d '{"userId": "123", "text": "My preferred language is TypeScript."}'Searches the vector database for the most relevant memories.
curl -X POST https://www.libro.co.in/api/v1/get-context \
-H "Authorization: Bearer libro_sk_..." \
-H "Content-Type: application/json" \
-d '{"endUserId": "123", "query": "What language do I like?"}'Updates an existing memory.
curl -X POST https://www.libro.co.in/api/v1/update \
-H "Authorization: Bearer libro_sk_..." \
-H "Content-Type: application/json" \
-d '{"userId": "123", "memoryId": "uuid-here", "text": "New text"}'Deletes a specific memory from the Hive Mind.
curl -X POST https://www.libro.co.in/api/v1/forget \
-H "Authorization: Bearer libro_sk_..." \
-H "Content-Type: application/json" \
-d '{"userId": "123", "memoryId": "uuid-here"}'