Skip to main content
The Dash team is a working text-to-SQL system with a structural separation between the agent that reads data and the agent that builds reusable views.
Two members and one leader, sharing a single learning store.

The split

The boundary is enforced at the database engine, not in the prompt. The Analyst’s connection physically cannot write, and the Engineer’s writes physically cannot touch public. These hold even if the model goes off-script.

How a question flows

  1. User: “What’s our MRR trend by plan?”
  2. Leader retrieves shared learnings (error patterns, gotchas) and routes to Analyst.
  3. Analyst retrieves table metadata + matching query patterns from knowledge.
  4. Analyst writes SQL grounded in the retrieved patterns.
  5. Analyst executes against public (read-only).
  6. Analyst interprets results, returns insight.
  7. Leader synthesizes and replies.
If the Analyst hits a recurring need (a query the Engineer should turn into a view), it asks the Engineer. The Engineer creates dash.monthly_mrr_by_plan as a view, records it in knowledge, the Analyst prefers it next time.

The self-learning loop

When the Analyst hits a SQL error and finds a fix, it saves the pattern via LearningMachine:
Next time the same shape of question hits, the learning gets retrieved before the Analyst writes SQL. Same error doesn’t happen twice. After a few weeks of use:
  • Knowledge holds the validated query library, table descriptions, business rules.
  • Learnings holds the error patterns and fixes the team has discovered.
  • The Analyst writes correct SQL faster because both are in context.

Why coordinate mode

TeamMode.coordinate means the leader decides who handles each request. Other modes: For text-to-SQL, coordinate is the right shape. One question maps to one specialist (Analyst for queries, Engineer for schema work). The leader picks based on the user’s intent.

What runs where

See it in action

The first four go to the Analyst. The fifth goes to the Engineer. For a from-scratch tutorial that builds a Dash-style agent on your own data, see Tutorial: Dash. Source: agents/dash/

Next

Investment Team →