API Reference Overview
Most integrations talk to MemMesh through MCP or the TypeScript SDK. For direct HTTP access, this section documents the engine’s REST surface.
Base URL
- Self-hosted engine:
http://localhost:3000 - Hosted cloud:
https://app.memmesh.ai
Every REST route is project-scoped and lives under
/api/v1/projects/{projectId}/…. The /api prefix is added at the gateway;
the engine registers the routes under /v1/projects/{projectId}/… internally.
The MCP endpoint is mounted at
<base>/api/v1/projects/{projectId}/mcp-server.
Authentication
Requests authenticate with a Bearer token in the Authorization header.
curl https://app.memmesh.ai/api/v1/projects/$PROJECT_ID/... \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Read routes require the READ_MEMORY permission; write and admin routes
require WRITE_MEMORY. A few surfaces are additionally entitlement-gated —
see the individual pages (compliance requires the memory.compliance
entitlement; the health estimators require the healthcare pack).
Endpoint reference
Every path below is relative to /api/v1/projects/{projectId}.
Memory
| Surface | Endpoint | Reference |
|---|---|---|
| Observe / search / recall / save / list | MCP tools on /mcp-server | Memory API |
| Admin list / create / confirm / promote / search | /admin/memory, /admin/memory/search | Memory API |
| Media ingest (image / audio / doc) | POST /memory/media | Memory API |
| Typed attributes + accumulators | /memory-typed/* | Typed Attributes |
Prediction & behavior
| Surface | Endpoint | Reference |
|---|---|---|
| Declared-target prediction | POST /memory-intelligence/predict (send a target) | Predictions API |
| Pattern projection | POST /lattice/predict (no target) | Predictions API |
| Upcoming / overdue predictions | GET /lattice/predictions/upcoming | Predictions API |
| Behavior discovery | POST /lattice/discover | Behavior discovery API |
| Behavioral profile | POST /lattice/profile, POST /memory-intelligence/profile | Context & Profiles |
| Calibration report | GET /lattice/calibration | Outcomes & Calibration |
Context, cohorts & estimators
| Surface | Endpoint | Reference |
|---|---|---|
| Context bundle | POST /lattice/context | Context & Profiles |
| Batch context (≤500 subjects) | POST /lattice/context/batch | Context & Profiles |
| Cohort similarity | POST /lattice/cohort | Cohorts & Estimators |
| Cohort-aware prediction | POST /lattice/cohort/predict | Cohorts & Estimators |
| Estimators (bio-age) | POST /lattice/estimate, POST /lattice/health/* | Cohorts & Estimators |
Closed-loop learning
| Surface | Endpoint | Reference |
|---|---|---|
| Record a decision | POST /lattice/decisions | Outcomes & Calibration |
| Record an outcome | POST /lattice/outcomes | Outcomes & Calibration |
| List outcomes | GET /lattice/outcomes | Outcomes & Calibration |
| What worked | GET /lattice/effectiveness | Outcomes & Calibration |
Events & alerts
| Surface | Endpoint | Reference |
|---|---|---|
| Emit / poll events | POST /lattice/events/emit, GET /memory-events | Events & Alerts |
| Alert-rule CRUD + fires | /memory-alerts/* | Events & Alerts |
Knowledge graph & maintenance
| Surface | Endpoint | Reference |
|---|---|---|
| Point-in-time graph query | POST /lattice/graph/query | Knowledge Graph API |
| Associative prefetch | POST /admin/memory/prefetch-related | Knowledge Graph API |
| Reflection / insights | POST /admin/memory/reflect | Knowledge Graph API |
| Consolidate / dedup | POST /admin/memory/consolidate, POST /admin/memory/dedup | Knowledge Graph API |
Compliance
| Surface | Endpoint | Reference |
|---|---|---|
| Subject export (GDPR Art. 15) | POST /memory-compliance/export | Compliance API |
| Hard delete (GDPR Art. 17) | POST /memory-compliance/hard-delete | Compliance API |
| Audit log / packs | GET /memory-compliance/audit, GET /memory-compliance/packs | Compliance API |
The full, generated endpoint reference is published from the repository’s
openapi.json. Most teams use the TypeScript SDK,
which wraps all of the above.