
Research Preview
MemFlow Relay
A local proxy that sits between your AI tools and Gemini, optimizing context without sending your Gemini API key to any third party.
Quick Start
pip install memflow-relay
pip install memflow-relayMEMFLOW_API_KEY / GEMINI_API_KEY
export MEMFLOW_API_KEY=lago_…
export GEMINI_API_KEY=…Your GEMINI_API_KEY is never sent to LamoonAGI or MemFlow cloud services.
memflow-relay doctor
memflow-relay doctormemflow-relay serve
memflow-relay serveOperating Modes
| Mode | Description | Request modified | Measures savings | Applies optimization |
|---|---|---|---|---|
shadow | Shadow mode — measure savings without changing requests. | ✗ | ✓ | ✗ |
safe | Safe mode — apply conservative optimizations. | ✓ | ✓ | ✓ (conservative) |
optimize | Optimize mode — apply full context optimization. | ✓ | ✓ | ✓ (full) |
CLI Commands
memflow-relay servememflow-relay doctormemflow-relay statsmemflow-relay benchmark
Security & Privacy
Your Gemini API key stays local
GEMINI_API_KEY is used only by the local relay to authenticate with Google Gemini. It is never transmitted to LamoonAGI or MemFlow cloud services.
MemFlow API key
MEMFLOW_API_KEY (lago_ prefix) authenticates your requests to the LamoonAGI optimizer API only.
In shadow mode, the request sent to Gemini is always identical to the original request.
All logs, telemetry, and error reports automatically redact API keys and sensitive values.
Fail-open by default: if MemFlow is unavailable, requests continue to Gemini unmodified.
Powered by LamoonAGI Context VMM technology


