返回列表
🧠 阿头学 · 💬 讨论题

Dash v2:把数据问答做成会自我长大的内部系统

这篇文章最有价值的判断是“数据 agent 成败不在写 SQL,而在能否吃到业务语义并把高频问题沉淀成基础设施”,但作者把 Dash 包装成“30 人以上公司都需要”的通用答案,明显说过头了。
打开原文 ↗

2026-04-10 原文链接 ↗
阅读简报
双语对照
完整翻译
原文
讨论归档

核心观点

  • 语义比模型更重要 作者对 text-to-SQL 的核心批评是成立的:只有 schema 没有业务规则,系统大概率会写出“语法对、业务错”的 SQL;像 `ended_at IS NULL`、抽样数据不能直接汇总、年付折扣这类语义,决定了答案是否可信。
  • 真正的价值在复利,不在一次回答 Dash 的亮点不是多智能体噱头,而是把重复问题自动沉淀为 view、汇总表和知识条目;这意味着系统如果跑顺,组织数据能力会随着使用变强,而不是每次都重新问、重新查。
  • 安全设计有工程含量,但不等于整体安全 Analyst 只读、Engineer 仅能写 `dash schema`、Leader 不碰数据库,这些硬边界比 prompt 限制可靠得多;但作者把“防止误写生产库”讲成“系统安全”,这明显缩窄了风险面,数据泄露、越权读取、Slack 侧暴露并没有被充分解决。
  • 落地成本被刻意讲轻了 文章嘴上说“把自己的数据替换进去就行”,但实际要求团队维护表知识、已验证查询、业务规则,这本质上是在补企业语义层和治理层;真正难的不是 Docker 跑起来,而是组织有没有能力长期维护这套知识资产。
  • 营销叙事强于证据叙事 “每家 30 人以上公司都需要”“能覆盖 80% 日常问题”都是强判断,但文中没有给出 benchmark、ROI、失败案例或人工复核成本,这些结论更像增长文案,不像被验证过的工程结论。

跟我们的关联

  • 对 ATou 意味着什么、下一步怎么用 这篇文章最值得 ATou 吸收的是“重复问题要产品化,不要反复人工回答”;下一步可以盘点自己高频被问的 10 个问题,先手工沉淀成标准查询、定义和说明,而不是急着上多 agent。
  • 对 Neta 意味着什么、下一步怎么用 对 Neta 来说,Dash 证明了“知识工程”比“模型升级”更值得投资源;下一步应该先建立业务规则、已验证案例和纠错闭环,再判断是否需要 agent 层,而不是先买一个会说话的 SQL 机器人。
  • 对 Uota 意味着什么、下一步怎么用 对 Uota 来说,这类系统的产品机会不在“更强聊天”,而在“嵌入 Slack/工作流并持续降低下一次成本”;下一步可以围绕“高频问题自动沉淀”为核心,设计记忆、视图生成和主动推送,而不是只做对话界面。
  • 对投资判断意味着什么、下一步怎么用 这类赛道有价值,但护城河不会来自“多智能体”标签,而来自企业语义层、治理能力和工作流嵌入;下一步评估项目时要追问知识维护成本、准确率基准、权限模型和长期 adoption,而不是被 demo 和开源热度带节奏。

讨论引子

1. 如果一套数据 agent 需要团队先维护大量业务规则和已验证查询,那它到底是在“降低成本”,还是把成本从分析师问答转移到了知识工程? 2. “自学习”在企业数据场景里到底是优势还是风险源,谁来为错误沉淀进知识库负责? 3. 对多数中型公司而言,先做 semantic layer / dbt metrics / BI 治理,会不会比先上多智能体更务实?

每一家人数超过 30 的公司,都应该有一个内部数据 agent。

今天把这件事做得非常简单:用 Dash(免费、开源),跑在自家云上(私有、安全),再通过 Slack 把访问权限给到团队。

大多数拥抱 AI 的公司,早就做了自己的版本:

  • OpenAI: OpenAI 内部自研数据 agent

  • Vercel: d0,另一篇文章

  • Uber: QueryGPT

  • LinkedIn: SQLBot

  • Salesforce: Horizon Agent

  • DoorDash: 值得一读,但 buzzword 太多

这篇文章会带你搭建一个一流的数据系统,并通过 Slack 提供给团队使用。做得好,Dash 应该能处理大约 80% 的日常数据问题,发送每日报告,并在任何人发问之前就抓到指标异常。

Dash 是什么?

Dash 是一个由 3 个 agent 组成的自学习数据系统。

它使用双层的知识与学习体系,带来非常出色的数据协作体验。可以在 Slack 里和它聊天,也可以用 AgentOS 的 UI。它当然会写 SQL、执行 SQL、解释数字代表什么,但更重要的是,当它犯错或被纠正时,它会从中学习。团队反复问同一个问题时,它会搭建基础设施,让下次回答更快。

这是一个自学习的数据系统,不只是一个数据 agent。

Dash 使用自己的 PostgreSQL 数据库。不会把它直接指向生产数据库。需要逐步把希望它处理的表加载进去,并同时提供让它真正有用的上下文。这一步大多数人会跳过,而这一步也正是它特别的地方。

下面是在 Slack 里的样子:

mgr.create(
    name="knowledge-refresh",
    cron="0 4 * * *",
    endpoint="/knowledge/reload",
    payload={},
    timezone="UTC",
    description="Daily knowledge file re-index",
)

注:这是合成数据。虽然挺疯的,但还没疯到把真实数字发在这里 😂

再看 AgentOS UI:

git clone https://github.com/agno-agi/dash && cd dash
cp example.env .env  # Add OPENAI_API_KEY

docker compose up -d --build

docker exec -it dash-api python scripts/generate_data.py
docker exec -it dash-api python scripts/load_knowledge.py

在 AgentOS UI 里,可以和 agents 聊天,查看 sessions、traces、metrics、schedules。它就是那个你以前不知道自己需要的 agent 平台。

它怎么工作

1) 上下文决定一切

大多数数据 agent 只拿到一份 schema dump,然后被要求从只存在于数据工程师脑海里的业务逻辑中写出 SQL。这就是它们不行的原因。列名和类型并不能告诉你数据是什么。它们不会告诉你 ended_at IS NULL 代表订阅仍在生效。不会告诉你年付有 10% 折扣。不会告诉你用量指标每月只抽样 3–5 天,而不是每天都有,所以把它们加总只会得到垃圾结果。

Dash 用的是一套精心策划的知识体系,底层由 PgVector 支撑。它包含:

1a) 表元数据:表结构、列类型、每个字段的含义、每张表适合用来做什么、各种坑(比如日期是某种特定格式)。每张表都会带着用例与数据质量说明。例如:status 只有 active、churned、trial;但真相永远要对 subscriptions 做核对。

1b) 已验证的查询(必备):经过实战检验的 SQL,包含正确的 JOIN、正确的 NULL 处理、正确的边界情况处理。Analyst 收到问题后会先搜索知识库。在写第一行 SQL 之前,它已经知道数据长什么样,也知道哪些陷阱要避开。

1c) 业务规则:MRR 怎么算,NRR 是什么含义,客户为什么会有多条订阅记录(因为升级会关掉旧行并开启新行)。这些上下文,决定了答案是正确的,还是看起来很像但其实错的。

这套知识由用户来策划,但让 Dash 与众不同的是它能自己学会更多东西。

2) 自学习循环

除了知识以外,Dash 还会自动(或通过 agent 调用工具的方式)记录它学到的东西。Analyst 遇到类型错误并修复后,修复会被保存。用户纠正结果时,纠正会被记录。系统发现数据的怪癖时,也会写下来。

下一次任何人问类似问题,Analyst 会在写 SQL 之前先检查 learnings。Dash 用得越多就越强。

3) 三个 agent,两套 schema

Dash 由三个 agent 组成。Leader 负责路由请求并综合答案。Analyst 负责写并运行 SQL。Engineer 负责构建 views、汇总表、计算后的数据。它们协同工作,共享知识与 learnings。

3a) Leader 没有任何 SQL 工具,碰不到数据库。

3b) Analyst 只读。不是因为 prompt 里写了只读,而是因为 PostgreSQL 连接配置了 default_transaction_read_only=on。数据库自己拒绝写入。没有任何 prompt injection 或花式 jailbreak 能改变这点。数据库会拒绝。

3c) Engineer 可以写,但只能写到 dash schema。一个 SQLAlchemy event listener 会在每条 SQL 执行前拦截语句,阻止任何指向 public schema 的操作。公司的数据不会被触碰。

因此会有两套 schema,而且边界是硬的:

  • public schema:公司数据。由你来加载。agents 读取它。

  • dash schema:views、汇总表、计算数据。由 Engineer 拥有并维护。人类不去动它。

*另外还有一个 ai schema,Dash 会把 sessions、learnings、knowledge vectors 以及其它运行数据存放在这里。它支撑了 AgentOS UI。

不会直接和它交互,但自我改进循环靠的就是它(Dash 改进自己的代码库)。v3 会讲更多。*

别人都没有的那部分

当 Leader 发现团队总在问同一个昂贵的问题(按套餐的 MRR、按分群的 churn、收入瀑布图),它会让 Engineer 去建一个 view。

Engineer 创建 dash.monthly_mrr_by_plan。这是一张 SQL view,会 join 对的表,处理所有边界情况,输出干净的结果。然后它会做最关键的一步:调用 update_knowledge,把这个 view 记录进知识库。记录它是什么、有哪些列、示例查询。

下次有人再问按套餐的 MRR,Analyst 会搜索知识库,找到这个 view,直接查询它。无需复杂 join。不会把 NULL 处理写错。更快。预先验证过。结果一致。

这些 agents 会在彼此的工作之上继续构建。Engineer 负责搭基础设施。Analyst 发现并使用它。Leader 识别模式并触发循环。久而久之,dash schema 会被 views 和汇总表填满,而这些东西没有任何人手动创建过。它是一层由系统为自己搭起来的分析层,形状由团队真实会问的问题决定。

完整闭环

  1. 你提一个问题。Leader 分派任务。

  2. Analyst 搜索知识库,写出正确 SQL,返回洞见。

  3. 好的查询会被保存到知识库。错误会变成 learnings。

  4. 重复模式会变成 views。views 会被记录到知识库。

  5. 下一次,Analyst 直接用 view。更快、预先验证、一致。

前面提过,Dash 不是一个聊天机器人。它是一套系统,会沉淀关于数据的组织知识,并随着使用不断复利。

自己搭一套

Dash 免费且开源,去 github repo 按 README 跟着做就行,那里有更深入的说明。

快速开始

https://www.linkedin.com/blog/engineering/ai/practical-text-to-sql-for-data-analytics

这会用一个合成数据集(约 900 个客户、6 张表)启动 Dash,并加载知识库(表元数据、已验证查询、业务规则)。

可以在不接任何真实数据的情况下演示整个系统。

连接 Web UI

  1. 打开 os.agno.com

  2. Add OS → Local → http://localhost:8000

  3. Connect

python scripts/load_knowledge.py             # Upsert changes
python scripts/load_knowledge.py --recreate  # Fresh start

连接 Slack

Dash 生活在 Slack 里。可以私聊它,也可以在频道里 @Dash。每个 thread 对应一个 session,所以每段对话都有自己的上下文。

  1. 运行 Dash,并给它一个公网 URL(本地用 ngrok,或用你部署后的域名)。

  2. 按 docs/SLACK_CONNECT 的说明,通过 manifest 创建并安装 Slack app。

  3. 设置 SLACK_TOKENSLACK_SIGNING_SECRET,然后重启 Dash。

https://openai.com/index/inside-our-in-house-data-agent/

添加自己的数据

Dash 跑起来后,要把它变成自己的系统,其实就是用你的数据替换示例数据集,并给 Dash 提供它需要的上下文,就这么简单。

1) 把表加载进 public schema

用你现有的任何 pipeline 都行。pg_dump、Python 脚本、dbt、Airbyte 都可以。无所谓。Dash 从 public 读取,但永远不会写入它。

可以用现有的工作流编排工具(airflow、dagster),也可以用 Dash 自带的 scheduler 来加载数据(后面会讲)。

2) 添加表知识

对每张表,在 knowledge/tables/ 里建一个 JSON 文件:

这是投入产出比最高的一件事。知识越好,Dash 表现越好。

也可以自动生成,但这事改天再说。

3) 添加已验证查询

针对最常见的问题,把能给出正确答案的 SQL 写好,并保存到 knowledge/queries/

https://os.agno.com

这是最简单的方式,确保 Dash 回答日常问题时使用你们内部的语义。记住,你的工作是给团队提供最好的数据协作体验,这一步让它成为可能。

4) 添加业务规则

knowledge/business/ 里记录指标、定义、坑点:

https://os.agno.com

这对 Dash 很有用,但如果工作量太大也可以跳过。

5) 加载知识

都设置好以后,加载知识库,让 Dash 能访问。

https://github.com/agno-agi/agno

定时任务

Dash 自带 scheduler。任何容器能扛得住的任务都能定时跑(比如别在 2gb 的容器上安排 90TB 的 map-reduce)。

开箱即用,dash 预置了 1 个 schedule,会在每天 UTC 早上 4 点重建知识库索引:

https://github.com/agno-agi/dash

用的就是同一种模式,可以用来安排任何任务:

  • 每日指标汇总发到 Slack

  • 异常检测任务

  • 每周邮件 digest

  • 自动化数据质量检查

注册一个 schedule,指向一个 endpoint,剩下的 Dash 全包。最好的 agents 会主动出击,而定时任务就是迈向主动性的第一步。

运行 Evals

Dash 内置五类 eval:

  • Accuracy: 数据正确且洞见有意义

  • Routing: 团队请求被路由到正确的 agent

  • Security: 不泄露凭据或密钥

  • Governance: 拒绝破坏性 SQL 操作

  • Boundaries: schema 访问边界被严格遵守

{
  "metrics": [
    {
      "name": "MRR",
      "definition": "Sum of active subscriptions excluding trials",
      "calculation": "SUM(mrr) FROM subscriptions WHERE status = 'active'"
    }
  ],
  "common_gotchas": [
    {
      "issue": "Active subscription detection",
      "solution": "Filter on ended_at IS NULL, not status column"
    }
  ]
}

部署到生产环境

只用一条命令,就能把 Dash 部署到 railway:

Railway 用来起步挺好,但最终还是会希望它部署在你现有的数据基础设施所在的环境里。所有东西都容器化了,部署应该很直接。注意出网成本。

注:生产环境需要从 os.agno.com 获取一个 JWT_VERIFICATION_KEY 用于 RBAC。把 dash 暴露在公网 endpoint 上会非常离谱。

更多细节见 README。

接下来是什么

Dash 按系统工程的原则构建,可以在这里读更多:

https://openai.com/index/inside-our-in-house-data-agent/

如果大家感兴趣,后面可能会分别深挖系统的每一层:

  1. Agent Engineering: 业务逻辑层。模型、指令、工具、知识,以及自学习循环。

  2. Data Engineering: 上下文层。Memory、knowledge、learnings、storage。为什么数据层是整个栈里最被低估投入的一部分。

  3. Security Engineering: 认证、RBAC、治理、数据隔离,以及作为核心原语内建的审计链路。

  4. Interface Engineering: 把 agent 做成产品。REST APIs、web UIs、Slack、MCP,以及一个 agent 如何服务多个 surface。

  5. Infrastructure Engineering: Dash 如何部署与扩展。容器、部署、调度。

Every company with 30+ people should have an internal data agent.

Today I'm making it dead simple to build one: take Dash (free, open-source), run it in your cloud (private, secure), give your team access via Slack.

Most AI-forward companies have already built their own:

  • OpenAI: Inside OpenAI's in-house data agent

  • Vercel: d0, another post

  • Uber: QueryGPT

  • LinkedIn: SQLBot

  • Salesforce: Horizon Agent

  • DoorDash: good read, but too many buzzwords

This post will show you how to build a best-in-class data system and make it available to your team over Slack. If you do this well, Dash should handle roughly 80% of routine data questions, send daily reports, and catch metric anomalies before anyone asks.

What is Dash?

Dash is a self-learning data system made of 3 agents.

It uses a dual-tier knowledge and learning system to deliver an incredible work-with-your-data experience. You can chat with it via slack or the AgentOS UI. It obviously writes SQL, runs it, and tells you what the numbers mean but more importantly, when it makes a mistake or gets corrected, it learns from it. When your team keeps asking the same question, it builds infrastructure so the answer is faster next time.

A self-learning data system, not a data agent.

Dash uses its own PostgreSQL database. You don't point it at your production database. You progressively load the tables you want it to work with, along with the context it needs to be useful. This is the part most people skip, and is the part that makes it special.

Here's how it looks like in Slack:

mgr.create(
    name="knowledge-refresh",
    cron="0 4 * * *",
    endpoint="/knowledge/reload",
    payload={},
    timezone="UTC",
    description="Daily knowledge file re-index",
)

Note: this is synthetic data. I know I'm crazy, but not crazy enough to post our real numbers here 😂

And on the AgentOS UI:

git clone https://github.com/agno-agi/dash && cd dash
cp example.env .env  # Add OPENAI_API_KEY

docker compose up -d --build

docker exec -it dash-api python scripts/generate_data.py
docker exec -it dash-api python scripts/load_knowledge.py

Using the AgentOS UI, you can chat with your agents, view sessions, traces, metrics, and schedules. It's the agent platform you didn't know you needed.

How It Works

每一家人数超过 30 的公司,都应该有一个内部数据 agent。

今天把这件事做得非常简单:用 Dash(免费、开源),跑在自家云上(私有、安全),再通过 Slack 把访问权限给到团队。

大多数拥抱 AI 的公司,早就做了自己的版本:

  • OpenAI: OpenAI 内部自研数据 agent

  • Vercel: d0,另一篇文章

  • Uber: QueryGPT

  • LinkedIn: SQLBot

  • Salesforce: Horizon Agent

  • DoorDash: 值得一读,但 buzzword 太多

这篇文章会带你搭建一个一流的数据系统,并通过 Slack 提供给团队使用。做得好,Dash 应该能处理大约 80% 的日常数据问题,发送每日报告,并在任何人发问之前就抓到指标异常。

Dash 是什么?

Dash 是一个由 3 个 agent 组成的自学习数据系统。

它使用双层的知识与学习体系,带来非常出色的数据协作体验。可以在 Slack 里和它聊天,也可以用 AgentOS 的 UI。它当然会写 SQL、执行 SQL、解释数字代表什么,但更重要的是,当它犯错或被纠正时,它会从中学习。团队反复问同一个问题时,它会搭建基础设施,让下次回答更快。

这是一个自学习的数据系统,不只是一个数据 agent。

Dash 使用自己的 PostgreSQL 数据库。不会把它直接指向生产数据库。需要逐步把希望它处理的表加载进去,并同时提供让它真正有用的上下文。这一步大多数人会跳过,而这一步也正是它特别的地方。

下面是在 Slack 里的样子:

mgr.create(
    name="knowledge-refresh",
    cron="0 4 * * *",
    endpoint="/knowledge/reload",
    payload={},
    timezone="UTC",
    description="Daily knowledge file re-index",
)

注:这是合成数据。虽然挺疯的,但还没疯到把真实数字发在这里 😂

再看 AgentOS UI:

git clone https://github.com/agno-agi/dash && cd dash
cp example.env .env  # Add OPENAI_API_KEY

docker compose up -d --build

docker exec -it dash-api python scripts/generate_data.py
docker exec -it dash-api python scripts/load_knowledge.py

在 AgentOS UI 里,可以和 agents 聊天,查看 sessions、traces、metrics、schedules。它就是那个你以前不知道自己需要的 agent 平台。

它怎么工作

1) Context is everything

Most data agents get a schema dump and the impossible task of writing SQL from business logic that only lives in the data engineer's head. That's why they're bad. Column names and types tell you nothing about the data. They don't tell you that ended_at IS NULL means a subscription is active. That annual billing gets a 10% discount. That usage metrics are sampled 3-5 days per month, not daily, so summing them gives you garbage.

Dash uses a carefully curated knowledge system backed by PgVector. It contains:

1a) Table metadata: table schema, column types, what they mean, what to use each table for, the gotchas (date is a particular format). Every table ships with use cases and data quality notes. Eg: status is 'active', 'churned', or 'trial'; always check against subscriptions for ground truth.

1b) Validated queries (must have): battle-tested SQL with the right JOINs, the right NULL handling, the right edge cases. When the Analyst gets your question, it searches knowledge first. Before it writes a line of SQL, it already knows the shape of the data and which traps to avoid.

1c) Business rules: how MRR is calculated, what NRR means, that a customer can have multiple subscription records because upgrades close the old row and open a new one. This is the context that separates a correct answer from a plausible-looking wrong one.

This knowledge is curated by the user, but what makes Dash special is its ability to learns on its own.

1) 上下文决定一切

大多数数据 agent 只拿到一份 schema dump,然后被要求从只存在于数据工程师脑海里的业务逻辑中写出 SQL。这就是它们不行的原因。列名和类型并不能告诉你数据是什么。它们不会告诉你 ended_at IS NULL 代表订阅仍在生效。不会告诉你年付有 10% 折扣。不会告诉你用量指标每月只抽样 3–5 天,而不是每天都有,所以把它们加总只会得到垃圾结果。

Dash 用的是一套精心策划的知识体系,底层由 PgVector 支撑。它包含:

1a) 表元数据:表结构、列类型、每个字段的含义、每张表适合用来做什么、各种坑(比如日期是某种特定格式)。每张表都会带着用例与数据质量说明。例如:status 只有 active、churned、trial;但真相永远要对 subscriptions 做核对。

1b) 已验证的查询(必备):经过实战检验的 SQL,包含正确的 JOIN、正确的 NULL 处理、正确的边界情况处理。Analyst 收到问题后会先搜索知识库。在写第一行 SQL 之前,它已经知道数据长什么样,也知道哪些陷阱要避开。

1c) 业务规则:MRR 怎么算,NRR 是什么含义,客户为什么会有多条订阅记录(因为升级会关掉旧行并开启新行)。这些上下文,决定了答案是正确的,还是看起来很像但其实错的。

这套知识由用户来策划,但让 Dash 与众不同的是它能自己学会更多东西。

2) Self-learning loop

Separate from knowledge, Dash captures what it learns automatically (or agentically via tool calls). When the Analyst hits a type error and fixes it, the fix gets saved. When a user corrects a result, that correction is recorded. When the system discovers a data quirk, it notes it.

Next time anyone asks a similar question, the Analyst checks learnings before writing SQL. Dash gets better the more its used.

2) 自学习循环

除了知识以外,Dash 还会自动(或通过 agent 调用工具的方式)记录它学到的东西。Analyst 遇到类型错误并修复后,修复会被保存。用户纠正结果时,纠正会被记录。系统发现数据的怪癖时,也会写下来。

下一次任何人问类似问题,Analyst 会在写 SQL 之前先检查 learnings。Dash 用得越多就越强。

3) Three agents, two schemas

Dash is three agents. Leader routes requests and synthesizes answers. Analyst writes and runs SQL. Engineer builds views, summary tables, and computed data. They work together, sharing knowledge and learnings.

3a) The Leader has no SQL tools. It cannot touch the database.

3b) The Analyst is read-only. Not "read-only because the prompt says so"; read-only because the PostgreSQL connection is configured with default_transaction_read_only=on. The database itself rejects writes. No prompt injection or clever jailbreak changes this. The database says no.

3c) The Engineer can write, but only to the dash schema. A SQLAlchemy event listener intercepts every SQL statement before execution and blocks anything targeting the public schema. Your company data is untouchable.

This gives you two schemas with a hard boundary:

  • public schema: your company data. You load it. Agents read it.

  • dash schema: views, summary tables, computed data. The Engineer owns and maintains it. Humans don't touch it.

*There's also an ai schema where Dash stores its sessions, learnings, knowledge vectors, and other operational data. It powers the AgentOS UI.

You don't interact with it directly, but it's what powers the self-improvement loop (dash improving its own codebase). More on that in v3.*

The part nobody else has

When the Leader notices your team keeps asking the same expensive question (MRR by plan, churn by segment, revenue waterfall) it asks the Engineer to build a view.

The Engineer creates dash.monthly_mrr_by_plan. A SQL view joining the right tables, handling all edge cases, producing a clean result. Then it does the critical thing: it calls update_knowledge to record the view in the knowledge base. What it contains, what columns it has, example queries.

Next time someone asks about MRR by plan, the Analyst searches knowledge, finds the view, and queries it directly. No complex join. No risk of getting NULL handling wrong. Faster. Pre-validated. Consistent.

The agents build on each other's work. The Engineer creates infrastructure. The Analyst discovers and uses it. The Leader notices patterns and triggers the cycle. Over time, the dash schema fills with views and summary tables that nobody manually created. It's an analytics layer the system built for itself, shaped by what your team actually asks about.

The full loop

  1. You ask a question. Leader delegates.

  2. The Analyst searches knowledge, writes correct SQL, returns an insight.

  3. Good queries get saved to knowledge. Errors become learnings.

  4. Repeated patterns become views. Views get recorded to knowledge.

  5. Next time, the Analyst uses the view. Faster, pre-validated, consistent.

As I mentioned before, Dash isn't a chatbot. It's a system that accumulates institutional knowledge about your data and compounds with use.

Build Your Own

Dash is free and open-source, checkout the github repo and follow the README for in-depth instructions.

3) 三个 agent,两套 schema

Dash 由三个 agent 组成。Leader 负责路由请求并综合答案。Analyst 负责写并运行 SQL。Engineer 负责构建 views、汇总表、计算后的数据。它们协同工作,共享知识与 learnings。

3a) Leader 没有任何 SQL 工具,碰不到数据库。

3b) Analyst 只读。不是因为 prompt 里写了只读,而是因为 PostgreSQL 连接配置了 default_transaction_read_only=on。数据库自己拒绝写入。没有任何 prompt injection 或花式 jailbreak 能改变这点。数据库会拒绝。

3c) Engineer 可以写,但只能写到 dash schema。一个 SQLAlchemy event listener 会在每条 SQL 执行前拦截语句,阻止任何指向 public schema 的操作。公司的数据不会被触碰。

因此会有两套 schema,而且边界是硬的:

  • public schema:公司数据。由你来加载。agents 读取它。

  • dash schema:views、汇总表、计算数据。由 Engineer 拥有并维护。人类不去动它。

*另外还有一个 ai schema,Dash 会把 sessions、learnings、knowledge vectors 以及其它运行数据存放在这里。它支撑了 AgentOS UI。

不会直接和它交互,但自我改进循环靠的就是它(Dash 改进自己的代码库)。v3 会讲更多。*

别人都没有的那部分

当 Leader 发现团队总在问同一个昂贵的问题(按套餐的 MRR、按分群的 churn、收入瀑布图),它会让 Engineer 去建一个 view。

Engineer 创建 dash.monthly_mrr_by_plan。这是一张 SQL view,会 join 对的表,处理所有边界情况,输出干净的结果。然后它会做最关键的一步:调用 update_knowledge,把这个 view 记录进知识库。记录它是什么、有哪些列、示例查询。

下次有人再问按套餐的 MRR,Analyst 会搜索知识库,找到这个 view,直接查询它。无需复杂 join。不会把 NULL 处理写错。更快。预先验证过。结果一致。

这些 agents 会在彼此的工作之上继续构建。Engineer 负责搭基础设施。Analyst 发现并使用它。Leader 识别模式并触发循环。久而久之,dash schema 会被 views 和汇总表填满,而这些东西没有任何人手动创建过。它是一层由系统为自己搭起来的分析层,形状由团队真实会问的问题决定。

完整闭环

  1. 你提一个问题。Leader 分派任务。

  2. Analyst 搜索知识库,写出正确 SQL,返回洞见。

  3. 好的查询会被保存到知识库。错误会变成 learnings。

  4. 重复模式会变成 views。views 会被记录到知识库。

  5. 下一次,Analyst 直接用 view。更快、预先验证、一致。

前面提过,Dash 不是一个聊天机器人。它是一套系统,会沉淀关于数据的组织知识,并随着使用不断复利。

自己搭一套

Dash 免费且开源,去 github repo 按 README 跟着做就行,那里有更深入的说明。

Quick Start

https://www.linkedin.com/blog/engineering/ai/practical-text-to-sql-for-data-analytics

This starts Dash with a synthetic dataset (~900 customers, 6 tables) and loads the knowledge base (table metadata, validated queries, business rules).

You can demo the entire system without connecting any real data.

快速开始

https://www.linkedin.com/blog/engineering/ai/practical-text-to-sql-for-data-analytics

这会用一个合成数据集(约 900 个客户、6 张表)启动 Dash,并加载知识库(表元数据、已验证查询、业务规则)。

可以在不接任何真实数据的情况下演示整个系统。

Connect to the Web UI

  1. Open os.agno.com

  2. Add OS → Local → http://localhost:8000

  3. Connect

python scripts/load_knowledge.py             # Upsert changes
python scripts/load_knowledge.py --recreate  # Fresh start

连接 Web UI

  1. 打开 os.agno.com

  2. Add OS → Local → http://localhost:8000

  3. Connect

python scripts/load_knowledge.py             # Upsert changes
python scripts/load_knowledge.py --recreate  # Fresh start

Connect to Slack

Dash lives in Slack. You can DM it or mention it in a channel with @Dash. Each thread maps to one session, so every conversation gets its own context.

  1. Run Dash and give it a public URL (use ngrok for local, or your deployed domain).

  2. Follow instructions in docs/SLACK_CONNECT to create and install the Slack app from the manifest.

  3. Set SLACK_TOKEN and SLACK_SIGNING_SECRET, then restart Dash.

https://openai.com/index/inside-our-in-house-data-agent/

Adding Your Own Data

Once you have Dash running, making it your own is as simples as replacing the sample dataset with your data and giving Dash the context it needs.

连接 Slack

Dash 生活在 Slack 里。可以私聊它,也可以在频道里 @Dash。每个 thread 对应一个 session,所以每段对话都有自己的上下文。

  1. 运行 Dash,并给它一个公网 URL(本地用 ngrok,或用你部署后的域名)。

  2. 按 docs/SLACK_CONNECT 的说明,通过 manifest 创建并安装 Slack app。

  3. 设置 SLACK_TOKENSLACK_SIGNING_SECRET,然后重启 Dash。

https://openai.com/index/inside-our-in-house-data-agent/

添加自己的数据

Dash 跑起来后,要把它变成自己的系统,其实就是用你的数据替换示例数据集,并给 Dash 提供它需要的上下文,就这么简单。

1) Load your tables into the public schema

Use whatever pipeline you already have. pg_dump, a Python script, dbt, Airbyte; it doesn't matter. Dash reads from public and never writes to it.

You can use your existing workflow orchestration tools (airflow, dagster), or use Dash's built-in scheduler to load data (more on that later).

1) 把表加载进 public schema

用你现有的任何 pipeline 都行。pg_dump、Python 脚本、dbt、Airbyte 都可以。无所谓。Dash 从 public 读取,但永远不会写入它。

可以用现有的工作流编排工具(airflow、dagster),也可以用 Dash 自带的 scheduler 来加载数据(后面会讲)。

2) Add table knowledge

For each table, create a JSON file in knowledge/tables/:

This is the single highest-leverage thing you can do. The better your knowledge, the better Dash performs.

We can also auto-generate this, but we'll keep that for another day.

2) 添加表知识

对每张表,在 knowledge/tables/ 里建一个 JSON 文件:

这是投入产出比最高的一件事。知识越好,Dash 表现越好。

也可以自动生成,但这事改天再说。

3) Add validated queries

For your most common questions, write the SQL that gives the correct answer and save it in knowledge/queries/:

https://os.agno.com

This is the easiest way to make sure Dash uses your internal semantics for answering routine questions. Remember, your job is to deliver the best work-with-your-data experience for your team, this makes it possible.

3) 添加已验证查询

针对最常见的问题,把能给出正确答案的 SQL 写好,并保存到 knowledge/queries/

https://os.agno.com

这是最简单的方式,确保 Dash 回答日常问题时使用你们内部的语义。记住,你的工作是给团队提供最好的数据协作体验,这一步让它成为可能。

4) Add business rules

Document your metrics, definitions, and gotchas in knowledge/business/:

https://os.agno.com

This is helpful context for Dash but you can skip if its too much work.

4) 添加业务规则

knowledge/business/ 里记录指标、定义、坑点:

https://os.agno.com

这对 Dash 很有用,但如果工作量太大也可以跳过。

5) Load knowledge

After setting everything up, load your knowledge base so Dash can access it.

https://github.com/agno-agi/agno

5) 加载知识

都设置好以后,加载知识库,让 Dash 能访问。

https://github.com/agno-agi/agno

Scheduled Tasks

Dash ships with a built-in scheduler. You can schedule any type of task that your container can handle (eg: don't schedule a 90TB map-reduce task on a 2gb container).

Out of the box, dash comes with 1 pre-built schedule that re-indexes your knowledge base every night at 4am UTC:

https://github.com/agno-agi/dash

This is the same pattern you'd use to schedule anything:

  • Daily metric summaries posted to Slack

  • Anomaly detection runs

  • Weekly email digests

  • Automated data quality checks

Register a schedule, point it at an endpoint, Dash handles the rest. The best agents are proactive, and scheduled tasks is the first step in that direction.

定时任务

Dash 自带 scheduler。任何容器能扛得住的任务都能定时跑(比如别在 2gb 的容器上安排 90TB 的 map-reduce)。

开箱即用,dash 预置了 1 个 schedule,会在每天 UTC 早上 4 点重建知识库索引:

https://github.com/agno-agi/dash

用的就是同一种模式,可以用来安排任何任务:

  • 每日指标汇总发到 Slack

  • 异常检测任务

  • 每周邮件 digest

  • 自动化数据质量检查

注册一个 schedule,指向一个 endpoint,剩下的 Dash 全包。最好的 agents 会主动出击,而定时任务就是迈向主动性的第一步。

Run Evals

Dash ships with five eval categories:

  • Accuracy: correct data and meaningful insights

  • Routing: team routes to the correct agent

  • Security: no credential or secret leaks

  • Governance: refuses destructive SQL operations

  • Boundaries: schema access boundaries respected

{
  "metrics": [
    {
      "name": "MRR",
      "definition": "Sum of active subscriptions excluding trials",
      "calculation": "SUM(mrr) FROM subscriptions WHERE status = 'active'"
    }
  ],
  "common_gotchas": [
    {
      "issue": "Active subscription detection",
      "solution": "Filter on ended_at IS NULL, not status column"
    }
  ]
}

Deploy to Production

You can deploy Dash to railway with one command:

Railway is fine for getting started, eventually you'd want it wherever your existing data infrastructure lives. Everything is containerized so should be straightforward to deploy. Be mindful of the egress costs.

Note: Production requires a JWT_VERIFICATION_KEY from os.agno.com for RBAC. It would be insane to expose dash on a public endpoint.

See the README for more details.

What's Next

Dash is built with systems engineering principles, you can read more here:

https://openai.com/index/inside-our-in-house-data-agent/

If there's interest, I might do deep dives on each layer of the system:

  1. Agent Engineering: The business logic. Model, instructions, tools, knowledge, and the self-learning loop.

  2. Data Engineering: The context layer. Memory, knowledge, learnings, storage. Why the data layer is the most underinvested part of the stack.

  3. Security Engineering: Auth, RBAC, governance, data isolation, and audit trails designed into the system as core primitives.

  4. Interface Engineering: Turning an agent into a product. REST APIs, web UIs, Slack, MCP, and how one agent serves multiple surfaces.

  5. Infrastructure Engineering: How to deploy and scale Dash. Containers, deployment, scheduling.

https://careersatdoordash.com/blog/beyond-single-agents-doordash-building-collaborative-ai-ecosystem/

Thank you for reading, here are some links for reference:

运行 Evals

Dash 内置五类 eval:

  • Accuracy: 数据正确且洞见有意义

  • Routing: 团队请求被路由到正确的 agent

  • Security: 不泄露凭据或密钥

  • Governance: 拒绝破坏性 SQL 操作

  • Boundaries: schema 访问边界被严格遵守

{
  "metrics": [
    {
      "name": "MRR",
      "definition": "Sum of active subscriptions excluding trials",
      "calculation": "SUM(mrr) FROM subscriptions WHERE status = 'active'"
    }
  ],
  "common_gotchas": [
    {
      "issue": "Active subscription detection",
      "solution": "Filter on ended_at IS NULL, not status column"
    }
  ]
}

部署到生产环境

只用一条命令,就能把 Dash 部署到 railway:

Railway 用来起步挺好,但最终还是会希望它部署在你现有的数据基础设施所在的环境里。所有东西都容器化了,部署应该很直接。注意出网成本。

注:生产环境需要从 os.agno.com 获取一个 JWT_VERIFICATION_KEY 用于 RBAC。把 dash 暴露在公网 endpoint 上会非常离谱。

更多细节见 README。

接下来是什么

Dash 按系统工程的原则构建,可以在这里读更多:

https://openai.com/index/inside-our-in-house-data-agent/

如果大家感兴趣,后面可能会分别深挖系统的每一层:

  1. Agent Engineering: 业务逻辑层。模型、指令、工具、知识,以及自学习循环。

  2. Data Engineering: 上下文层。Memory、knowledge、learnings、storage。为什么数据层是整个栈里最被低估投入的一部分。

  3. Security Engineering: 认证、RBAC、治理、数据隔离,以及作为核心原语内建的审计链路。

  4. Interface Engineering: 把 agent 做成产品。REST APIs、web UIs、Slack、MCP,以及一个 agent 如何服务多个 surface。

  5. Infrastructure Engineering: Dash 如何部署与扩展。容器、部署、调度。

Every company with 30+ people should have an internal data agent.

Today I'm making it dead simple to build one: take Dash (free, open-source), run it in your cloud (private, secure), give your team access via Slack.

Most AI-forward companies have already built their own:

  • OpenAI: Inside OpenAI's in-house data agent

  • Vercel: d0, another post

  • Uber: QueryGPT

  • LinkedIn: SQLBot

  • Salesforce: Horizon Agent

  • DoorDash: good read, but too many buzzwords

This post will show you how to build a best-in-class data system and make it available to your team over Slack. If you do this well, Dash should handle roughly 80% of routine data questions, send daily reports, and catch metric anomalies before anyone asks.

What is Dash?

Dash is a self-learning data system made of 3 agents.

It uses a dual-tier knowledge and learning system to deliver an incredible work-with-your-data experience. You can chat with it via slack or the AgentOS UI. It obviously writes SQL, runs it, and tells you what the numbers mean but more importantly, when it makes a mistake or gets corrected, it learns from it. When your team keeps asking the same question, it builds infrastructure so the answer is faster next time.

A self-learning data system, not a data agent.

Dash uses its own PostgreSQL database. You don't point it at your production database. You progressively load the tables you want it to work with, along with the context it needs to be useful. This is the part most people skip, and is the part that makes it special.

Here's how it looks like in Slack:

mgr.create(
    name="knowledge-refresh",
    cron="0 4 * * *",
    endpoint="/knowledge/reload",
    payload={},
    timezone="UTC",
    description="Daily knowledge file re-index",
)

Note: this is synthetic data. I know I'm crazy, but not crazy enough to post our real numbers here 😂

And on the AgentOS UI:

git clone https://github.com/agno-agi/dash && cd dash
cp example.env .env  # Add OPENAI_API_KEY

docker compose up -d --build

docker exec -it dash-api python scripts/generate_data.py
docker exec -it dash-api python scripts/load_knowledge.py

Using the AgentOS UI, you can chat with your agents, view sessions, traces, metrics, and schedules. It's the agent platform you didn't know you needed.

How It Works

1) Context is everything

Most data agents get a schema dump and the impossible task of writing SQL from business logic that only lives in the data engineer's head. That's why they're bad. Column names and types tell you nothing about the data. They don't tell you that ended_at IS NULL means a subscription is active. That annual billing gets a 10% discount. That usage metrics are sampled 3-5 days per month, not daily, so summing them gives you garbage.

Dash uses a carefully curated knowledge system backed by PgVector. It contains:

1a) Table metadata: table schema, column types, what they mean, what to use each table for, the gotchas (date is a particular format). Every table ships with use cases and data quality notes. Eg: status is 'active', 'churned', or 'trial'; always check against subscriptions for ground truth.

1b) Validated queries (must have): battle-tested SQL with the right JOINs, the right NULL handling, the right edge cases. When the Analyst gets your question, it searches knowledge first. Before it writes a line of SQL, it already knows the shape of the data and which traps to avoid.

1c) Business rules: how MRR is calculated, what NRR means, that a customer can have multiple subscription records because upgrades close the old row and open a new one. This is the context that separates a correct answer from a plausible-looking wrong one.

This knowledge is curated by the user, but what makes Dash special is its ability to learns on its own.

2) Self-learning loop

Separate from knowledge, Dash captures what it learns automatically (or agentically via tool calls). When the Analyst hits a type error and fixes it, the fix gets saved. When a user corrects a result, that correction is recorded. When the system discovers a data quirk, it notes it.

Next time anyone asks a similar question, the Analyst checks learnings before writing SQL. Dash gets better the more its used.

3) Three agents, two schemas

Dash is three agents. Leader routes requests and synthesizes answers. Analyst writes and runs SQL. Engineer builds views, summary tables, and computed data. They work together, sharing knowledge and learnings.

3a) The Leader has no SQL tools. It cannot touch the database.

3b) The Analyst is read-only. Not "read-only because the prompt says so"; read-only because the PostgreSQL connection is configured with default_transaction_read_only=on. The database itself rejects writes. No prompt injection or clever jailbreak changes this. The database says no.

3c) The Engineer can write, but only to the dash schema. A SQLAlchemy event listener intercepts every SQL statement before execution and blocks anything targeting the public schema. Your company data is untouchable.

This gives you two schemas with a hard boundary:

  • public schema: your company data. You load it. Agents read it.

  • dash schema: views, summary tables, computed data. The Engineer owns and maintains it. Humans don't touch it.

*There's also an ai schema where Dash stores its sessions, learnings, knowledge vectors, and other operational data. It powers the AgentOS UI.

You don't interact with it directly, but it's what powers the self-improvement loop (dash improving its own codebase). More on that in v3.*

The part nobody else has

When the Leader notices your team keeps asking the same expensive question (MRR by plan, churn by segment, revenue waterfall) it asks the Engineer to build a view.

The Engineer creates dash.monthly_mrr_by_plan. A SQL view joining the right tables, handling all edge cases, producing a clean result. Then it does the critical thing: it calls update_knowledge to record the view in the knowledge base. What it contains, what columns it has, example queries.

Next time someone asks about MRR by plan, the Analyst searches knowledge, finds the view, and queries it directly. No complex join. No risk of getting NULL handling wrong. Faster. Pre-validated. Consistent.

The agents build on each other's work. The Engineer creates infrastructure. The Analyst discovers and uses it. The Leader notices patterns and triggers the cycle. Over time, the dash schema fills with views and summary tables that nobody manually created. It's an analytics layer the system built for itself, shaped by what your team actually asks about.

The full loop

  1. You ask a question. Leader delegates.

  2. The Analyst searches knowledge, writes correct SQL, returns an insight.

  3. Good queries get saved to knowledge. Errors become learnings.

  4. Repeated patterns become views. Views get recorded to knowledge.

  5. Next time, the Analyst uses the view. Faster, pre-validated, consistent.

As I mentioned before, Dash isn't a chatbot. It's a system that accumulates institutional knowledge about your data and compounds with use.

Build Your Own

Dash is free and open-source, checkout the github repo and follow the README for in-depth instructions.

Quick Start

https://www.linkedin.com/blog/engineering/ai/practical-text-to-sql-for-data-analytics

This starts Dash with a synthetic dataset (~900 customers, 6 tables) and loads the knowledge base (table metadata, validated queries, business rules).

You can demo the entire system without connecting any real data.

Connect to the Web UI

  1. Open os.agno.com

  2. Add OS → Local → http://localhost:8000

  3. Connect

python scripts/load_knowledge.py             # Upsert changes
python scripts/load_knowledge.py --recreate  # Fresh start

Connect to Slack

Dash lives in Slack. You can DM it or mention it in a channel with @Dash. Each thread maps to one session, so every conversation gets its own context.

  1. Run Dash and give it a public URL (use ngrok for local, or your deployed domain).

  2. Follow instructions in docs/SLACK_CONNECT to create and install the Slack app from the manifest.

  3. Set SLACK_TOKEN and SLACK_SIGNING_SECRET, then restart Dash.

https://openai.com/index/inside-our-in-house-data-agent/

Adding Your Own Data

Once you have Dash running, making it your own is as simples as replacing the sample dataset with your data and giving Dash the context it needs.

1) Load your tables into the public schema

Use whatever pipeline you already have. pg_dump, a Python script, dbt, Airbyte; it doesn't matter. Dash reads from public and never writes to it.

You can use your existing workflow orchestration tools (airflow, dagster), or use Dash's built-in scheduler to load data (more on that later).

2) Add table knowledge

For each table, create a JSON file in knowledge/tables/:

This is the single highest-leverage thing you can do. The better your knowledge, the better Dash performs.

We can also auto-generate this, but we'll keep that for another day.

3) Add validated queries

For your most common questions, write the SQL that gives the correct answer and save it in knowledge/queries/:

https://os.agno.com

This is the easiest way to make sure Dash uses your internal semantics for answering routine questions. Remember, your job is to deliver the best work-with-your-data experience for your team, this makes it possible.

4) Add business rules

Document your metrics, definitions, and gotchas in knowledge/business/:

https://os.agno.com

This is helpful context for Dash but you can skip if its too much work.

5) Load knowledge

After setting everything up, load your knowledge base so Dash can access it.

https://github.com/agno-agi/agno

Scheduled Tasks

Dash ships with a built-in scheduler. You can schedule any type of task that your container can handle (eg: don't schedule a 90TB map-reduce task on a 2gb container).

Out of the box, dash comes with 1 pre-built schedule that re-indexes your knowledge base every night at 4am UTC:

https://github.com/agno-agi/dash

This is the same pattern you'd use to schedule anything:

  • Daily metric summaries posted to Slack

  • Anomaly detection runs

  • Weekly email digests

  • Automated data quality checks

Register a schedule, point it at an endpoint, Dash handles the rest. The best agents are proactive, and scheduled tasks is the first step in that direction.

Run Evals

Dash ships with five eval categories:

  • Accuracy: correct data and meaningful insights

  • Routing: team routes to the correct agent

  • Security: no credential or secret leaks

  • Governance: refuses destructive SQL operations

  • Boundaries: schema access boundaries respected

{
  "metrics": [
    {
      "name": "MRR",
      "definition": "Sum of active subscriptions excluding trials",
      "calculation": "SUM(mrr) FROM subscriptions WHERE status = 'active'"
    }
  ],
  "common_gotchas": [
    {
      "issue": "Active subscription detection",
      "solution": "Filter on ended_at IS NULL, not status column"
    }
  ]
}

Deploy to Production

You can deploy Dash to railway with one command:

Railway is fine for getting started, eventually you'd want it wherever your existing data infrastructure lives. Everything is containerized so should be straightforward to deploy. Be mindful of the egress costs.

Note: Production requires a JWT_VERIFICATION_KEY from os.agno.com for RBAC. It would be insane to expose dash on a public endpoint.

See the README for more details.

What's Next

Dash is built with systems engineering principles, you can read more here:

https://openai.com/index/inside-our-in-house-data-agent/

If there's interest, I might do deep dives on each layer of the system:

  1. Agent Engineering: The business logic. Model, instructions, tools, knowledge, and the self-learning loop.

  2. Data Engineering: The context layer. Memory, knowledge, learnings, storage. Why the data layer is the most underinvested part of the stack.

  3. Security Engineering: Auth, RBAC, governance, data isolation, and audit trails designed into the system as core primitives.

  4. Interface Engineering: Turning an agent into a product. REST APIs, web UIs, Slack, MCP, and how one agent serves multiple surfaces.

  5. Infrastructure Engineering: How to deploy and scale Dash. Containers, deployment, scheduling.

https://careersatdoordash.com/blog/beyond-single-agents-doordash-building-collaborative-ai-ecosystem/

Thank you for reading, here are some links for reference:

📋 讨论归档

讨论进行中…