Start with one memory.

One local store. A real recall. Then a measured loop around the agent you already run.

Your first memory loop.

No account. No model. No API key.

01

Install the local core.

Python 3.10+ and Git. A virtual environment keeps the install in your project.

Terminal / install
git clone https://github.com/varma61923/unimem.git
cd unimem
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
02

Run the complete loop.

A real local store and evidence engine, with simulated agent outcomes you can inspect.

Terminal / offline demonstration
unimem demo --keep ./demo-store
Expected result

Integrity audit: SOUND
A helpful memory graduates.
A harmful memory is withdrawn.

03 / Connect your agent

Bring memory into the work.

The installer writes a local client configuration. Replace ./agent-project with your project directory and review the generated files.

Codex / local configuration
python -m pip install -e ".[serve]"
unimem install --target codex --dest ./agent-project

Merge .codex/unimem.mcp.toml into your client’s MCP settings. Launch the client from the activated environment, or point its server command at the unimem executable inside your virtual environment.

AGPL-3.0-only · Runs on your machine · Re-running step 02 requires a new or removed demo-store directory. Product quickstart

00 / See the whole loop in 30 seconds.

Before wiring anything, run the built-in demo. It creates a temporary store, writes facts with validity windows and recalls them at two points in time, runs 1,000 simulated support tickets through a randomized holdout, audits the experiment, and lets the evidence withdraw a harmful memory and graduate a helpful one.

The agent and its outcomes are simulated with planted effects, so the measured effects can be checked against ground truth. The store, randomization, integrity audit, analysis and withdrawal are the real product. It needs no LLM, no API key and no network.

Terminal · macOS / Linux
unimem demo --json          # inspect the structured result
Demo command

01 / Recall your first fact.

After installing the local core above, add one fact to a fresh store. The base core uses PyYAML and does not require an LLM or an embedding service.

Run these commands from your terminal. The final command asks the local store for the fact you just added. This proves the persistence and recall path; it does not yet establish that memory improves a task.

Terminal · macOS / Linux
unimem init --dest ./mem
unimem fact add "The launch checklist is stored in the blue folder." --dest ./mem
unimem recall "Where is the launch checklist stored?" --dest ./mem

Windows: activate with .venv\Scripts\Activate.ps1 in PowerShell. Source access follows the repository’s GitHub permissions.

Executable first-recall smoke check

02 / Give the memory loop an outcome.

Configure a trial before running the Python example. Here, a small retrieval function stands in for your own retriever. Each returned memory has a stable ID and text. The task-1042 occasion ID must identify one actual task.

Only pass the returned shown list into your agent. Report the final result using a real success criterion, including failures and escalations. One task will not produce a meaningful effect estimate.

Terminal · configure eligible-memory holdouts
unimem experiment --configure --rate 0.5 --dest ./mem
Python measurement wrapper

03 / Wrap a retrieval callable.

Save this as example.py in the product checkout. The printed result may be empty because the one memory can be withheld. Replace the illustrative outcome with the result of your workflow before using this for a real experiment.

Python · illustrative task
from unimem.measure import CausalMemory

def retrieve(task):
return [{"id": "retry-429",
"text": "On HTTP 429, back off and retry."}]

memory = CausalMemory(retrieve, root="./mem")
shown = memory.recall("Handle a rate limit",
occasion_id="task-1042")
print(shown)
# Run the actual agent here with only shown memories.
# Illustrative label: replace with the actual final outcome.
memory.record_outcome("task-1042", succeeded=True)

After collecting real outcomes, run unimem experiment --dest ./mem. Configure withdrawal separately with unimem retrieval --on-harm withdraw --dest ./mem. Start on a low-risk workflow.

04 / Connect a coding agent or MCP client.

Install the optional serve dependency for MCP. A stdio client launches the process locally; it operates with that process’s OS permissions. Network transports and the multi-tenant Hub have different authentication boundaries.

The installer contains targets for Claude Code, Cursor, Windsurf, Codex, Copilot, Gemini, Devin, OpenCode, and generic MCP configuration. The installer writes configuration; provider behavior still needs validation in your environment.

Terminal · MCP
python -m pip install -e '.[serve]'
unimem serve --transport stdio --dest ./mem

# Or generate a supported coding-agent configuration:
unimem install --target codex
Supported installer targets

05 / Use HTTP from your own runtime.

Run unimem up --dest ./mem and use the private gateway bearer token provided at startup. The local gateway defaults to port 8787. Keep the token on the server or in your local environment.

The recall endpoint accepts candidate items and an occasion ID. Deliver only the returned memory set, then send the final outcome to /v1/outcome. Consult the OpenAPI contract for response fields, protected items, limits, and policy errors.

Terminal · report an actual completed task
curl http://localhost:8787/v1/outcome \
-H "Authorization: Bearer $UNIMEM_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"occasion_id":"task-1042","succeeded":true}'
Gateway OpenAPI contract

Have one workflow in mind?

Try the local loop, or bring one workflow to a pilot conversation.

Technical details link to the inspected source. Check deployment requirements before enabling optional features.