AI agents that show their work.

Every answer comes with the receipts — the row of data, the commit, or the line of code behind it. Runs locally, with a local model or no model at all.

Windows 10/11 (x64) · Standalone installer · Auto-updates

$pip install margin-cli margin-data-storyteller
margin run data-storyteller sales.csv --set stop_after=story
$9,826 2026-06
sales.csv · 600 rows · 32 facts computed twice

Select any underlined number to inspect its pandas and DuckDB SQL verification.

Revenue rose from in 2025-01 to 2025-06 to in 2026-01 to 2026-06.

Total revenue came to . Over 18 months, revenue grew steadily by about 4% a month — the trend explains of monthly movement. One ambiguous date () was assumed month-first and flagged.

Outputs: sales.clean.csv sales.cleaning.json Power BI (.pbip) Markdown / JSON

Why you can check its work.

Every guarantee is enforced in code so an agent never asks you to trust a number or claim you cannot trace back to its source.

Code computes the numbers

A model never invents a statistic. The storyteller writer can only reference facts by name, and each fact is computed twice — once in pandas and once in separate SQL. If they disagree, the run fails.

pandas: 115286.00
duckdb: 115286.00
match: verified (Δ = 0)

You make the judgement calls

Is 05/02/2026 May or February? The file cannot say. An agent stops and asks you; pass assume_defaults=true and every guess stays in the report, flagged in red as unconfirmed.

row 4: 05/02/2026 → 2026-05-02
assumed, not confirmed: month first

Strange repositories stay inert

Point margin at any GitHub URL or local folder. Files are read and never executed, and git is locked down with read-only configuration so a hostile repository cannot trigger hooks or helpers.

core.hooksPath=/dev/null
core.fsmonitor=false
0 repository hooks executed

Your data stays on your computer

Agents default to local Ollama (qwen3.5:9b, fits on an 8 GB GPU) or run with no model at all. Switch to Anthropic or OpenAI only when you choose — and the storyteller never sends raw data rows.

default: localhost:11434
model: qwen3.5:9b or none
0 data rows sent to hosted APIs

Five agents. One package per job.

Install only what you need. The CLI, HTTP API, and web UI discover whatever is installed in your environment automatically.

Data Storyteller

PyPI · Experimental · No model required

Cleans messy CSVs and spreadsheets, accounts for every changed cell, computes every fact twice in pandas and DuckDB SQL, writes the story with charts, and exports clean CSVs or Power BI .pbip projects.

pip install margin-cli margin-data-storyteller
Documentation ↗

AI Code Detector

PyPI · Experimental · GitHub URL or path

Estimates how likely a codebase was written with AI assistance as a plausible range with a confidence level, backed by verbatim quoted lines and commit-level evidence for and against.

pip install margin-cli margin-ai-code-detector
Documentation ↗

Commit Graph

PyPI · Experimental · SVG, Markdown, JSON

Draws a repository's history as a readable ink-lane SVG tree and groups its evolution into narrative chapters, margin notes beside commits, and the files that keep changing.

pip install margin-cli margin-commit-graph
Documentation ↗

Secret Leaks

Experimental · No model required

Scans workspace files and full git history for hardcoded secrets, API keys, private keys, and credentials — reporting exact locations with strictly redacted previews.

margin run secret-leaks .
Documentation ↗

Echo

Ready · Starter template · No model

Repeats what you give it. Included as a smoke test for the CLI, API, and web UI — and as the reference template to copy when writing your own agent.

margin run echo "hello" --set repeat=2
Write your own ↗

Ruled like a sheet of paper.

Start margin-api locally for forms, live progress, questions, and downloadable reports.

Data Storyteller view in the margin web UI showing underlined numbers and a monthly revenue chart.
Every underlined number opens its pandas + SQL receipt, alongside clean CSV, JSON, and Markdown exports. http://127.0.0.1:8000/runs/3d4a1f27

Terminal, Windows app, browser, or Python.

Every interface talks to the same agent registry. Reports write to stdout and logs write to stderr so CLI output is always safe to pipe.

terminal

Start with one file or one repository.

Windows 10/11 (x64) · Standalone installer Write an agent ↗