Quickstart
Get SharedMemory running and make your first memory write in under 5 minutes.
Skip straight to the MCP tab below — it's the fastest way to get started. Zero code required.
1. Get your API key
-
Create an account — Sign up at app.sharedmemory.ai using email or Google.
-
Set up your workspace — On first login you'll create an organization plus a Default Project (volume) SharedMemory attaches your memories to.
-
Provision a bearer secret — pick whichever flow fits your setup:
- Settings → API Keys (recommended) issues
sm_org_rw_…/sm_proj_rw_…keys with explicit scopes—the same placeholders used in Dashboard Setup. - Agents → Create Agent bundles a prompt + tooling profile and emits
sm_agent_…keys tied to a specific project.
- Settings → API Keys (recommended) issues
Copy immediately; SharedMemory only stores the SHA‑256 digest afterwards.
2. Choose your integration
- TypeScript SDK
- CLI
- MCP (Claude, Cursor, etc.)
- cURL
npm install @sharedmemory/sdk
import { SharedMemory } from '@sharedmemory/sdk'
const memory = new SharedMemory({
apiKey: 'sm_org_rw_...',
volumeId: 'your-volume-id',
})
// Store a memory
const result = await memory.remember("John is a senior engineer at Google")
console.log(result.status) // "approved"
// Query memories
const answer = await memory.query("What does John do?")
console.log(answer.memories)
npm install -g @sharedmemory/cli
# Authenticate (opens browser)
sm login
# Store a memory
sm remember "John is a senior engineer at Google"
# Query
sm query "John"
# Ask a question
sm ask "What does John do?"
Add to your MCP config (e.g., claude_desktop_config.json):
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["-y", "@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_org_rw_...",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai"
}
}
}
}
Then in Claude or Cursor, just say:
"Remember that John is a senior engineer at Google"
The MCP tools (remember, query, get_entity, search_entities, get_graph) are automatically available.
# Write a memory
curl -X POST https://api.sharedmemory.ai/agent/memory/write \
-H "Authorization: Bearer sm_org_rw_..." \
-H "Content-Type: application/json" \
-d '{
"content": "John is a senior engineer at Google",
"volume_id": "your-volume-id",
"memory_type": "factual"
}'
# Query memories
curl -X POST https://api.sharedmemory.ai/agent/memory/query \
-H "Authorization: Bearer sm_org_rw_..." \
-H "Content-Type: application/json" \
-d '{
"query": "What does John do?",
"volume_id": "your-volume-id"
}'
3. Upload a document
SharedMemory can ingest PDFs, text files, markdown, CSV, JSON, and DOCX:
- cURL
- Dashboard
curl -X POST https://api.sharedmemory.ai/agent/documents/upload \
-H "Authorization: Bearer sm_org_rw_..." \
-F "file=@resume.pdf" \
-F "volume_id=your-volume-id"
Drag and drop files in the Documents tab of your volume.
4. Explore the knowledge graph
After ingesting data, SharedMemory automatically builds a knowledge graph. View it in:
- Dashboard — Interactive 2D graph visualization with entity details
- SDK —
memory.getGraph()returns entities and relationships - CLI —
sm query "topic"finds related entities - MCP — Use the
get_graphtool in Claude/Cursor
What happens behind the scenes
When you write "John is a senior engineer at Google":
- Guard check — Verified against existing knowledge (no conflicts found → auto-approved)
- Embedding — Text embedded as a 384-dimensional vector
- Qdrant indexing — Stored for semantic search
- Knowledge extraction — LLM extracts:
- Entity:
John(Person) - Entity:
Google(Organization) - Fact: "Senior engineer at Google" → linked to
John - Relationship:
John→WORKS_AT→Google
- Entity:
- Neo4j indexing — Entities, facts, and relationships stored in the graph
- Summary updated — John's auto-generated summary now includes this fact
You don't need to define entities, configure extraction rules, or manage the graph. SharedMemory handles the entire pipeline from raw text to structured knowledge.