Text-to-SQL

Coordinate an Analyst and Engineer through the Dash team.

This walkthrough follows Demo OS at the reviewed revision, which pins Agno 2.8.1. Use the application’s checked-in requirements.

Dash is a coordinate-mode team with an Analyst and Engineer. Its leader chooses work for members and synthesizes their results.

The split

ComponentConfigured role
AnalystQuery company data using an engine with read-only transactions by default
EngineerBuild reusable views and summary tables in the dash schema
LeaderCoordinate member work and explain the result

The Analyst uses SQLTools(db_engine=get_readonly_engine()); SQLTools(read_only=True) is not the pinned API. The Engineer has an explicit-public-write regex guard, but unqualified table names can bypass that check through search_path. Use database roles and grants for a production write boundary.

How a question flows

The leader can ask the Analyst for a metric, ask the Engineer for a reusable query artifact, and combine results. Both specialists can search dash_knowledge; their instructions guide retrieval. The source does not require exactly one member or a fixed tool sequence for every question.

The self-learning loop

The leader and members share learned knowledge. They can save corrections and reuse prior lessons. Inspect saved content and validate later queries; the configuration does not guarantee that an error can never recur.

Why coordinate mode

Coordinate mode lets the leader choose members and tasks, then synthesize their replies. Route mode dispatches to one member and returns that member’s output directly. Broadcast sends the task to members, while tasks mode manages decomposed work. Choose the control flow that matches your application.

What runs where

The AgentOS process serves the team; PostgreSQL stores its application data and knowledge. Dash content is loaded explicitly through agents.dash.scripts.load_knowledge, not at application boot.

See it in action

Complete the Dash sample-data and knowledge setup, select Dash, and ask:

What is our current MRR?
Which plan has the highest churn rate?
Show the query and the business definition used in the answer.

Inspect the SQL, result, and retrieved context together.

Next

agents/dash/team.py · agents/dash/tools/build.py · agents/dash/db_utils.py

Run Demo OS · Current AgentOS documentation