Wemory Documentation

Wemory is the Company Brain for AI-native teams. It captures conversations with AI agents, ingests human conversations through their transcripts, connects them with documents, and recalls the relevant context in future sessions.

Overview

An agent session is a conversation with an AI agent. During that conversation, decisions are made, approaches are rejected and project context is built. Wemory captures a structured account of that work and makes it available to future sessions across the team, whichever agent runs them - see Connect your agents.

Meeting transcripts and text documents can feed the same company brain, so decisions made between people and decisions made with agents become part of one retrievable context layer.

# The loop:

Agent or team works → useful context captured → Company Brain grows

Agent starts → relevant context recalled → work continues with company knowledge

Wemory comes in two editions - Cloud and Self-Hosted. The CLI, workflow, and commands are identical in both; only where your database lives changes. See Editions to choose.

Editions

Pick where your team's memory is stored. Either way, the Wemory API handles search, embeddings, and summarization - and your agents talk to it the same way.

Cloud

Wemory runs your database on a secure, managed cloud. Fastest way to start.

  • →Nothing to provision - get an invite and install
  • →We handle uptime, backups, and upgrades
  • →Your data lives in a dedicated, isolated database on secure cloud infrastructure (Microsoft Azure)
Self-Hosted

You run the database (PostgreSQL + pgvector) on your own infrastructure; the Wemory API connects to it over an encrypted, IP-restricted connection.

  • →Your data never leaves your servers
  • →You own backups, uptime, and TLS
  • →One-time database setup with the Wemory team

Self-hosted onboarding is coordinated with us - reach out to get your org provisioned.

Install

Cloud

Get an org slug and an invite token from your admin, then run one command. The invite token is short-lived - install before it expires.

curl -fsSL https://api.wemory.xyz/client-bundle | tar xz && \
  bash install_wemory.sh --org <your-org> --url https://api.wemory.xyz --invite <token>

Self-Hosted

First, your admin stands up a PostgreSQL + pgvector database on your infrastructure and shares the connection details with the Wemory team, who register your org and issue invite tokens (see Editions). Once your org is live, every team member installs the CLI with the same command - the API URL stays https://api.wemory.xyz:

curl -fsSL https://api.wemory.xyz/client-bundle | tar xz && \
  bash install_wemory.sh --org <your-org> --url https://api.wemory.xyz --invite <token>
Setting up a self-hosted database for the first time? Onboarding is handled with the Wemory team - get in touch and we'll walk you through provisioning and connecting it.

Add ~/bin to your PATH (once)

echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

What the installer does:

  1. Downloads and unpacks the client bundle
  2. Creates ~/.wemory/config.json with your org and API URL
  3. Provisions an API key from your invite token (stored in ~/.wemory/api_key)
  4. Installs CLI scripts to ~/bin/
  5. Injects Wemory instructions into ~/.claude/CLAUDE.md

Verify the install

List your org's projects to confirm auth and connectivity. Run wemory-doctor to check database health (connection, schema, pgvector).

wq projects     # confirms auth + connection
wemory-doctor   # checks database health
After install, launch sessions with wemory instead of claude. The injected CLAUDE.md instructions make your agent automatically query and save to team memory.

Connect your agents

Your team's memory does not belong to one agent. Wemory reaches your agents through two channels - the CLI, which wires session hooks into Claude Code, and a remote MCP server, which any MCP-capable host can connect to. Both read and write the same memory, so a decision captured in one is recalled in the next, whichever agent runs it.

CLI (hooks)

Claude Code. The deepest integration: capture and recall happen on their own, without the agent choosing to call a tool.

  • →Installed by install_wemory.sh - nothing else to wire
  • →Recall fires automatically on your first message
  • →Session summaries are written and pushed in the background

Covered above in Install.

MCP server

Claude AI and Cowork, Codex, ChatGPT and its Work edition, Hermes - and any other MCP client.

  • →One remote endpoint, no local install on the host
  • →Recall and save are exposed as tools the agent calls
  • →Your own Wemory key: you see exactly what your access allows

MCP endpoint

The server speaks Streamable HTTP. Add it as a remote MCP server in your host:

https://api.wemory.xyz/mcp

For hosts configured from a file (Codex, Hermes, Cursor), authenticate with your member key - the same one in ~/.wemory/api_key:

Authorization: Bearer <your-wemory-key>
# or, equivalently:
X-API-Key: <your-wemory-key>

Hosts that do not let you set headers (Claude AI, Cowork) use OAuth instead: add the endpoint as a connector, and the consent page asks for your Wemory key once, then keeps the connection signed in for you.

The key is yours, not the org's. Every search and every save runs as you, so restricted projects stay restricted - see Project Visibility.

What the agent gets

Five tools, mapping onto the same API the CLI uses:

ToolCLI equivalentDescription
searchwq smartSemantic search across sessions, decisions, knowledge and files
browse_knowledgewq knowledgeList a project's curated knowledge items - the source of truth
source_sessionwq sourceRead a session's full transcript instead of its summary
source_filewq source --fileRead an uploaded document in full
savews + wpWrite a structured session note back to team memory

Curation stays out of MCP on purpose: promoting, verifying and granting are admin gestures, and an admin already has the CLI.

On Claude Code, prefer the CLI. MCP and hooks are not interchangeable - hooks recall before the agent has decided it needs anything, which is precisely when context is most useful. Use MCP for the hosts that have no hooks to offer.

Daily Workflow

Wemory works passively. You don't change how you work - your agent handles it. The steps below describe the CLI path; on an MCP host the same loop runs through the search and save tools.

First launch. The very first time you run wemory, the agent walks you through a short guided onboarding - it shows you a real recall from your team's memory, explains the save/push defaults, and adapts to whether you're an admin or a member. You only see it once.

1. Start a session

Launch Claude Code with wemory. On your first message the agent automatically queries team memory for relevant context.

wq smart "what decisions were made about the auth migration"

2. Work normally

Code, debug, review, plan. As you work, the agent summarizes the session in the background and writes it to this session's slot - no extra steps needed. How often it does this is controlled by the auto_save mode (see Configuration).

3. Save & push

Say ws any time (or just end the session) and the agent writes the latest cumulative summary to this session's own slot. Depending on your manual_save_push setting it either pushes automatically or asks first.

# In your agent session, just say:
ws

# The agent writes a structured summary to this session's slot:
#   ~/.wemory/sessions/<session_id>.json
# Then pushes it (automatically, or after asking) with:
wp

Each agent session keeps its own slot, so two terminals never overwrite each other. Running wp with no argument pushes every pending slot.

4. Team compounds

Next time anyone on your team starts a session, the agent pulls context from all past sessions - including yours and your teammates'.

Command Reference

CommandAliasDescription
wemory-Launch Claude Code with auto-login, auto-update, and session hooks
wemory-doctorwdCheck database health: connection, schema version, pgvector, SSL
wemory-pushwpPush pending session summaries to Wemory (all slots in ~/.wemory/sessions/)
wemory-savewsWrite/edit this session's summary slot, then push per your save-push setting
wemory-query smart <q>wq smartSemantic search across all team memory (sessions, knowledge, files)
wemory-query search <q>wq searchText search across sessions, knowledge, and files
wemory-query sessions <project>wq sessionsList recent sessions for a project
wemory-query source <id>wq sourceDownload the full transcript of a session, or --file <uuid> for an uploaded file
wemory-query knowledge <project>wq knowledgeList knowledge items for a project (--all includes superseded)
wemory-query files [project]wq filesList uploaded files
wemory-query projectswq projectsList available projects in your org
wemory-query memberswq membersList team members
wemory-query whoamiwq whoamiShow your identity: email, role, whether you're an admin, and your org
wemory-query decisions <project>wq decisionsList auto-extracted decisions for a project
wemory-query promote <id>wq promotePromote a decision into a curated knowledge item
wemory-query verify <id> [state]wq verifySet a knowledge item's confidence (verified / contested / unverified)
wemory-query questionswq questionsList Dreaming curation questions awaiting an answer (admin)
wemory-query answer <id> <text>wq answerAnswer a Dreaming question (--promote to elevate, --dismiss to drop)
wemory-query errors [N]wq errorsView error logs (add --local for this machine's errors)
wemory-knowledge <p> <title> <content>wkCreate a knowledge item
wemory-knowledge-interactivewkiCreate knowledge item in multi-line interactive mode
wemory-upload <file> <project> [desc]wuUpload a file (PDF, DOCX, PPTX, MD…); text is extracted so it's searchable
wemory-ingest --file <path>wiIngest a meeting transcript
wemory-watch <cmd>wwWatch local folders (~/Wemory/) and auto-ingest new files (install / status / once)

Admin commands

Available to org admins for managing projects and access. See Project Visibility.

CommandAliasDescription
wemory-query create-project <slug> <name>wq create-projectCreate a project (--restricted and --grant e1,e2 set access up front)
wemory-query update-project <slug>wq update-projectRename or update a project's name, domain, or description
wemory-query delete-project <slug>wq delete-projectDelete an empty project (refuses if it still holds content)
wemory-query visibility <project> open|restrictedwq visibilitySwitch a project between open and restricted access
wemory-query grant <email> <project>wq grantGrant a member access to a restricted project
wemory-query revoke <email> <project>wq revokeRevoke a member's access to a restricted project
wemory-query access <email|project>wq accessAudit access: projects a member can see, or members granted on a project

Concepts

Session Notes

Structured summaries of AI agent sessions. Contain: summary, decisions, next_steps, open_questions, files_modified, tags. Searchable by the whole team.

Knowledge Items

Curated, verified facts about your team and projects - the source of truth and the highest-priority results in search. Create them directly with wk, or promote a decision with wq promote.

Decisions & Dreaming

Decisions are auto-extracted from session summaries - plentiful but unverified, so they rank below knowledge items. A daily curation pass ("Dreaming") proposes promotions and flags conflicts; when it needs a human call it queues a question for an admin (wq questions / wq answer).

Background capture

Your agent summarizes sessions as it works and stores each one in its own slot (~/.wemory/sessions/<session_id>.json). The auto_save mode sets the cadence and manual_save_push decides whether saved summaries push automatically - both in Configuration.

Watched folders

Run ww install to create ~/Wemory/ and a background watcher: drop a transcript in Transcripts/ or a doc in Documents/ and it's ingested automatically. Uploaded files (PDF, DOCX, PPTX, MD…) have their text extracted so they're fully searchable.

Projects

Organizational units for grouping sessions, knowledge, and files. Every session note is tagged with a project slug. Use wq projects to see available projects in your org.

Project Visibility

Projects are open by default - visible to everyone in your org. An admin can switch a project to restricted with wq visibility: it then disappears from search, listings, and writes for everyone except admins and members explicitly granted via wq grant. Audit who sees what with wq access.

Configuration

Configuration lives in ~/.wemory/config.json:

{
  "org": "your-org-slug",
  "url": "https://api.wemory.xyz",
  "email": "you@company.com",
  "channel": "stable",
  "auto_save": "frequent",
  "manual_save_push": "always"
}

auto_save - how often the agent is reminded to refresh the session summary as it works:

  • "frequent" - about every 10 tool calls (default)
  • "balanced" - about every 25 tool calls
  • "manual" - never auto-remind; you save with ws

manual_save_push - what happens after a summary is saved:

  • "always" - push automatically (default for new cloud installs; you consent to this during onboarding)
  • "ask" - prompt before pushing, so you can review first

Prefer to review everything before it reaches the team? Set manual_save_push to "ask".

Troubleshooting

# Check database health
wemory-doctor

# Confirm auth + connectivity
wq projects

# View recent errors on this machine
wq errors --local

# Force re-authentication / regenerate API key
wl --force

# Re-authenticate with a fresh invite token
wl --invite <token>

# Re-run installer (preserves config)
curl -fsSL https://api.wemory.xyz/client-bundle | tar xz && \
  bash install_wemory.sh --org <your-org> --url https://api.wemory.xyz --invite <token>

Agent not querying memory? - Check that ~/.claude/CLAUDE.md contains the Wemory instructions block.

Push failing? - Run wq projects to verify API access. Check wq errors --local for details.

Empty search results? - Your team needs to push a few sessions first. Try wq sessions <project> to see what's in the system.

For AI Agents

This section is for AI agents (Claude Code, Codex, Hermes, and any other host) that interact with Wemory-enabled users through the CLI. Connected over MCP instead? The tool descriptions carry the same guidance - see Connect your agents.

How it works

The installer injects instructions into ~/.claude/CLAUDE.md that tell your agent when and how to interact with Wemory. No manual configuration needed - the agent follows the injected instructions automatically.

CLI Quick Reference

Always use the CLI commands below. Never use raw curl - shell variable expansion causes parse errors in zsh eval contexts.
# Search team memory
wq smart "query here"

# Push session summary
wp

# Create knowledge item
wk <project> "Title" "Content"

# Upload file
wu /path/to/file <project> "description" --tags tag1,tag2

# List available projects
wq projects