agentleFS
agno-agiagno-agi/dash/CLAUDE.md

dash

CLAUDE.md2.3k starsChanged 8 months agoApache-2.0View on GitHub

Dash is a self-learning data agent that delivers insights, not just SQL results. It uses a team of specialists (Analyst + Engineer) coordinated by a leader to handle data queries and build computed data assets. Built on Agno. Runs in Slack, the terminal, or the AgentOS web UI.

  • Reads credentials

Trending

Quiet since April.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 2 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the agno-agi/dash repository that our weekly crawl found: only 4 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

The file

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the Engineer creates a view (e.g., dash.monthly_mrr), it calls update_knowledge to record the schema, columns, use cases, and example …

    line 128

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

Project Overview

Dash is a self-learning data agent that delivers insights, not just SQL results. It uses a team of specialists (Analyst + Engineer) coordinated by a leader to handle data queries and build computed data assets. Built on Agno. Runs in Slack, the terminal, or the AgentOS web UI.

Structure

dash/
├── team.py               # Dash team (leader, coordinate mode)
├── settings.py            # Shared config (DB, model, knowledge bases, Slack)
├── instructions.py        # Instruction builders per agent role
├── paths.py               # Path constants
├── __main__.py            # CLI entry point (python -m dash)
├── agents/
│   ├── analyst.py         # SQL queries, data analysis, insights (read-only)
│   └── engineer.py        # Views, summary tables, computed data (dash schema)
├── context/               # Runtime prompt builders (reads knowledge/)
│   ├── semantic_model.py  # Table metadata → system prompt
│   └── business_rules.py  # Business rules → system prompt
└── tools/
    ├── build.py           # Tool assembly per agent role (schema boundaries)
    ├── introspect.py      # Runtime schema inspection (both schemas)
    ├── save_query.py      # Save validated queries to knowledge
    └── update_knowledge.py # Record schema changes to knowledge

knowledge/                 # Data files loaded into vector DB (1:1 mapping)
├── tables/                # Table metadata JSON files (SaaS metrics)
├── queries/               # Validated SQL query patterns
└── business/              # Business rules, metrics, gotchas

app/
├── main.py               # AgentOS entry point (teams, scheduler, Slack interface)
└── config.yaml            # Quick prompts

db/
├── __init__.py            # Re-exports: db_url, get_postgres_db, get_sql_engine, etc.
├── session.py             # PostgreSQL + PgVector + dual schema (public/dash)
└── url.py                 # Database URL builder

evals/                     # Evaluation framework (Agno eval classes)
├── run.py                 # Unified eval runner
└── cases/                 # Test cases by category
    ├── accuracy.py        # AccuracyEval — data correctness
    ├── routing.py         # ReliabilityEval — team routes correctly
    ├── security.py        # AgentAsJudgeEval — no credential leaks
    ├── governance.py      # AgentAsJudgeEval — refuses destructive SQL
    └── boundaries.py      # AgentAsJudgeEval — schema access boundaries

scripts/
├── generate_data.py       # Generate SaaS sample data
├── load_knowledge.py      # Load knowledge into vector DB
├── venv_setup.sh          # Create virtualenv (uses uv)
├── format.sh              # ruff format + import sorting
├── validate.sh            # ruff check + mypy
├── generate_requirements.sh # uv pip compile → requirements.txt
├── build_image.sh         # Multi-platform Docker build
├── entrypoint.sh          # Docker entrypoint (DB wait, banner)
├── railway_up.sh          # First-time Railway setup
├── railway_redeploy.sh    # Redeploy to Railway
└── railway_env.sh         # Sync .env.production to Railway

docs/
├── SLACK_CONNECT.md       # Slack app setup guide with manifest
└── TEST_QUESTIONS.md      # Manual test questions (routing, data quality, edge cases)

Commands

./scripts/venv_setup.sh && source .venv/bin/activate
./scripts/format.sh      # Format code (ruff format + isort)
./scripts/validate.sh    # Lint + type check (ruff + mypy)
python -m dash           # CLI mode
python -m dash.team      # Test mode (runs sample queries)

# Data & Knowledge
python scripts/generate_data.py      # Generate SaaS sample data
python scripts/load_knowledge.py     # Load knowledge into vector DB

# Evaluations
python -m evals                      # Run all evals
python -m evals --category accuracy  # Run specific category
python -m evals --verbose            # Show response details

# Deployment (uses .env.production)
./scripts/railway_up.sh              # First-time Railway setup
./scripts/railway_redeploy.sh        # Redeploy
./scripts/railway_env.sh             # Sync .env.production to Railway

# Dependencies
./scripts/generate_requirements.sh           # Regenerate requirements.txt
./scripts/generate_requirements.sh upgrade   # Regenerate with latest versions

Architecture

Dual Schema:

SchemaOwnerAccess
publicCompany (loaded externally)Read-only — never modified by agents
dashEngineer agentViews, summary tables, computed data

Team (Coordinate Mode):

AgentRoleToolsSchema Access
Dash (Leader)Routes requests, synthesizes insightsSlackTools (optional)—
AnalystSQL queries, data analysis, insightsSQLTools (read-only, enforced by DB), introspect_schema, save_validated_query, ReasoningToolsReads public + dash
EngineerViews, summary tables, computed dataSQLTools (dash schema), introspect_schema, update_knowledge, ReasoningToolsReads public, writes dash

Interfaces:

InterfaceActivationWhat It Does
SlackSLACK_TOKEN + SLACK_SIGNING_SECRETReceives messages via /slack/events, streams responses to threads
AgentOSAlwaysWeb UI at os.agno.com

Knowledge Flow:

SystemWhat It StoresHow It Evolves
KnowledgeTable metadata, validated queries, business rules, dash schema objectsCurated files + Engineer's update_knowledge calls
LearningsError patterns, type gotchas, discovered fixesManaged by LearningMachine (AGENTIC)

When the Engineer creates a view (e.g., dash.monthly_mrr), it calls update_knowledge to record the schema, columns, use cases, and example queries. The Analyst discovers these via knowledge search and prefers them over raw table queries.

Data Model (SaaS Metrics)

Synthetic B2B SaaS dataset (~500 customers, 2 years of data) in public schema:

TableDescription
customersCompany info, industry, size, acquisition source, status
subscriptionsPlan, MRR, seats, billing cycle, lifecycle status
plan_changesUpgrades, downgrades, cancellations with MRR impact
invoicesBilling records, payment status, billing periods
usage_metricsDaily API calls, active users, storage, reports
support_ticketsPriority, category, resolution time, satisfaction

Key gotchas:

  • ended_at is NULL for active subscriptions
  • Annual billing gets 10% discount (amount = mrr * 12 * 0.9)
  • Usage metrics are sampled (3-5 days/month), not daily
  • satisfaction_score is NULL for ~30% of tickets

Evaluation System

Five eval categories using Agno's eval framework:

CategoryEval TypeWhat It Tests
accuracyAccuracyEval (1-10)Correct data and meaningful insights
routingReliabilityEvalTeam routes to correct agent/tools
securityAgentAsJudgeEval (binary)No credential or secret leaks
governanceAgentAsJudgeEval (binary)Refuses destructive SQL operations
boundariesAgentAsJudgeEval (binary)Schema access boundaries respected

Environment Variables

VariableRequiredDescription
OPENAI_API_KEYYesOpenAI API key
SLACK_TOKENNoSlack bot token (interface + tools)
SLACK_SIGNING_SECRETNoSlack signing secret (interface only)
DB_*NoDatabase config (defaults work with Docker Compose)
RUNTIME_ENVNodev (hot reload) or prd (RBAC enabled)
AGENTOS_URLNoScheduler callback URL (defaults to http://127.0.0.1:8000)
JWT_VERIFICATION_KEYNoProduction RBAC (from os.agno.com)

Tooling

  • Python 3.12 (required)
  • uv — package manager (venv creation, dependency resolution, pip compile)
  • ruff — linting and formatting (line-length 120)
  • mypy — type checking (strict-ish: check_untyped_defs, no_implicit_optional)
  • CI — GitHub Actions (.github/workflows/validate.yml): ruff format check, ruff lint, mypy on every push/PR to main

Key Patterns

  • Tool factories: Tools use a closure pattern (create_*_tool(knowledge) in dash/tools/) — the outer function captures dependencies, the inner @tool function is what the agent calls.
  • Instruction composition: dash/instructions.py builds prompts dynamically by concatenating role instructions + semantic model + business context. Leader instructions add/swap Slack sections based on config.
  • Dual knowledge: dash_knowledge (curated: table schemas, queries, rules) vs dash_learnings (discovered: error patterns, gotchas). Both are PgVector with hybrid search. The leader only gets learnings; specialists get knowledge.
  • DB re-exports: db/__init__.py re-exports everything from db.session and db.url. Import from db directly (e.g., from db import get_sql_engine).
  • Schema enforcement: Analyst read-only is enforced at the PostgreSQL level (default_transaction_read_only). Engineer public-schema writes are blocked by a SQLAlchemy before_cursor_execute event listener + regex guard.
  • Eval categories: Registered in evals/__init__.py as a dict mapping name → module path + runner type. Adding a new eval category means adding a case file and a registry entry.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.