| title | Quickstart |
|---|---|
| description | Start Memongo, add one memory, and search it. |
| icon | play |
- Node.js 20+
- Bun 1.2+
- Docker, for local MongoDB
git clone https://github.com/romiluz13/memongo.git
cd memongo
bun installFor the default local path:
docker compose -f docker/docker-compose.yml up -d
export MEMONGO_MONGODB_URI="mongodb://127.0.0.1:27017/?directConnection=true"
export MEMONGO_API_KEY="local-dev-secret"For Atlas Local Preview with MongoDB automated embeddings:
export VOYAGE_API_KEY="al-your-atlas-model-api-key"
./docker/mongodb/start-preview.sh
export MEMONGO_MONGODB_URI="mongodb://127.0.0.1:27017/?directConnection=true"VOYAGE_API_KEY must be a MongoDB Atlas Model API key with the al-... prefix
when you use MongoDB auto-embed. Direct Voyage keys with the pa-... prefix do
not enable MongoDB auto-embed.
cd apps/api
bun run devThe API runs at http://127.0.0.1:3847.
curl -s http://127.0.0.1:3847/health
curl -s http://127.0.0.1:3847/v1/status \
-H "authorization: Bearer local-dev-secret"Look for a healthy API response and a memory status payload.
```typescript import { MemongoClient } from "@memongo/client";const client = new MemongoClient({ baseUrl: "http://127.0.0.1:3847", apiKey: "local-dev-secret", });
await client.add({ content: "The user prefers dark mode and TypeScript.", sessionId: "user-123", });
const results = await client.search({ query: "What are the user's preferences?", sessionKey: "user-123", maxResults: 5, });
console.log(results);
</Tab>
<Tab title="cURL">
```bash
curl -s http://127.0.0.1:3847/v1/add \
-H "content-type: application/json" \
-H "authorization: Bearer local-dev-secret" \
-d '{"content":"The user prefers dark mode and TypeScript.","sessionId":"user-123"}'
curl -s http://127.0.0.1:3847/v1/search \
-H "content-type: application/json" \
-H "authorization: Bearer local-dev-secret" \
-d '{"query":"What are the user preferences?","sessionKey":"user-123","maxResults":5}'
Memongo can be used directly by apps or exposed to agents as a Company Brain. Start read-first, then add explicit write workflows once scopes and safety are clear.
Operator console:
cd apps/web
MEMONGO_API_URL=http://127.0.0.1:3847 bun run devMCP server:
cd apps/mcp
MEMONGO_API_URL=http://127.0.0.1:3847 \
MEMONGO_API_KEY=local-dev-secret \
bun run start| Method | Path | Description |
|---|---|---|
| GET | /health |
Service health |
| GET | /openapi.json |
OpenAPI document |
| GET | /v1/status |
Memory provider status |
| POST | /v1/add |
Add content to memory |
| POST | /v1/write-event |
Write conversation event |
| POST | /v1/write-structured |
Write structured memory |
| POST | /v1/search |
Search memory |
| POST | /v1/search-kb |
Search knowledge base |
| POST | /v1/profile |
Synthesize a profile |
| POST | /v1/context-bundle |
Build an answer-ready context bundle |