PlugMem

Plug-and-play long-term memory that compresses agent interaction histories into compact, reusable knowledge units for low-overhead recall.

Stars
★ 304
Last updated
4mo ago
FARS reviewed
Oct 11, 2026
License
Apache-2.0
Primary language
Python

At a glance

How it runs
CLILibrary / SDKAgent plugin / skill
Works with
Portable with changesClaude Code · OpenAI API
Cost
Free software; you pay for model usage
Setup effort
High · needs real infrastructure
You'll need
openai==2.6.1vLLMNV-Embed-v2OpenAI API keyAzure endpointShell / CLINetwork accessLocal filesystem
Typical use
Developers building dialogue or QA agents who need cross-session recall without stuffing full history into the context window.
Not a fit if
  • Teams without GPU capacity to host Qwen and embedding servers
  • Projects that want a zero-infrastructure memory API
  • Workloads that never need cross-session recall
Maintenance
Commits in the last 6 monthslast commit 2026-07-09

What does this agent do, and when should you use it?

PlugMem is an Apache-2.0 long-term memory layer for LLM agents, released with an ICML 2026 paper. Instead of replaying raw interaction histories, it structures experience into semantic, procedural and episodic knowledge units held in a MemoryGraph and queried through retrieve_and_reason. You can use it as a Python library — append a Memory sequence, close it, insert it into the graph — or install the bundled Claude Code and OpenClaw plugins, which expose remember/recall tools and a Memory Inspector web UI. Structuring and retrieval depend on LLM and embedding services configured via environment variables (OpenAI/Azure plus locally hosted Qwen and NV-Embed-v2 servers). The repository also ships evaluation harnesses for WebArena, LongMemEval and HotpotQA, reporting 90.2 Acc on LongMemEval and 79.1 F1 / 91.1% LLM-Judge Acc on HotpotQA.

PlugMem ingests an agent session as a Memory sequence: call mem.append(...) per item, mem.close() at the end, then mg.insert(mem) to run the structuring pipeline, where an LLM extracts graph nodes. Nodes are typed semantic (facts, user preferences), procedural (workflows, step-by-step know-how) and episodic (long sessions written under DIR_PATH and referenced by ID), and are linked hierarchically inside MemoryGraph, which also supports updating and evolution. At query time mg.retrieve_and_reason(...) retrieves the relevant nodes and reasons over them, returning compact context rather than raw history. The OpenClaw plugin exposes plugmem.remember and plugmem.recall to the agent, auto-saves the trajectory on /reset and before context compaction, then runs the structuring pipeline; recall fans out across a default graph plus optional read-only shared graphs. The Memory Inspector (http://localhost:8080/inspector/) shows graph topology, browses and filters individual memories, debugs recall scoring node-by-node, and replays agent trajectories. Evaluation scripts under src/eval/webarena, longmemeval and hotpotqa drive benchmark agents such as AgentOccam with flags like --load_memory_graph, --replay-trajectory and --disable-memory-graph.

  1. Developers building dialogue or QA agents who need cross-session recall without stuffing full history into the context window.
  2. Evaluation teams reproducing a memory baseline on WebArena, LongMemEval or HotpotQA.
  3. Claude Code users who want a self-writing CLAUDE.md that accumulates project conventions and debugging recipes.
  4. OpenClaw agent operators who want remember/recall without writing their own storage and retrieval code.
  5. Researchers who need to inspect the memory graph and debug recall scoring node by node.
  6. Teams sharing one read-only user-facts graph across several agents.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install -U openai==2.6.1
Environment variables
OPENAI_API_KEY AZURE_ENDPOINT DIR_PATH QWEN_BASE_URL EMBEDDING_BASE_URL
Config files
config.yaml

How do you install or deploy this agent?

There is no packaged installer: clone the repository, then install the benchmark dependencies under src/ following their own docs.

git clone https://github.com/TIMAN-group/PlugMem
cd PlugMem

Install/upgrade the OpenAI SDK:

pip install -U openai==2.6.1

For WebArena, clone the modified AgentOccam and webarena repos and copy the patch files:

cd src
git clone https://github.com/jizej/AgentOccam
git clone https://github.com/web-arena-x/webarena
cp src/webarena_patch/envs.py src/webarena/browser_env/envs.py
cp src/webarena_patch/openai_utils.py src/webarena/llms/providers/openai_utils.py

Export the credentials and endpoints the code reads:

export OPENAI_API_KEY=<your_openai_api_key>
export AZURE_ENDPOINT=<your_azure_endpoint>
export DIR_PATH="/<your_path_to_PlugMem>/data"
export QWEN_BASE_URL="http://<your_qwen_host>:8000/v1"
export EMBEDDING_BASE_URL="http://<your_embedding_host>:8001/v1/embeddings"

Host the local Qwen (vLLM) and NV-Embed-v2 servers:

cd host_local_inference
bash vllm_deploy.sh
bash nv_embed_v2_deploy.sh

Create the memory directories:

mkdir -p "$DIR_PATH/episodic_memory" \
         "$DIR_PATH/semantic_memory" \
         "$DIR_PATH/procedural_memory" \
         "$DIR_PATH/tag" \
         "$DIR_PATH/subgoal"

Install the Claude Code plugin by pointing Claude at the plugin directory (ONBOARDING.md walks from zero to a verified loop in about 15 minutes):

claude --plugin-dir plugmem-coding-claude-code/

How do you use this agent?

Minimal library usage is the README's six-line integration:

# init PlugMem memory graph
mg = MemoryGraph()
# init memory sequence
mem = Memory(...)
mem.append(...)
mem.close()
# insert memory sequence into memory graph
mg.insert(mem)
# retrieve memory and perform reasoning on retrieved nodes
mg.retrieve_and_reason(...)

Run a benchmark, for example WebArena (--config is required):

cd src/eval/webarena
python eval_agentoccam.py --config <config.yaml>

LongMemEval:

cd src/eval/longmemeval
python eval_longmemeval_all.py

HotpotQA structures the corpus first, then evaluates:

cd src/eval/hotpotqa
python build.py
python eval_hotpotqa_all.py

With the OpenClaw plugin service running, open http://localhost:8080/inspector/ to browse the memory graph, test recall and replay sessions; use --load_memory_graph, --replay-trajectory and --disable-memory-graph to load a persisted graph, replay a saved trajectory, or turn memory off for comparison.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Three typed memories (semantic, procedural, episodic) in a hierarchical graph rather than one flat vector index, so recall returns compact knowledge units.
  • More than paper code: ships Claude Code and OpenClaw plugins, plugmem.remember/recall tools, and a visual Memory Inspector.
  • Task-agnostic design reporting 90.2 Acc on LongMemEval and 79.1 F1 / 91.1% LLM-Judge Acc on HotpotQA, with a step-by-step examples/task-adaptation reproduction guide.
  • Apache-2.0 licensed, with released trajectories and memory-graph artifacts for all three tasks and WebArena human demonstrations under CC BY 4.0.
  • Low integration cost: the core path is six lines using MemoryGraph, Memory, insert and retrieve_and_reason.
Limitations
  • The quickstart requires hosting two local inference services — Qwen on vLLM and NV-Embed-v2 — plus an OpenAI key and Azure endpoint, effectively GPU infrastructure.
  • Runtime is pinned to openai==2.6.1 and needs several environment variables at once (QWEN_BASE_URL, EMBEDDING_BASE_URL, AZURE_ENDPOINT, DIR_PATH).
  • Only the Claude Code adapter ships today; the design doc lists OpenCode and OpenClaw adapters as planned.
  • WebArena setup means cloning a modified AgentOccam and webarena and copying patch files by hand, and HotpotQA structuring can take several hours per the README.
  • No pip package: the installation section describes benchmark environment setup rather than a single reusable install entry point.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
PlugMem This agent 47 · Major gaps CLIFree + model costs ★ 304 4mo ago Python Claude Code · OpenAI API
Cognee Memory Platform 76 · Good Library / SDKFree + model costs ★ 34k 4d ago Python Claude Code · OpenAI API
ClickHouse Loom 68 · Some gaps — ★ 212 today Python Codex · Claude Code
RepoBrain – Repo Intelligence Engine 54 · Major gaps Agent plugin / skillFree + model costs ★ 1.4k 12d ago Python Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
47/ 100 5-point scale 2.4 / 5
Trust 11/29
Reliability 8/14
Adaptability 9/18
Convention 9/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

Evidence shows the plugin authenticates to a localhost service via an X-API-Key header (client.test.ts) with a narrow default surface, but the repo provides no permission declarations, least-privilege configuration, or user-confirmation flow; auto-remember hooks (before_reset/before_compaction) persist session trajectories without explicit consent, a default side effect. Data-flow transparency is partial: README mentions shared read-only graphs and local inference servers but never states whether data leaves the machine to OpenAI/Azure endpoints, and there is no redaction or retention policy for sensitive data. Rollback is limited to deleteGraph and a PLUGMEM_KEEP_STATE toggle, with no undo/audit for memory writes. Dependencies use loose lower bounds (chromadb>=0.5, openai>=1.0) with no lockfile or vulnerability scanning. Source attribution is solid: README gives the paper, author list, and BibTeX. Deductions: permissions/confirmation, data-flow transparency, sensitive data, rollback, and dependency security are partial or absent.

Reliability8 / 14 · 2.9/5

Tests assert concrete client behavior: retries on 503 and network errors, typed errors (PlugMemError/PlugMemConnectionError), no retry on 400, and error bodies carrying status plus detail. Failure messages are informative. Dependency availability is weak: pyproject pins only lower bounds with no lockfile, and README requires manually cloning AgentOccam and webarena, applying patches, and hosting vLLM plus NV-Embed-v2 servers. Self-consistency and failure messages score 2; dependency availability scores 1.

Adaptability9 / 18 · 2.5/5

README targets dialogue agents, knowledge-intensive QA, web automation, and coding agents (Claude Code/OpenClaw), a broad scenario set; recall exposes a mode parameter and raw toggle, and trigger behavior is covered by tests. Capability boundaries are vague: README says the graph is 'naively' updated/evolved without stating capacity, conflict resolution, or failure limits. Environment fit is demanding, requiring local GPU inference and patched external repos, which ordinary users cannot easily satisfy. Both are deducted.

Convention9 / 18 · 2.5/5

README has a table of contents, updates, installation, and quick start, so information architecture is adequate; naming (plugmem.remember/recall, MemoryGraph) is consistent across tests and docs. Install notes are incomplete, relying on cloning external repos and manual patches; examples point to an examples/task-adaptation directory with no in-repo FAQ; known limitations are a single 'naively support' phrase; version is 0.1.0 with no CHANGELOG file; maintenance responsibility is unstated (publisher unverified). LICENSE is the full Apache-2.0 text, earning full marks.

Effectiveness7 / 13 · 2.7/5

Output usability is good: recall returns reasoning text prefixed with [mode] or the raw prompt, remember returns a stats summary, and tests cover output shapes. Marginal value is clear: compact reusable knowledge units replace raw history to cut context overhead, with claimed SOTA on LongMemEval/HotpotQA. Cost-benefit evidence is thin: it requires self-hosted Qwen and embedding servers, HotpotQA structuring 'may take several hours', and README gives no latency, token, or cost comparison, so cost-benefit scores 1.

Verifiability3 / 8 · 1.9/5

README provides an arXiv ID and BibTeX, making the paper traceable, but SOTA numbers (90.2 Acc, 79.1 F1) are bare assertions with no in-repo evaluation logs or result files, and the reproduction guide points to an external directory. Cross-source corroboration is limited: tests and README agree on API shapes, but performance claims have no second source. Fact/inference separation is weak, with 'task-agnostic' and 'drop-in backbone' framing mixed into factual statements. All three score 1.

Risks and how to mitigate them
  • Auto-remember hooks persist trajectories before session reset or compaction without explicit user confirmation or write auditing; assess privacy and compliance impact before deployment.
  • README never states whether data is sent to external endpoints such as OpenAI/Azure and offers no redaction or retention policy; verify the data flow before handling sensitive session content.
  • Dependencies use only lower bounds with no lockfile, and setup requires manually cloning and patching AgentOccam/webarena plus self-hosting vLLM and NV-Embed-v2, making reproduction costly.
  • SOTA numbers and 'task-agnostic' claims lack in-repo evaluation artifacts and remain unverified assertions.
  • Publisher identity is unverified and maintenance responsibility/update path are unclear, so long-term maintenance is not guaranteed.
Evidence confidence: Low Reviewed Oct 11, 2026 Reviewed revision 3b2ce75257d4
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/plugmem.svg)](https://followagents.com/en/agents/plugmem)
<a href="https://followagents.com/en/agents/plugmem"><img src="https://followagents.com/badge/plugmem.svg" alt="FARS review"></a>

FAQ

Do I need my own GPU?
Per the quickstart, yes: you run the Qwen (vLLM) and NV-Embed-v2 embedding servers under host_local_inference, and separately set OPENAI_API_KEY and AZURE_ENDPOINT for LLM enhancement and trajectory evaluation.
Which model services does it call?
Endpoints come from environment variables: QWEN_BASE_URL for local Qwen generation, EMBEDDING_BASE_URL for embeddings, and OpenAI-compatible calls (openai==2.6.1) plus Azure for LLM enhancement and parts of evaluation.
Is there a pip package or one-command install?
No. The documented path is cloning the repo, installing each benchmark's dependencies under src/, and installing openai==2.6.1; WebArena additionally requires two extra repo clones and patch copies.
Can I disable memory for an ablation?
Yes. eval_agentoccam.py exposes --disable-memory-graph to turn off all memory-graph operations, plus --read-only-memory to avoid new inserts and --load_memory_graph to load a persisted graph.
Can several agents share one memory store?
The OpenClaw plugin fans recall across a default graph plus optional read-only shared graphs; the README example is a user-facts graph reused across multiple agents.
Is PlugMem free?
The software is free, but PlugMem calls an AI model, and you pay that model provider for usage (or run a local model).
Is PlugMem open source?
Yes. The source code is on GitHub (TIMAN-group/PlugMem) under the Apache-2.0 licence.
Is PlugMem safe to use?
FollowAgents' FARS review (Oct 11, 2026) scored PlugMem 11/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is PlugMem still maintained?
Development has slowed: the latest commit on GitHub is from 2026-07-09, within the last six months but not the last 30 days.
Who makes PlugMem?
PlugMem is published on GitHub by the account TIMAN-group. FollowAgents has not verified which person or company is behind that account.
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts