```
__ __ _
| \/ | ___ _ __ ___ __ _ __| | ___ ___
| |\/| |/ _ \ '_ ` _ \ / _` |/ _` |/ _ \/ __|
| | | | __/ | | | | | (_| | (_| | __/\__ \
|_| |_|\___|_| |_| |_|\__,_|\__,_|\___||___/
```
**Intuition-driven control plane for agent memory & action selection.**
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[]()
---
## ๐ง What is memabra?
> *Most agents memorize. memabra **intuits**.*
memabra is a **local-first, observable, trainable, and replayable** control plane for agent memory and action orchestration.
Instead of acting like a dusty filing cabinet, memabra functions as a **meta-cognitive controller**: given any task, it rapidly decides whether to answer directly, recall memory, load a skill, or invoke a tool โ then **learns from outcomes** to sharpen those instincts over time.
- ๐ **Local-first** โ no cloud lock-in, your data stays on disk
- ๐ **Observable** โ every decision is tracked, versioned, and inspectable
- ๐ **Trainable** โ online learning loop improves routing automatically
- ๐ **Replayable** โ replay trajectories, audit decisions, roll back versions
---
## โก Quick Start
```bash
git clone https://github.com/TacitLab/memabra.git
cd memabra
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
```
### 1. Peek under the hood
```bash
memabra --help
```
### 2. Run a safe dry-run evaluation
See the full workflow **without** actually promoting a new router version:
```bash
memabra run --dry-run --format text
```
### 3. Check system pulse
```bash
memabra status --format text
```
### 4. Inspect your router lineage
```bash
memabra version list --format text
```
### 5. Time-travel (rollback)
```bash
memabra version rollback --format text
```
---
## ๐ฎ CLI Commands
| Command | Description |
|---------|-------------|
| `memabra run` | ๐ Execute the online learning workflow |
| `memabra status` | ๐ Show current system health & metrics |
| `memabra version list` | ๐ List all saved router versions |
| `memabra version rollback ` | โช Roll back to a specific version |
---
## ๐จ๏ธ Operator-Friendly Output
By default, memabra speaks JSON. For humans, add `--format text`:
```bash
memabra run --dry-run --format text
```
Sample output:
```
Memabra online learning result
Summary
Report ID: report-58f9f22
Skipped: no
Promoted: yes
Dry run: yes
Baseline
Reward: 0.7200
Error rate: 0.1200
Latency (ms): 145.0000
Challenger
Reward: 0.8100
Error rate: 0.0800
Latency (ms): 132.5000
Deltas
Reward delta: 0.0900
Error rate delta: -0.0400
Latency delta (ms): -12.5000
Decision
Accepted: yes
Reason: challenger improved reward and reduced error rate
```
โ
**Normalized booleans** (`yes/no/none`)
โ
**Fixed-precision metrics** for easy comparison
โ
**Sectioned layout** โ Summary โ Baseline โ Challenger โ Deltas โ Decision
---
## ๐งช Running Tests
```bash
pytest tests/ -q
```
Current status: **126 passed** ๐ข
---
## ๐ Documentation
- [`docs/PROGRESS.md`](docs/PROGRESS.md) โ Capability roadmap & what's shipped
- [`docs/DEMO.md`](docs/DEMO.md) โ Hands-on walkthroughs & examples
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) โ System design & mental model
---
## ๐ท๏ธ License
MIT โ use it, break it, improve it.
*Built with caffeine and curiosity.* โ