Persistent semantic memory layer for AI agents
Project description
ContextMesh
Persistent memory layer for AI agents.
Every agent starts blind. ContextMesh gives them shared memory.
What it is
A simple API + vector store that any AI agent (Claude, Cursor, custom) can write context to and read from. Namespaced per workspace. Semantic search. Cross-tool, cross-session.
Structure
contextmesh/
api/
vector_store.py # Qdrant wrapper — embed, store, query
embedder.py # text → 1536-dim vector (OpenAI ada-002)
main.py # FastAPI — 4 endpoints
auth.py # API key validation + plan limits
requirements.txt
mcp_server.py # MCP protocol server (stdio)
sdk/
contextmesh.py # Python SDK
contextmesh.js # JS/TS SDK
dashboard/
index.html # Web dashboard
landing/
index.html # Marketing landing page
infra/
docker-compose.yml
Quick Start
1. Run locally
cd infra
OPENAI_API_KEY=sk-... docker-compose up
2. Generate a dev key
curl -X POST "http://localhost:8000/dev/generate-key?workspace_id=myteam&plan=team"
3. Use the Python SDK
from contextmesh import Mesh
mesh = Mesh("cm_live_your_key", base_url="http://localhost:8000")
mesh.remember("prod DB is postgres 15 on AWS us-east-1", tags=["database"])
results = mesh.query("what should I know about our database?")
4. Use the MCP server
Add to ~/.cursor/mcp.json or ~/.claude/mcp.json:
{
"contextmesh": {
"command": "python3",
"args": ["/path/to/contextmesh/mcp_server.py"],
"env": {
"CM_KEY": "cm_live_your_key",
"CM_URL": "http://localhost:8000"
}
}
}
API Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /remember | Store context |
| POST | /query | Semantic search |
| DELETE | /forget/{id} | Remove entry |
| GET | /list | Browse entries |
| GET | /usage | Check plan usage |
| GET | /health | Liveness check |
Deploy to Fly.io
fly launch
fly secrets set OPENAI_API_KEY=sk-... REDIS_URL=redis://...
fly deploy
Pricing (production)
| Plan | Price | Workspaces | Entries | Queries/mo |
|---|---|---|---|---|
| Solo | $19/mo | 1 | 500k | 100k |
| Team | $99/mo | 10 | 5M | 1M |
| Enterprise | $599/mo | ∞ | ∞ | ∞ |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextmesh-1.0.0.tar.gz.
File metadata
- Download URL: contextmesh-1.0.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e39e6bdc386479295107617644d51a9e0d7f6afcb976d5ce12a150c61cf7794a
|
|
| MD5 |
552e472499c2de59018dddb6177e2c73
|
|
| BLAKE2b-256 |
025219f79f9bce0e0288abe88a8acc6d7dc6d2cd36cdca5d016607a3498cabb1
|
File details
Details for the file contextmesh-1.0.0-py3-none-any.whl.
File metadata
- Download URL: contextmesh-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cf31b5a04f25eb4a0a8ba6192c48009e64ecc7095bad6f4f894b250cc79d416
|
|
| MD5 |
aa5c758a342780a7f9d2b7a2ae257235
|
|
| BLAKE2b-256 |
3f07c8e3f6fd683806d34edfdbb789ebc14f67524ee1f643673f400bbcfa7de8
|