Most AI agents get dumber over time. March doesn't.
Project description
March
Most AI agents get dumber the longer you use them. March doesn't.
Agent frameworks love to dump everything into the LLM context window โ your entire conversation history, vector DB search results from six months ago, every sub-agent's internal monologue. You pay for every token, and the LLM drowns in noise.
March takes a different approach: structured compression, isolated memory, and selective recall. The result is an agent that stays sharp after hundreds of turns, not one that slowly forgets what you told it ten minutes ago.
pip install march-ai
march start
Two commands. You're running.
Why March?
๐ง Memory That Actually Works
Most frameworks either truncate history (losing critical decisions) or shove everything into a vector DB (retrieving outdated garbage). March uses rolling context compaction โ a two-step process that compresses conversation history while preserving every decision, requirement, and code snippet that matters.
How it works:
- When context fills up, March summarizes the conversation (keeping facts, dropping filler)
- Then deduplicates against your static files โ no redundant information in context
- Session memory (
facts.md,plan.md) is folded in and survives every compaction cycle
The result: after 100 turns, March still knows your project uses PostgreSQL, deploys to Lambda, and has a March 15 deadline. Other frameworks forgot that at turn 30.
๐ Sub-Agent Isolation
When March spawns a sub-agent, it gets its own process, its own memory, its own LLM connection. A sub-agent can crash, OOM, or go rogue โ the parent agent is unaffected.
| mtAgent (lightweight) | mpAgent (isolated) | |
|---|---|---|
| Runs as | asyncio task | Separate OS process |
| Memory | Shared with parent | Fully independent |
| Best for | I/O-bound work, API calls | GPU compute, simulations, risky ops |
| Crash impact | Could affect parent | Contained โ parent continues |
Sub-agents communicate via IPC (Unix socketpair + msgpack). Results are pushed to the parent โ no polling, no shared state corruption.
๐ Selective Memory (/rmb)
Vector databases remember everything. That sounds good until your agent retrieves a "relevant" decision from three months ago that was superseded last week.
March uses explicit, human-like memory:
/rmbsaves what you tell it to save โ decisions, preferences, key facts- Session memory auto-captures facts and plans during work
- Compaction deduplicates and keeps only the latest version of evolved facts
- Nothing stale sneaks back in through similarity search
๐ Plugin Pipeline
Before/after hooks on every agent step. Write a plugin in 10 lines:
from march.plugins import hook
@hook("before_llm_call")
async def log_tokens(context):
print(f"Sending {context.token_count} tokens")
๐ก Multi-Channel, Single Codebase
One march start gives you:
- Terminal โ interactive or one-shot mode
- Matrix โ encrypted chat with E2EE support
- WebSocket โ connect March Deck or any custom frontend
- ACP โ IDE integration (VS Code, Cursor, any editor with agent protocol support)
All channels share the same agent, same memory, same session state.
How Rolling Context Works
Turn 1-30: Full messages in context
โ context window fills up
Turn 31: Compaction triggers
โโ Step 1: Summarize (keep decisions, drop filler)
โโ Step 2: Dedup against static files
โโ Session memory folded in
โ
Turn 31+: [Compact rolling summary] + [Recent messages]
โ context fills again
Turn 60: Compaction triggers again
โโ Builds on previous summary (accumulative)
โ
Turn 100: Still knows your project constraints from Turn 3
Key properties:
- Accumulative โ each compaction builds on the last, so early context is never fully lost
- Lossless for decisions โ identifiers, code, URLs, action items always preserved
- Self-contained โ after compaction, the rolling summary contains everything the LLM needs
- Configurable โ tune compaction threshold, summary budget, and dedup ratio
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Channels (Pure I/O) โ
โ Terminal ยท Matrix ยท WebSocket ยท ACP โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Orchestrator โ
โ LLM calls ยท Tool dispatch ยท Cancel/redirect โ
โ Ephemeral turn state (never persisted) โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Sub-Agents โ โ Memory System โ
โ mtAgent (async) โ โ FileMemory (md files) โ
โ mpAgent (proc) โ โ SessionMemory (per-task) โ
โ Nested (depth>1)โ โ Rolling Context โ
โ IPC + heartbeat โ โ SQLite persistence โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
23,000 lines of Python. No JavaScript. 6 native LLM providers.
March Deck โ PWA App Platform
Want a mobile-friendly UI? March Deck is a PWA platform that turns your agent into a collection of mini-apps you can open on any device.
| App | What it does |
|---|---|
| ๐ค March | Chat + dashboard (sessions, cost, providers, logs) |
| ๐ฐ Finviz | Financial news with 24h AI summaries |
| ๐ ArXiv | Research paper semantic search |
| ๐ System | Server monitoring (CPU, RAM, GPU, services) |
| ๐ Files | File browser |
| ๐ Notes | Markdown notes |
| ๐บ Cast | Chromecast streaming |
| ๐ฆ OpenClaw | OpenClaw agent management |
No app store. Add to home screen and go. Works with any WebSocket-compatible agent.
Quick Start
# Install
pip install march-ai
# Or with extras
pip install "march-ai[anthropic]" # Claude support
pip install "march-ai[bedrock]" # AWS Bedrock
pip install "march-ai[matrix]" # Matrix + E2EE
pip install "march-ai[browser]" # Playwright browser tools
pip install "march-ai[voice]" # Speech-to-text
pip install "march-ai[all]" # Everything
# Run
march start # Start agent
march chat # Interactive terminal
march chat "summarize this repo" # One-shot mode
Configuration
~/.march/config.yaml โ created on first run:
llm:
default: "openai"
providers:
openai:
model: "${MARCH_MODEL:gpt-4o}"
api_key: "${OPENAI_API_KEY:}"
channels:
terminal:
enabled: true
memory:
compaction:
threshold: 0.95
summary_budget_ratio: 0.15
Supports ${VAR:default} environment variable interpolation.
CLI
march start Start agent
march stop Stop all services
march restart Restart
march enable / disable Systemd service (auto-start on boot)
march chat Interactive terminal session
march chat "prompt" One-shot mode
march status Health, version, model, plugins, channels
march log Follow log stream
march config show Show config path
march agent list / show Sub-agent management
march plugin list / enable Plugin management
Built-in Tools
March ships with 24 tools out of the box:
| Category | Tools |
|---|---|
| Files | read, write, edit, glob, diff, apply_patch |
| Code | exec, process (background jobs) |
| Web | web_search, web_fetch, browser (Playwright) |
| Memory | session_memory (facts/plans/checkpoints) |
| Media | screenshot, pdf, voice-to-text, tts |
| Integration | github, huggingface, clipboard, translate |
| Agent | sessions (sub-agent spawn/manage), message |
All tools are registered via @tool decorator. Add custom tools by dropping a Python file in your plugin directory.
Comparison
March vs OpenClaw vs LangChain vs CrewAI
| Feature | March | OpenClaw | LangChain | CrewAI |
|---|---|---|---|---|
| Rolling context compaction | โ Structured 2-step | Basic | โ | โ |
| Session memory (survives compaction) | โ facts/plans/checkpoints | โ | โ | โ |
| Process-isolated sub-agents | โ mpAgent | โ In-process | โ | โ |
Selective memory (/rmb) |
โ | โ | โ | โ |
| Native LLM providers | โ 6 providers | 1 (via LiteLLM proxy) | Via wrappers | Via wrappers |
| Multi-channel | 4 (Matrix, Terminal, WS, ACP) | 10+ (Telegram, WhatsApp, Discord, Signalโฆ) | โ | โ |
| Plugin hooks | โ Lifecycle hooks | Skill-based | Via callbacks | โ |
| Cost tracking | โ Built-in per-turn | Via LiteLLM | โ | โ |
| Browser automation | โ Playwright (headless) | โ Playwright (multi-tab, profiles) | โ | โ |
| Mobile device integration | โ | โ Node pairing | โ | โ |
| Community ecosystem | New | โ Active + ClawHub | โ Large | Growing |
| Codebase | ~23K lines Python | ~145K lines TypeScript | ~300K+ | ~50K+ |
Where March wins
- Memory that doesn't degrade โ Rolling context + session memory means your agent remembers decisions from turn 3 at turn 100. OpenClaw and LangChain lose this during compaction.
- Fault isolation โ mpAgent sub-agents run in separate OS processes. A crash stays contained. Every other framework runs sub-agents in-process.
- No proxy dependency โ March talks directly to Bedrock, Anthropic, OpenAI, Ollama, OpenRouter. OpenClaw requires a LiteLLM proxy for all LLM calls.
- Auditable โ 23K lines. You can read the entire codebase in an afternoon.
Where OpenClaw wins
- Channel breadth โ 10+ messaging platforms vs March's 4. If you need Telegram, WhatsApp, or Discord, OpenClaw has it.
- Browser & device integration โ Multi-tab browser profiles, Chrome extension relay, mobile camera/location/notifications.
- Maturity โ Production-tested with an active community and skill marketplace.
Benchmark details: March achieves identical goal retention (100%) to OpenClaw across all test scenarios with a 6.2ร smaller codebase. See full benchmark report.
Supported LLM Providers
| Provider | Config key | Notes |
|---|---|---|
| OpenAI | openai |
GPT-4o, GPT-4, etc. |
| Anthropic | anthropic |
Claude Opus, Sonnet, Haiku |
| AWS Bedrock | bedrock |
Claude, Llama, Mistral via AWS |
| Ollama | ollama |
Local models, no API key |
| OpenRouter | openrouter |
Multi-provider gateway |
| LiteLLM | litellm |
Universal proxy |
Switch providers per-session or per-sub-agent. No code changes needed.
Development
git clone https://github.com/camopel/March.git
cd March
pip install -e ".[dev]"
pytest # 785 tests
Design Philosophy
-
Memory is curation, not accumulation. The value of memory isn't how much you store โ it's how well you filter. March compresses, deduplicates, and preserves only what matters.
-
Isolation prevents corruption. Sub-agents run in separate processes with their own memory. A rogue sub-agent can't pollute the parent's context or crash the main loop.
-
Explicit beats implicit.
/rmblets you decide what's worth remembering. No black-box embeddings, no stale vector search results sneaking into your context. -
Small is fast. 23K lines means you can read the entire codebase in an afternoon. Every abstraction earns its place.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file march_ai-0.1.0.tar.gz.
File metadata
- Download URL: march_ai-0.1.0.tar.gz
- Upload date:
- Size: 296.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fd60e45963e66afb9e2a847fb9b30a089bb122386ba44fc3eb89032720bd6ba
|
|
| MD5 |
0eaca51194fcf5589b79a61729603f86
|
|
| BLAKE2b-256 |
5f123841c52b14b173007724ae002332782e27b7ab1c714c5ad7089ccd084701
|
File details
Details for the file march_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: march_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 253.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
988ffba750604b7dfdc378fc4f4f0fe27685939a54728ff64664efdc49dd449a
|
|
| MD5 |
2f96ac3a4ca0fbbd13eafa905044e3ea
|
|
| BLAKE2b-256 |
64609e2d0afcbb1ca470a44aef2f5f5a076fab482008e0e128d63f408c60487f
|