Dash
Self-learning data agent for teams that need grounded answers from company data, business rules, and proven query patterns.
This guide follows the reviewed application revision, which pins Agno 2.7.0. Use its checked-in requirements to reproduce the application.
Dash is a self-learning data agent for teams that need grounded answers from company data, business rules, and proven query patterns.
Data and analytics teams need answers that respect metric definitions, schema quirks, business rules, and queries that are known to work. Dash brings those inputs together as six layers of context and retains useful corrections through a learning loop.
Ask a question in English and Dash queries read-only company data, interprets the result, and explains it using your business context.
Chat with Dash in Slack, the terminal, or the AgentOS UI. The code is public at agno-agi/dash.
How it works
Dash runs as an Agno team in coordinate mode, with a leader that routes each request to two specialists:
| Agent | Role |
|---|---|
| Analyst | Reads company data (read-only), generates SQL, interprets results |
| Engineer | Builds reusable views and summary tables in the dash schema |
| Leader | Routes queries, coordinates the team, posts to Slack |
Schema boundaries: Company data lives in the public schema; agent-created views and summary tables live in the dash schema. The Analyst’s engine defaults to read-only transactions. The Engineer’s SQLAlchemy event listener blocks explicitly public-qualified writes, but its regex does not cover unqualified names resolved through search_path. Use PostgreSQL roles and grants to enforce the required production write boundary.
Six layers of context
| Layer | Purpose | Source |
|---|---|---|
| Table Usage | Schema, columns, relationships | knowledge/tables/*.json |
| Human Annotations | Metrics, definitions, business rules | knowledge/business/*.json |
| Query Patterns | SQL that is known to work | knowledge/queries/*.sql |
| Institutional Knowledge | Docs, wikis, external references | MCP (optional) |
| Learnings | Error patterns and discovered fixes | Agno Learning Machine |
| Runtime Context | Live schema changes | introspect_schema tool |
Self-learning
Dash is instructed to retrieve relevant knowledge before generating SQL and can use stored learnings. When a query fails, it can diagnose the error and save a useful correction. Two complementary systems make this work:
| System | Stores | How it evolves |
|---|---|---|
| Knowledge | Validated queries, table schemas, business rules | Curated by you and refined by Dash |
| Learnings | Error patterns and discovered fixes | Managed automatically by the Learning Machine |
For example, Dash can save a correction when a churn query filters on status instead of ended_at IS NULL. Your MRR definition can live in knowledge/business/ for later retrieval. Saved context helps the team reuse corrections; validate its answers and queries against your data.
Insights you can act on
Dash reasons about what makes an answer useful. Ask "Which plan has the highest churn rate?" and you get the number, the comparison across plans, the trend behind it, and any caveats from your business rules.
Run locally
git clone https://github.com/agno-agi/dash.git && cd dash
cp example.env .env
# Edit .env and add your OPENAI_API_KEY
docker compose up -d --build
# Generate sample data and load knowledge
docker exec -it dash-api python scripts/generate_data.py
docker exec -it dash-api python scripts/load_knowledge.pyConfirm Dash is running at http://localhost:8000/docs. The Dash README walks through this step by step.
Connect to the AgentOS UI
- Open os.agno.com and log in.
- Click Connect OS, choose Local, and enter
http://localhost:8000. - Click Connect.
Deploy to Railway
Railway deployment uses .env.production to keep production credentials separate from local dev.
cp example.env .env.production
# Edit .env.production and set OPENAI_API_KEYDeploy infrastructure
railway login
./scripts/railway_up.shThis creates the Railway project, database, and app service. The app will crash-loop until the JWT key is added in the next step. That's expected.
Get your JWT key
Production requires a JWT_VERIFICATION_KEY from AgentOS. You need the Railway domain from step 1 to set this up.
- Copy your Railway domain from the output of step 1 (e.g.
dash-production-xxxx.up.railway.app). - Open os.agno.com and log in.
- Click Connect OS, choose Live, and paste your Railway URL.
- Go to Settings → OS & Security and turn on Token-Based Authorization (JWT). The UI generates a key pair and shows you the public key.
- Add the public key to
.env.production, wrapped in single quotes:
JWT_VERIFICATION_KEY='-----BEGIN PUBLIC KEY-----
MIIBIjANBgkq...
-----END PUBLIC KEY-----'Push environment and redeploy
set -a
source .env.production
set +a
railway variables --set "JWT_VERIFICATION_KEY=$JWT_VERIFICATION_KEY" --service dash
./scripts/railway_redeploy.shThis loads the quoted, shell-compatible production env file and sends the JWT key directly. The reviewed railway_env.sh exits after its first variable on Bash 5 because its counter increment fails under set -e. Apply other changed production variables explicitly through Railway until that upstream script is fixed.
The Dash README covers this flow in more detail.
Production operations
Database scripts must run inside Railway's network. The internal hostname pgvector.railway.internal is unreachable from your local machine, so SSH into the running container:
railway ssh --service dash
# Inside the container:
python scripts/generate_data.py
python scripts/load_knowledge.pyOther operations run locally:
railway logs --service dash
railway openConnect to Slack
Dash can receive DMs, @mentions, and thread replies, and can post to channels proactively. Each Slack thread maps to one Dash session.
- Run Dash with a public URL (ngrok locally, or your Railway domain).
- Create and install the Slack app from the manifest in
docs/SLACK_CONNECT.md. - Set
SLACK_TOKENandSLACK_SIGNING_SECRET, then restart Dash. - In Slack, confirm Event Subscriptions shows verified, then send a DM or @mention to test.
See the Slack setup guide for the manifest, ngrok commands, permissions, and troubleshooting.
Example prompts
Try these on the sample SaaS metrics dataset:
- What's our current MRR?
- Which plan has the highest churn rate?
- Show me revenue trends by plan over the last 6 months
- Which customers are at risk of churning?
Add your own data
Dash works best when it understands how your organization talks about data:
| Directory | Content |
|---|---|
knowledge/tables/ | Table meaning, column notes, data quality caveats |
knowledge/queries/ | Proven SQL patterns |
knowledge/business/ | Metric definitions, business rules, common gotchas |
Load or update knowledge at any time:
docker exec -it dash-api python scripts/load_knowledge.py
docker exec -it dash-api python scripts/load_knowledge.py --recreate # Rebuild vectorsThe Dash README covers loading your own data and scheduled proactive tasks.
Run evals
Five eval categories using Agno's eval framework:
| Category | Eval type | What it tests |
|---|---|---|
| accuracy | AccuracyEval (1-10) | Correct data and meaningful insights |
| routing | ReliabilityEval | Team routes to the correct agent and tools |
| security | AgentAsJudgeEval (binary) | No credential or secret leaks |
| governance | AgentAsJudgeEval (binary) | Refuses destructive SQL operations |
| boundaries | AgentAsJudgeEval (binary) | Schema access boundaries respected |
docker exec -it dash-api python -m evals
docker exec -it dash-api python -m evals --category accuracy
docker exec -it dash-api python -m evals --verboseSource
Dash is public at agno-agi/dash. The README covers the full architecture, the data model, and the security setup.