Skip to main content

Quickstart

Get SharedMemory running and make your first memory write in under 5 minutes.

Using Claude, Cursor, or Windsurf?

Skip straight to the MCP tab below — it's the fastest way to get started. Zero code required.

1. Get your API key

  1. Create an account — Sign up at app.sharedmemory.ai using email or Google.

  2. Set up your workspace — On first login you'll create an organization plus a Default Project (volume) SharedMemory attaches your memories to.

  3. 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.
Secrets are shown once

Copy immediately; SharedMemory only stores the SHA‑256 digest afterwards.

2. Choose your integration

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)

3. Upload a document

SharedMemory can ingest PDFs, text files, markdown, CSV, JSON, and DOCX:

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"

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
  • SDKmemory.getGraph() returns entities and relationships
  • CLIsm query "topic" finds related entities
  • MCP — Use the get_graph tool in Claude/Cursor

What happens behind the scenes

When you write "John is a senior engineer at Google":

  1. Guard check — Verified against existing knowledge (no conflicts found → auto-approved)
  2. Embedding — Text embedded as a 384-dimensional vector
  3. Qdrant indexing — Stored for semantic search
  4. Knowledge extraction — LLM extracts:
    • Entity: John (Person)
    • Entity: Google (Organization)
    • Fact: "Senior engineer at Google" → linked to John
    • Relationship: JohnWORKS_ATGoogle
  5. Neo4j indexing — Entities, facts, and relationships stored in the graph
  6. Summary updated — John's auto-generated summary now includes this fact
All automatic

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.

Next steps

TypeScript SDK

Full SDK reference with all methods

API Reference

Complete REST API documentation

Knowledge Graph

How the graph is built and queried

Integrations

Connect GitHub, Slack, Notion, and more