| name | nemo |
| description | Autonomous data investigation agent. Invoke when a user has a dataset (CSV, Parquet, or DuckDB) and asks an analytical question requiring multiple queries — metric changes, anomaly detection, root cause analysis, segmentation, or pattern discovery. Runs SQL against a local DuckDB database, builds an evidence graph, validates hypotheses, and produces an auditable brief.
|
| when_to_use | User asks "why did X change", "what's driving Y", "find anomalies in Z", or points at a dataset and wants rigorous analysis. Do NOT invoke for single-query answers, tasks without data, or dashboard/visualization-only work.
|
| allowed-tools | ["Bash(nemo *)","Bash(python *)"] |
Nemo — Autonomous Data Investigation Skill
Setup
Nemo must be initialized in the project directory before use.
First-time setup
cd /path/to/project
python -m venv .venv
source .venv/bin/activate
pip install -e /path/to/nemo
nemo init
nemo doctor
Requires OPENAI_API_KEY set in environment or in a .env file.
Loading data
nemo add data.csv
nemo add data.parquet
nemo add "logs/*.csv"
nemo add --name custom_name data.csv
nemo add --tpch --scale 0.01
nemo ls
nemo schema <table_name>
nemo profile <table_name>
Running an investigation
Goal-directed (recommended for analytical questions)
nemo run --steps 20 --goal "Why did activation drop in March?"
nemo run --steps 15 --goal "Which accounts are at churn risk and why?"
nemo run --minutes 10 --goal "Find pricing anomalies in the supplier data"
The --goal flag steers the strategist toward the user's question. Without it, Nemo explores broadly.
Open exploration
nemo run --steps 20
nemo run --minutes 10
Dry run
nemo run --plan
nemo plan
Resume a previous run
nemo resume
nemo resume <run_id>
nemo resume --goal "Dig into the outlier in segment X"
Viewing results
nemo status
nemo brief
nemo brief --output report.md
nemo report
nemo graph stats
nemo graph contradictions
Interactive TUI
nemo
How the engine works
Understanding the internals helps you use Nemo effectively and interpret its output.
The exploration loop
- Plan — the strategist (LLM) or deterministic generators propose exploration actions and push them onto a frontier queue
- Score — each frontier item is ranked by multi-factor utility (novelty, coverage, confidence gain, feasibility, diversity)
- Execute — top-ranked action is compiled to SQL and run against DuckDB
- Interpret — results are sent to the LLM for structured summarization into claims, hypotheses, and confidence scores
- Link — new insights are connected to the evidence graph with support/contradiction/refinement edges
- Reflect — periodically, the strategist reviews progress and adjusts strategy
- Debrief — at run end, LLM synthesizes findings into a narrative summary
Explore vs. Exploit
The engine alternates between:
- Explore — discover new patterns, scan untouched tables/columns
- Exploit — validate existing hypotheses with reproduce/segment/confound/counter steps
The arbiter decides which phase to enter based on hypothesis maturity, stagnation, and diversity ratios.
Deterministic generators
These produce frontier items without LLM calls:
SCHEMA_PROFILE — baseline table stats
METRIC_TREND_SCAN — time-series trends
CHANGEPOINT_DETECT — sudden shifts
SEGMENT_COMPARE — metric comparison across categories
TOP_GROUPS / OUTLIER_GROUPS — high-leverage segments
CORRELATION_SCAN — pairwise column correlations
DATA_QUALITY_CHECK — nulls, duplicates, type issues
COVERAGE_EXPLORER — join discovery between tables
ROBUSTNESS_CHECK — result validity verification
CONTRADICTION_RESOLVE — evidence chain disambiguation
The evidence graph
Every insight is a node. Relationships between insights are edges:
| Edge type | Meaning |
|---|
supports | Evidence favors a prior finding |
contradicts | Evidence argues against a prior finding |
refines | Narrows or qualifies a prior finding |
depends_on | Validity requires another finding to hold |
Contradiction clusters are auto-detected and can surface unresolved tensions in the data.
Hypotheses
The strategist generates testable hypotheses from insights. Each hypothesis goes through validation steps (reproduce, segment, confound, counter) and receives a verdict: confirmed, refuted, or inconclusive.
Configuration
Nemo reads nemo.toml from the project root. Key sections:
[budget]
max_steps = 100
max_runtime_minutes = 30
max_query_runtime_ms = 15000
[scoring]
weight_info_gain = 0.3
weight_impact = 0.25
weight_novelty = 0.2
weight_feasibility = 0.15
weight_diversity = 0.1
[llm]
model = "gpt-4o-mini"
[exploration]
reflect_every = 10
arbiter_interval = 3
max_validation_steps = 5
use_learnings = true
[hints]
goal = ""
time_columns = []
important_dimensions = []
[hooks]
Custom generators
Drop Python files in .nemo/generators/ to add domain-specific exploration actions:
def my_generator(ctx):
"""ctx has: store, config, recent_insights, datasets, frontier_items."""
return []
Files are auto-discovered and run during frontier refresh.
Cross-run learning
Nemo extracts patterns from completed runs (generator hit rates, error patterns, metric signals) and recalls them in future runs. This means subsequent investigations start smarter. Controlled by use_learnings = true in config.
Database schema
All data lives in a local DuckDB file (nemo.duckdb). System tables:
| Table | Purpose |
|---|
datasets | Registered data sources |
insights | Every finding (claim, SQL, confidence, source tables) |
edges | Relationships between insights |
frontier | Queued exploration actions |
runs | Run metadata and debrief text |
hypotheses | Testable claims with validation state |
thread_cards | Thematic groupings of related insights |
notebooks | Per-run strategist notebook |
learnings | Cross-run extracted patterns |
Typical workflow for Claude Code
When a user points you at a dataset and asks an analytical question:
- Check if Nemo is initialized — look for
nemo.duckdb in the project directory. If not, run nemo init.
- Load the data —
nemo add <file>. Verify with nemo ls and nemo profile <table>.
- Run the investigation —
nemo run --steps 20 --goal "<user's question>". Use --verbose if the user wants to see what's happening.
- Review results —
nemo brief for the summary. nemo graph stats for the evidence graph. nemo graph contradictions if there are unresolved tensions.
- Iterate — if the user has follow-up questions,
nemo resume --goal "<new question>" to build on what was already found.
- Export —
nemo report to write a markdown brief to reports/.
For quick data questions that don't need the full investigation loop, just write SQL directly against the DuckDB file using Python or the DuckDB CLI.