@hope666/melu
v2.0.3
Published
Transparent AI memory agent — intercepts LLM API calls, injects persistent memory, extracts new memories automatically.
Readme
Melu
Local memory proxy and observability dashboard for Claude Code.
Melu sits between Claude Code and the Anthropic Messages API. It can:
- inject relevant long-term memories into future requests
- extract new memories in the background
- keep all memory data local on your machine
- show a local dashboard for request flow, prompt packaging, tool use, and token timing
GitHub:
- Repository: github.com/Hyp6666/melu
- Issues: github.com/Hyp6666/melu/issues
What's New In v2
- local dashboard opens automatically after
melu run - request-level observability with Prompt / Answer inspection
- memory loading can be turned off entirely
- first-time setup now lets you skip model download if you do not want memory yet
- persistent config commands for language, mirror, memory, and dashboard behavior
Quick Start
Install:
npm install -g @hope666/meluInitialize:
melu initRun Claude Code through Melu:
melu run -- claudeOn first setup, Melu will ask:
- which UI language to use
- whether runtime memory should be enabled by default
- which model mirror to use, if memory is enabled and the embedding model is not downloaded yet
If you choose to disable memory, Melu skips the embedding-model download and still works as a transparent proxy plus local dashboard.
What Melu Does
When you run melu run -- claude, Melu starts a fixed three-process path:
- Embedder daemon
- Proxy / injection process
- Extractor worker
Claude Code itself stays unmodified in the foreground.
The proxy intercepts Anthropic POST /v1/messages, optionally injects memories, forwards the request, and streams the response through. The extractor worker separately processes real user prompts and writes durable memories into a local SQLite .memory file.
Dashboard
After startup succeeds, Melu opens:
http://127.0.0.1:<port>/__meluThe dashboard is local-only and is meant for observability, not cloud analytics.
It currently shows:
- request overview and timing
- token and cache structure
- request chain per turn
↑ · Promptfor uploaded prompt packaging↓ · Answerfor model replies and tool instructions- trace file access for the current run
You can disable auto-open later with:
melu config dashboard offMemory Is Optional
Melu now supports two modes:
1. Dashboard-only proxy mode
- no embedding model loaded
- no memory injection
- no memory extraction
- lower runtime footprint
2. Full memory mode
- local embedding model loaded once
- relevant memories injected into future prompts
- new durable memories extracted in the background
Toggle this for future runs:
melu config memory on
melu config memory offCommand Reference
Core
melu init
melu run -- claude
melu stop
melu statusMemory files
melu list
melu show <id-prefix>
melu delete <id-prefix>
melu clear
melu export -o backup.memory
melu import backup.memoryPersistent config
melu config show
melu config language zh-CN
melu config mirror modelscope
melu config memory on
melu config dashboard onAvailable config switches:
melu config language [lang]melu config mirror [huggingface|modelscope]melu config memory [on|off]melu config dashboard [on|off]
Resource Notes
If memory is enabled, Melu downloads and uses:
- embedding model:
Qwen3-Embedding-0.6B-Q8_0.gguf - disk: about 600 MB once
- runtime memory: typically a few hundred MB for the embedder process
If memory is disabled, Melu skips that model entirely.
Data And Privacy
All Melu state stays under:
~/.melu/Typical contents:
~/.melu/
├── config.json
├── memories/
├── models/
├── pending-extractions/
├── sockets/
├── stats/
└── traces/Important boundaries:
- memory databases are local SQLite files
- the embedding model runs locally
- Melu forwards your actual Claude requests only to Anthropic
- no separate Melu cloud service is involved
Authentication
Melu works with Claude Code whether you authenticate with:
- Anthropic API key
- Claude OAuth login
It reuses Claude Code's normal upstream authentication path.
Troubleshooting
Proxy did not start:
- check the port:
lsof -i :9800 - try another port:
melu run -p 9801 -- claude
Model download failed:
- switch mirror:
melu config mirror modelscope - then rerun
melu initor enable memory from settings
No memories appearing:
- check
melu status - run
melu list - remember extraction runs in the background and may finish after the foreground session exits
Dashboard did not open:
- the URL is printed in the terminal after startup
- re-enable it with
melu config dashboard on
Requirements
- Node.js 20+
- Claude Code installed
- macOS or Linux
License
Author
Hong Yupeng (npm: hope666)
