LightMem2

An open plugin platform for long-running AI agents.
Build capabilities once and run them across OpenClaw, Codex, Claude Code, and future agent hosts.

Featured plugin: TokenPilot — a cache-aware context runtime that reduces long-session token usage and cost.

0%
Fewer input tokens
vs. Vanilla · Claw-Eval continuous
0%
Lower cost
vs. Vanilla · Claw-Eval continuous
0%
Fewer input tokens
vs. Vanilla · PinchBench continuous
0
Hosts supported
OpenClaw · Codex · Claude Code
Platform

Plugin platform for long-running AI agents

LightMem2 separates agent capabilities into reusable plugins that run across multiple hosts, so you only build each feature once.

Platform Architecture
🧩
Plugins
Reusable agent capabilities: context management, memory, and more.
⚙️
Core Runtime
Plugin lifecycle, configuration, and host-independent execution engine.
🔌
Host Adapters
Integration layer connecting plugins to OpenClaw, Codex, and Claude Code.
Plugin Catalog

Available plugins

Each plugin provides a distinct capability. Install what you need, skip what you don't.

PluginCapabilityStatusHosts
TokenPilotCache-aware context managementStable
OpenClawCodexClaude Code
Memory PluginLong-term memoryExperimentalTBD
Featured Plugin

TokenPilot: cache-efficient context

TokenPilot is the first official LightMem2 plugin. It reduces token usage and cost in long-running agent sessions through stable-prefix rewriting, context reduction, and lifecycle-aware eviction.

🔒 Stable Prefix

Rewrites developer-level context into a cache-stable form, dramatically improving cache hit rates across turns.

✂️ Context Reduction

Trims oversized tool output before it pollutes later turns, keeping the context window lean without losing signal.

🗑️ Context Eviction

Limits how much old context is carried forward as sessions grow, preventing unbounded context bloat.

📊 Reports & Visuals

Built-in inspector shows token savings, cache efficiency, and session metrics in real time.

Ready to reduce your agent costs?

Install LightMem2 and TokenPilot in under 5 minutes.

Get Started →