[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-agno-agi--dash":3,"tool-agno-agi--dash":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160015,2,"2026-04-18T11:30:52",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":95,"forks":96,"last_commit_at":97,"license":98,"difficulty_score":99,"env_os":100,"env_gpu":101,"env_ram":101,"env_deps":102,"category_tags":111,"github_topics":77,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":112,"updated_at":113,"faqs":114,"releases":124},9140,"agno-agi\u002Fdash","dash","A self-learning data agent built with systems engineering principles. It grounds answers in 6 layers of context and improves with every query.","Dash 是一款基于系统工程原则构建的自学习数据智能体，旨在让用户直接用自然语言提问，即可获得准确且有深度的数据洞察。它解决了传统大模型在直接生成 SQL 查询时面临的痛点：数据库结构缺乏业务含义、类型定义误导、缺失团队隐性知识、无法从错误中学习以及结果缺乏解读等。\n\n通过引入六层上下文 grounding 机制和持续进化的自学习循环，Dash 能随着每一次查询不断积累经验，显著提升回答的准确性与实用性。其架构融合了代理工程与数据工程，将业务逻辑交由智能体处理，同时依靠严谨的系统设计确保稳定性。用户可通过 Slack、终端或 AgentOS 网页界面与 Dash 交互，轻松查询如“当前月度经常性收入（MRR）是多少”或“哪些客户有流失风险”等复杂业务问题。\n\nDash 特别适合需要频繁进行数据分析的开发人员、数据工程师及业务分析师使用。对于希望将自然语言查询转化为可靠业务洞察的团队而言，Dash 提供了一个既强大又易于集成的开源解决方案，让数据对话真正变得简单高效。","# Dash\n\nA **self-learning data agent** built with systems engineering principles. It grounds answers in 6 layers of context and improves with every query.\n\nChat with Dash via Slack, the terminal, or the [AgentOS](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) web UI.\n\n## Quick Start\n\n```sh\n# Clone the repo\ngit clone https:\u002F\u002Fgithub.com\u002Fagno-agi\u002Fdash.git && cd dash\n\ncp example.env .env\n# Edit .env and add your OPENAI_API_KEY\n\n# Start the system\ndocker compose up -d --build\n\n# Generate sample data and load knowledge\ndocker exec -it dash-api python scripts\u002Fgenerate_data.py\ndocker exec -it dash-api python scripts\u002Fload_knowledge.py\n```\n\nConfirm Dash is running at [http:\u002F\u002Flocalhost:8000\u002Fdocs](http:\u002F\u002Flocalhost:8000\u002Fdocs).\n\n### Connect to the Web UI\n\n1. Open [os.agno.com](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) and login\n2. Add OS → Local → `http:\u002F\u002Flocalhost:8000`\n3. Click \"Connect\"\n\n**Try it** (SaaS metrics dataset):\n\n- What's our current MRR?\n- Which plan has the highest churn rate?\n- Show me revenue trends by plan over the last 6 months\n- Which customers are at risk of churning?\n\n## Deploy to Railway\n\nRailway deployment uses `.env.production` to keep production credentials separate from local dev.\n\n```sh\ncp example.env .env.production\n# Edit .env.production — set OPENAI_API_KEY\n```\n\n### Step 1: Deploy infrastructure\n\nThis 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.\n\n```sh\nrailway login\n.\u002Fscripts\u002Frailway_up.sh\n```\n\n### Step 2: Get your JWT key\n\nProduction requires a `JWT_VERIFICATION_KEY` from [AgentOS](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos). You need the Railway domain from step 1 to set this up.\n\n1. Copy your Railway domain from the output of step 1 (e.g. `dash-production-xxxx.up.railway.app`)\n2. Open [os.agno.com](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) and login\n3. Add OS → Live → paste your Railway URL\n4. Go to **Settings** and generate a key pair\n5. Add the public key to `.env.production` (wrap in single quotes):\n\n```bash\nJWT_VERIFICATION_KEY='-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq...\n-----END PUBLIC KEY-----'\n```\n\n### Step 3: Push environment and redeploy\n\n```sh\n.\u002Fscripts\u002Frailway_env.sh\n.\u002Fscripts\u002Frailway_redeploy.sh\n```\n\n`railway_env.sh` reads `.env.production` and sets each variable on the Railway service. Safe to run repeatedly. Handles multiline values (PEM keys) correctly.\n\n### Production operations\n\nDatabase scripts must run inside Railway's network (the internal hostname `pgvector.railway.internal` isn't reachable from your local machine). Use SSH to connect to the running container:\n\n```sh\nrailway ssh --service dash\n# Inside the container:\npython scripts\u002Fgenerate_data.py\npython scripts\u002Fload_knowledge.py\n```\n\nOther operations run locally:\n\n```sh\nrailway logs --service dash\nrailway open\n```\n\n## Why Dash Exists\n\nAsk a question in English, get a correct, meaningful answer. That's the goal. But raw LLMs writing SQL hit a wall fast: schemas lack meaning, types are misleading, tribal knowledge is missing, there's no way to learn from mistakes, and results lack interpretation.\n\nThe root cause is missing context and missing memory. Dash solves this with **six layers of grounded context**, a **self-learning loop** that improves with every query, and a focus on delivering insights you can act on.\n\n## Architecture: Five Layers, One System\n\nAgentic software is just software with the business logic replaced by agents. Everything else is systems engineering. Dash is built across five layers that reinforce each other.\n\n```\nAgent Engineering     →  dash\u002Fteam.py + dash\u002Fagents\u002F\nData Engineering      →  knowledge\u002F + Agno Learning Machine + PostgreSQL\nSecurity Engineering  →  AgentOS auth + RBAC + read-only SQL enforcement\nInterface Engineering →  app\u002Fmain.py (FastAPI) + Slack + AgentOS\nInfrastructure        →  Dockerfile + compose.yaml + scripts\u002F\n```\n\n### 1. Agent Engineering\n\nThe agent team and execution flow. Model, instructions, tools, knowledge, and the self-learning loop.\n\n```\nAgentOS (app\u002Fmain.py)  [scheduler=True, tracing=True]\n ├── FastAPI \u002F Uvicorn\n ├── Slack Interface (optional)\n └── Dash Team (dash\u002Fteam.py, coordinate mode)\n     ├─ Analyst (dash\u002Fagents\u002Fanalyst.py)         reads public + dash\n     │  ├─ SQLTools (read-only)  → public schema (company data)\n     │  ├─ introspect_schema     → both schemas\n     │  ├─ save_validated_query  → knowledge base\n     │  └─ ReasoningTools\n     ├─ Engineer (dash\u002Fagents\u002Fengineer.py)       reads public, writes dash\n     │  ├─ SQLTools (full)       → dash schema (agent-managed)\n     │  ├─ introspect_schema     → both schemas\n     │  ├─ update_knowledge      → knowledge base (schema changes)\n     │  └─ ReasoningTools\n     │\n     Leader tools: SlackTools (optional)\n     Knowledge:    dash_knowledge (table schemas, queries, business rules, dash views)\n     Learnings:    dash_learnings (error patterns, type gotchas, fixes)\n```\n\n### 2. Data Engineering\n\nContext is data. Memory is data. Knowledge is data. All managed with data engineering principles: well-designed schemas, structured querying, databases for fast read\u002Fwrites.\n\n**Six layers of grounded context:**\n\n| Layer | Purpose | Source |\n|------|--------|--------|\n| **Table Usage** | Schema, columns, relationships | `knowledge\u002Ftables\u002F*.json` |\n| **Human Annotations** | Metrics, definitions, business rules | `knowledge\u002Fbusiness\u002F*.json` |\n| **Query Patterns** | SQL that is known to work | `knowledge\u002Fqueries\u002F*.sql` |\n| **Institutional Knowledge** | Docs, wikis, external references | MCP (optional) |\n| **Learnings** | Error patterns and discovered fixes | Agno `Learning Machine` |\n| **Runtime Context** | Live schema changes | `introspect_schema` tool |\n\n**The self-learning loop:**\n\n```\nUser Question\n     ↓\nRetrieve Knowledge + Learnings\n     ↓\nReason about intent\n     ↓\nGenerate grounded SQL\n     ↓\nExecute and interpret\n     ↓\n ┌────┴────┐\n ↓         ↓\nSuccess    Error\n ↓         ↓\n ↓         Diagnose → Fix → Save Learning\n ↓                           (never repeated)\n ↓\nReturn insight\n ↓\nOptionally save as Knowledge\n```\n\nTwo complementary systems:\n\n| System | Stores | How It Evolves |\n|------|--------|----------------|\n| **Knowledge** | Validated queries and business context | Curated by you + Dash |\n| **Learnings** | Error patterns and fixes | Managed by `Learning Machine` automatically |\n\n**Dual schema enforcement:** A structural boundary between company data and agent-managed data.\n\n| Schema | Owner | Access |\n|--------|-------|--------|\n| `public` | Company (loaded externally) | Read-only — never modified by agents |\n| `dash` | Engineer agent | Views, summary tables, computed data |\n\nThe Engineer builds reusable data assets (`dash.monthly_mrr`, `dash.customer_health_score`, `dash.churn_risk`) and records them to knowledge. The Analyst discovers and prefers these views over raw table queries.\n\n### 3. Security Engineering\n\nAuth uses RBAC with JWT verification in production. Every query is scoped to `user_id`. Read-only access is a tool configuration, not a prompt instruction. The Analyst agent's SQL tools are scoped to read-only at the system level.\n\nSee [Security](#security) for setup details.\n\n### 4. Interface Engineering\n\nOne agent definition, multiple surfaces. Dash is reachable via REST API (FastAPI), Slack threads, and the AgentOS web UI. Each surface has its own identity system: a Slack user ID maps to sessions via thread timestamps, the API uses JWT-backed auth.\n\n### 5. Infrastructure Engineering\n\nDockerfile, Docker Compose, one-command deployment. Scheduled tasks for proactive behavior. The infrastructure layer is boring on purpose. 95% of running an agent is identical to running any other service.\n\n## Slack\n\nDash can receive Slack DMs, @mentions, and thread replies, and can also post to channels proactively.\n\nQuick setup:\n1. Run Dash and give it a public URL (ngrok locally, or your Railway domain).\n2. Follow [docs\u002FSLACK_CONNECT.md](docs\u002FSLACK_CONNECT.md) to create and install the Slack app from the manifest.\n3. Set `SLACK_TOKEN` and `SLACK_SIGNING_SECRET`, then restart Dash.\n4. In Slack, confirm Event Subscriptions is verified and send a DM or `@mention` to test it.\n\nEach Slack thread maps to one Dash session. For the manifest, ngrok commands, Railway deployment, permissions, and troubleshooting, see [docs\u002FSLACK_CONNECT.md](docs\u002FSLACK_CONNECT.md).\n\n## Data Model (SaaS Metrics)\n\nSynthetic B2B SaaS dataset (~900 customers, 2 years of data):\n\n| Table | Description |\n|-------|-------------|\n| `customers` | Company info, industry, size, acquisition source, status |\n| `subscriptions` | Plan, MRR, seats, billing cycle, lifecycle status |\n| `plan_changes` | Upgrades, downgrades, cancellations with MRR impact |\n| `invoices` | Billing records, payment status, billing periods |\n| `usage_metrics` | Daily API calls, active users, storage, reports |\n| `support_tickets` | Priority, category, resolution time, satisfaction |\n\n## Adding Knowledge\n\nDash works best when it understands how your organization talks about data.\n\n```\nknowledge\u002F\n├── tables\u002F      # Table meaning and caveats\n├── queries\u002F     # Proven SQL patterns\n└── business\u002F    # Metrics and language\n```\n\n### Table Metadata\n\n```json\n{\n  \"table_name\": \"customers\",\n  \"table_description\": \"B2B SaaS customer accounts with company info and lifecycle status\",\n  \"use_cases\": [\"Churn analysis\", \"Cohort segmentation\", \"Acquisition reporting\"],\n  \"data_quality_notes\": [\n    \"signup_date is DATE (not TIMESTAMP) — no time component\",\n    \"status values: active, churned, trial\",\n    \"company_size is self-reported\"\n  ]\n}\n```\n\n### Query Patterns\n\n```sql\n-- \u003Cquery monthly_mrr>\n-- \u003Cdescription>Monthly MRR from active subscriptions\u003C\u002Fdescription>\n-- \u003Cquery>\nSELECT\n    DATE_TRUNC('month', started_at) AS month,\n    SUM(mrr) AS total_mrr\nFROM subscriptions\nWHERE ended_at IS NULL\nGROUP BY 1\nORDER BY 1 DESC\n-- \u003C\u002Fquery>\n```\n\n### Business Rules\n\n```json\n{\n  \"metrics\": [\n    {\n      \"name\": \"MRR\",\n      \"definition\": \"Sum of active subscriptions excluding trials\"\n    }\n  ],\n  \"common_gotchas\": [\n    {\n      \"issue\": \"Active subscription detection\",\n      \"solution\": \"Filter on ended_at IS NULL, not status column\"\n    }\n  ]\n}\n```\n\n### Load Knowledge\n\n```sh\npython scripts\u002Fload_knowledge.py            # Upsert changes\npython scripts\u002Fload_knowledge.py --recreate  # Fresh start\n```\n\n## Evaluations\n\nFive eval categories using Agno's eval framework:\n\n| Category | Eval Type | What It Tests |\n|----------|-----------|---------------|\n| accuracy | AccuracyEval (1-10) | Correct data and meaningful insights |\n| routing | ReliabilityEval | Team routes to correct agent\u002Ftools |\n| security | AgentAsJudgeEval (binary) | No credential or secret leaks |\n| governance | AgentAsJudgeEval (binary) | Refuses destructive SQL operations |\n| boundaries | AgentAsJudgeEval (binary) | Schema access boundaries respected |\n\n```sh\npython -m evals                      # Run all evals\npython -m evals --category accuracy  # Run specific category\npython -m evals --verbose            # Show response details\n```\n\n## Local Development\n\n```sh\n.\u002Fscripts\u002Fvenv_setup.sh && source .venv\u002Fbin\u002Factivate\ndocker compose up -d dash-db\npython scripts\u002Fgenerate_data.py\npython scripts\u002Fload_knowledge.py\npython -m dash            # CLI mode\npython -m app.main        # AgentOS mode (web UI at os.agno.com)\n```\n\n## Environment Variables\n\n| Variable | Required | Default | Purpose |\n|----------|----------|---------|---------|\n| `OPENAI_API_KEY` | Yes | — | OpenAI API key |\n| `SLACK_TOKEN` | No | `\"\"` | Slack bot token (interface + tools) |\n| `SLACK_SIGNING_SECRET` | No | `\"\"` | Slack signing secret (interface only) |\n| `DB_HOST` | No | `localhost` | PostgreSQL host |\n| `DB_PORT` | No | `5432` | PostgreSQL port |\n| `DB_USER` | No | `ai` | PostgreSQL user |\n| `DB_PASS` | No | `ai` | PostgreSQL password |\n| `DB_DATABASE` | No | `ai` | PostgreSQL database |\n| `PORT` | No | `8000` | API port |\n| `RUNTIME_ENV` | No | `prd` | `dev` enables hot reload |\n| `AGENTOS_URL` | No | `http:\u002F\u002F127.0.0.1:8000` | Scheduler callback URL (production) |\n| `JWT_VERIFICATION_KEY` | Production | — | RBAC public key from [os.agno.com](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) |\n\n## Security\n\nProduction deployments require authentication via [Agno AgentOS](https:\u002F\u002Fdocs.agno.com\u002Fagent-os\u002Fsecurity\u002Foverview?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=security). Dash enables [RBAC authorization](https:\u002F\u002Fdocs.agno.com\u002Fagent-os\u002Fsecurity\u002Frbac?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=rbac) when `RUNTIME_ENV=prd` (the default). Without a valid `JWT_VERIFICATION_KEY`, production endpoints will reject all requests.\n\nLocal development (`RUNTIME_ENV=dev`, set by Docker Compose) runs without auth so you can iterate freely.\n\n### Auth Setup\n\nSee [Deploy to Railway](#deploy-to-railway) for the full setup flow, including how to get your `JWT_VERIFICATION_KEY` from AgentOS. The Agno control plane handles JWT issuance, session management, traces, metrics, and the web UI. See the [AgentOS Security docs](https:\u002F\u002Fdocs.agno.com\u002Fagent-os\u002Fsecurity\u002Foverview?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=security) for details.\n\n### Schema-Level Enforcement\n\nBeyond API-level auth, Dash enforces data access at the database level:\n\n- **Analyst** connects with `default_transaction_read_only=on` — PostgreSQL rejects any write attempt\n- **Engineer** writes are scoped to the `dash` schema — a SQLAlchemy event listener blocks any DDL\u002FDML targeting `public`\n- **Leader** has no direct database access\n\nThese are infrastructure guardrails, not prompt instructions. They hold regardless of what the model generates.\n\n## Learn More\n\n- [OpenAI's In-House Data Agent](https:\u002F\u002Fopenai.com\u002Findex\u002Finside-our-in-house-data-agent\u002F) — the inspiration\n- [Self-Improving SQL Agent](https:\u002F\u002Fwww.ashpreetbedi.com\u002Farticles\u002Fsql-agent) — deep dive on an earlier architecture\n- [Agno Docs](https:\u002F\u002Fdocs.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=docs)\n\n\u003Cp align=\"center\">Built on \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fagno-agi\u002Fagno\">Agno\u003C\u002Fa> · the runtime for agentic software\u003C\u002Fp>","# Dash\n\n一款基于系统工程原则构建的**自我学习型数据代理**。它将答案扎根于六层上下文，并在每次查询中不断改进。\n\n您可以通过 Slack、终端或 [AgentOS](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) 的 Web UI 与 Dash 对话。\n\n## 快速开始\n\n```sh\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fagno-agi\u002Fdash.git && cd dash\n\ncp example.env .env\n# 编辑 .env 并添加您的 OPENAI_API_KEY\n\n# 启动系统\ndocker compose up -d --build\n\n# 生成示例数据并加载知识\ndocker exec -it dash-api python scripts\u002Fgenerate_data.py\ndocker exec -it dash-api python scripts\u002Fload_knowledge.py\n```\n\n请访问 [http:\u002F\u002Flocalhost:8000\u002Fdocs](http:\u002F\u002Flocalhost:8000\u002Fdocs) 确认 Dash 是否正在运行。\n\n### 连接到 Web UI\n\n1. 打开 [os.agno.com](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) 并登录\n2. 添加 OS → 本地 → `http:\u002F\u002Flocalhost:8000`\n3. 点击“连接”\n\n**试一试**（SaaS 指标数据集）：\n\n- 我们当前的 MRR 是多少？\n- 哪个套餐的流失率最高？\n- 请展示过去 6 个月按套餐划分的收入趋势。\n- 哪些客户有流失风险？\n\n## 部署到 Railway\n\nRailway 部署使用 `.env.production` 文件，以将生产环境凭据与本地开发环境分开。\n\n```sh\ncp example.env .env.production\n# 编辑 .env.production — 设置 OPENAI_API_KEY\n```\n\n### 第一步：部署基础设施\n\n这将创建 Railway 项目、数据库和应用服务。在下一步添加 JWT 密钥之前，应用会一直处于崩溃循环状态——这是预期行为。\n\n```sh\nrailway login\n.\u002Fscripts\u002Frailway_up.sh\n```\n\n### 第二步：获取 JWT 密钥\n\n生产环境需要从 [AgentOS](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) 获取一个 `JWT_VERIFICATION_KEY`。您需要第 1 步中的 Railway 域名来完成此设置。\n\n1. 复制第 1 步输出中的 Railway 域名（例如 `dash-production-xxxx.up.railway.app`）\n2. 打开 [os.agno.com](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) 并登录\n3. 添加 OS → 生产 → 粘贴您的 Railway URL\n4. 进入 **设置** 并生成密钥对\n5. 将公钥添加到 `.env.production` 中（用单引号括起来）：\n\n```bash\nJWT_VERIFICATION_KEY='-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq...\n-----END PUBLIC KEY-----'\n```\n\n### 第三步：推送环境并重新部署\n\n```sh\n.\u002Fscripts\u002Frailway_env.sh\n.\u002Fscripts\u002Frailway_redeploy.sh\n```\n\n`railway_env.sh` 会读取 `.env.production` 文件，并将每个变量设置到 Railway 服务中。可以反复安全执行，且能正确处理多行值（PEM 密钥）。\n\n### 生产环境操作\n\n数据库脚本必须在 Railway 的网络内部运行（内部主机名 `pgvector.railway.internal` 无法从您的本地机器访问）。请使用 SSH 连接到正在运行的容器：\n\n```sh\nrailway ssh --service dash\n# 在容器内：\npython scripts\u002Fgenerate_data.py\npython scripts\u002Fload_knowledge.py\n```\n\n其他操作可在本地执行：\n\n```sh\nrailway logs --service dash\nrailway open\n```\n\n## 为什么存在 Dash\n\n用英语提问，得到正确且有意义的答案——这就是我们的目标。然而，直接使用大语言模型生成 SQL 很快就会遇到瓶颈：表结构缺乏语义、类型信息具有误导性、缺少组织内部的知识、无法从错误中学习，且结果缺乏解释。\n\n根本原因在于缺乏上下文和记忆。Dash 通过**六层扎实的上下文**、**每次查询都能改进的自我学习循环**，以及专注于提供可付诸行动的洞察力，解决了这些问题。\n\n## 架构：五层一体\n\n代理式软件本质上就是用代理取代业务逻辑的普通软件。其余部分都属于系统工程范畴。Dash 由五个相互强化的层次构成。\n\n```\n代理工程     →  dash\u002Fteam.py + dash\u002Fagents\u002F\n数据工程      →  knowledge\u002F + Agno 学习机 + PostgreSQL\n安全工程  →  AgentOS 认证 + RBAC + 只读 SQL 强制执行\n界面工程  →  app\u002Fmain.py (FastAPI) + Slack + AgentOS\n基础设施        →  Dockerfile + compose.yaml + scripts\u002F\n```\n\n### 1. 代理工程\n\n代理团队及执行流程。包括模型、指令、工具、知识以及自我学习循环。\n\n```\nAgentOS (app\u002Fmain.py)  [调度器开启，追踪功能开启]\n ├── FastAPI \u002F Uvicorn\n ├── Slack 接口（可选）\n └── Dash 团队 (dash\u002Fteam.py, 协调模式)\n     ├─ 分析师 (dash\u002Fagents\u002Fanalyst.py)         读取公共数据 + Dash 数据\n     │  ├─ SQLTools（只读）  → 公共模式（公司数据）\n     │  ├─ introspect_schema     → 两种模式\n     │  ├─ save_validated_query  → 知识库\n     │  └─ ReasoningTools\n     ├─ 工程师 (dash\u002Fagents\u002Fengineer.py)       读取公共数据，写入 Dash 数据\n     │  ├─ SQLTools（全权限）       → Dash 模式（代理管理）\n     │  ├─ introspect_schema     → 两种模式\n     │  ├─ update_knowledge      → 知识库（模式变更）\n     │  └─ ReasoningTools\n     │\n     领导者工具：SlackTools（可选）\n     知识：    dash_knowledge（表结构、查询、业务规则、Dash 视图）\n     学习成果：    dash_learnings（错误模式、类型陷阱、修复方法）\n```\n\n### 2. 数据工程\n\n上下文即数据。记忆即数据。知识也即数据。这一切都通过数据工程原则来管理：精心设计的模式、结构化的查询以及用于快速读写的数据库。\n\n**六个层次的扎实上下文：**\n\n| 层次 | 目的 | 来源 |\n|------|--------|--------|\n| **表使用情况** | 模式、列、关系 | `knowledge\u002Ftables\u002F*.json` |\n| **人工标注** | 指标、定义、业务规则 | `knowledge\u002Fbusiness\u002F*.json` |\n| **查询模式** | 已知有效的 SQL | `knowledge\u002Fqueries\u002F*.sql` |\n| **机构知识** | 文档、维基、外部参考 | MCP（可选） |\n| **学习记录** | 错误模式及发现的修复方法 | Agno 的 `Learning Machine` |\n| **运行时上下文** | 实时模式变更 | `introspect_schema` 工具 |\n\n**自我学习循环：**\n\n```\n用户问题\n     ↓\n检索知识 + 学习记录\n     ↓\n推理意图\n     ↓\n生成有依据的 SQL\n     ↓\n执行并解释结果\n     ↓\n ┌────┴────┐\n ↓         ↓\n成功    错误\n     ↓         ↓\n     ↓         诊断 → 修复 → 保存学习记录\n     ↓                           （不再重复）\n     ↓\n返回洞察\n     ↓\n可选：保存为知识\n```\n\n两种互补的系统：\n\n| 系统 | 存储内容 | 如何演进 |\n|------|--------|----------------|\n| **知识库** | 经验证的查询和业务上下文 | 由您和 Dash 共同维护 |\n| **学习库** | 错误模式及修复方法 | 由 `Learning Machine` 自动管理 |\n\n**双重模式约束：** 在公司数据与代理管理的数据之间设置结构性边界。\n\n| 模式 | 所有者 | 访问权限 |\n|--------|-------|--------|\n| `public` | 公司（外部加载） | 只读 — 代理绝不会修改 |\n| `dash` | 工程师代理 | 视图、汇总表、计算数据 |\n\n工程师构建可重用的数据资产（如 `dash.monthly_mrr`、`dash.customer_health_score`、`dash.churn_risk`），并将它们记录到知识库中。分析师会发现并更倾向于使用这些视图，而非直接查询原始表。\n\n### 3. 安全工程\n\n在生产环境中，身份验证采用基于角色的访问控制（RBAC）结合 JWT 验证。每条查询都会限定在 `user_id` 范围内。只读权限是工具配置的一部分，而非提示指令。分析师代理的 SQL 工具在系统层面被限制为只读。\n\n有关设置详情，请参阅 [安全](#security)。\n\n### 4. 界面工程\n\n一个代理定义，多种接入方式。Dash 可通过 REST API（FastAPI）、Slack 线程以及 AgentOS Web UI 访问。每种接入方式都有独立的身份认证体系：Slack 用户 ID 通过线程时间戳映射到会话，而 API 则使用基于 JWT 的认证。\n\n### 5. 基础设施工程\n\nDockerfile、Docker Compose，一键部署。定时任务用于主动行为。基础设施层刻意保持简单。运行代理的 95% 流程与其他服务无异。\n\n## Slack\n\nDash 可接收 Slack 私信、@提及和线程回复，也能主动发布消息到频道。\n\n快速设置步骤：\n1. 启动 Dash 并为其分配一个公网 URL（本地使用 ngrok，或您的 Railway 域名）。\n2. 按照 [docs\u002FSLACK_CONNECT.md](docs\u002FSLACK_CONNECT.md) 中的说明，从清单文件创建并安装 Slack 应用程序。\n3. 设置 `SLACK_TOKEN` 和 `SLACK_SIGNING_SECRET`，然后重启 Dash。\n4. 在 Slack 中，确认事件订阅已验证，并发送一条私信或 @提及以测试连接。\n\n每个 Slack 线程对应一个 Dash 会话。关于清单文件、ngrok 命令、Railway 部署、权限及故障排除，请参阅 [docs\u002FSLACK_CONNECT.md](docs\u002FSLACK_CONNECT.md)。\n\n## 数据模型（SaaS 指标）\n\n合成的 B2B SaaS 数据集（约 900 个客户，两年数据）：\n\n| 表 | 描述 |\n|-------|-------------|\n| `customers` | 公司信息、行业、规模、获客渠道、状态 |\n| `subscriptions` | 方案、MRR、席位数、计费周期、生命周期状态 |\n| `plan_changes` | 升级、降级、取消及其对 MRR 的影响 |\n| `invoices` | 计费记录、支付状态、计费期间 |\n| `usage_metrics` | 每日 API 调用次数、活跃用户数、存储量、报表 |\n| `support_tickets` | 优先级、类别、解决时间、满意度 |\n\n## 添加知识\n\nDash 在理解贵组织如何讨论数据时表现最佳。\n\n```\nknowledge\u002F\n├── tables\u002F      # 表的含义及注意事项\n├── queries\u002F     # 经过验证的 SQL 模式\n└── business\u002F    # 指标及术语\n```\n\n### 表元数据\n\n```json\n{\n  \"table_name\": \"customers\",\n  \"table_description\": \"包含公司信息和生命周期状态的 B2B SaaS 客户账户\",\n  \"use_cases\": [\"流失分析\", \"队列细分\", \"获客报告\"],\n  \"data_quality_notes\": [\n    \"signup_date 是 DATE 类型（不是 TIMESTAMP）——不含时间部分\",\n    \"状态值：active、churned、trial\",\n    \"company_size 是客户自报\"\n  ]\n}\n```\n\n### 查询模式\n\n```sql\n-- \u003Cquery monthly_mrr>\n-- \u003Cdescription>来自活跃订阅的月度 MRR\u003C\u002Fdescription>\n-- \u003Cquery>\nSELECT\n    DATE_TRUNC('month', started_at) AS month,\n    SUM(mrr) AS total_mrr\nFROM subscriptions\nWHERE ended_at IS NULL\nGROUP BY 1\nORDER BY 1 DESC\n-- \u003C\u002Fquery>\n```\n\n### 业务规则\n\n```json\n{\n  \"metrics\": [\n    {\n      \"name\": \"MRR\",\n      \"definition\": \"剔除试用期后，所有活跃订阅的总和\"\n    }\n  ],\n  \"common_gotchas\": [\n    {\n      \"issue\": \"检测活跃订阅\",\n      \"solution\": \"应筛选 ended_at IS NULL，而非 status 列\"\n    }\n  ]\n}\n```\n\n### 加载知识\n\n```sh\npython scripts\u002Fload_knowledge.py            # 更新更改\npython scripts\u002Fload_knowledge.py --recreate  # 从头开始\n```\n\n## 评估\n\n使用 Agno 的评估框架进行五类评估：\n\n| 类别 | 评估类型 | 测试内容 |\n|----------|-----------|---------------|\n| 准确性 | AccuracyEval（1–10 分） | 数据是否正确及见解是否有意义 |\n| 路由 | ReliabilityEval | 团队是否将请求路由至正确的代理\u002F工具 |\n| 安全 | AgentAsJudgeEval（二元） | 是否未泄露凭据或机密 |\n| 治理 | AgentAsJudgeEval（二元） | 是否拒绝破坏性 SQL 操作 |\n| 边界 | AgentAsJudgeEval（二元） | 是否遵守模式访问边界 |\n\n```sh\npython -m evals                      # 运行所有评估\npython -m evals --category accuracy  # 运行特定类别\npython -m evals --verbose            # 显示响应详情\n```\n\n## 本地开发\n\n```sh\n.\u002Fscripts\u002Fvenv_setup.sh && source .venv\u002Fbin\u002Factivate\ndocker compose up -d dash-db\npython scripts\u002Fgenerate_data.py\npython scripts\u002Fload_knowledge.py\npython -m dash            # CLI 模式\npython -m app.main        # AgentOS 模式（Web UI 地址：os.agno.com）\n```\n\n## 环境变量\n\n| 变量 | 必需 | 默认值 | 用途 |\n|----------|----------|---------|---------|\n| `OPENAI_API_KEY` | 是 | — | OpenAI API 密钥 |\n| `SLACK_TOKEN` | 否 | `\"\"` | Slack 机器人令牌（界面 + 工具） |\n| `SLACK_SIGNING_SECRET` | 否 | `\"\"` | Slack 签名密钥（仅界面） |\n| `DB_HOST` | 否 | `localhost` | PostgreSQL 主机 |\n| `DB_PORT` | 否 | `5432` | PostgreSQL 端口 |\n| `DB_USER` | 否 | `ai` | PostgreSQL 用户 |\n| `DB_PASS` | 否 | `ai` | PostgreSQL 密码 |\n| `DB_DATABASE` | 否 | `ai` | PostgreSQL 数据库 |\n| `PORT` | 否 | `8000` | API 端口 |\n| `RUNTIME_ENV` | 否 | `prd` | `dev` 模式启用热重载 |\n| `AGENTOS_URL` | 否 | `http:\u002F\u002F127.0.0.1:8000` | 调度器回调 URL（生产环境） |\n| `JWT_VERIFICATION_KEY` | 生产环境 | — | 来自 [os.agno.com](https:\u002F\u002Fos.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=agentos) 的 RBAC 公钥 |\n\n## 安全性\n\n生产部署需要通过 [Agno AgentOS](https:\u002F\u002Fdocs.agno.com\u002Fagent-os\u002Fsecurity\u002Foverview?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=security) 进行身份验证。当 `RUNTIME_ENV=prd`（默认值）时，Dash 支持 [RBAC 授权](https:\u002F\u002Fdocs.agno.com\u002Fagent-os\u002Fsecurity\u002Frbac?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=rbac)。如果没有有效的 `JWT_VERIFICATION_KEY`，生产环境的端点将拒绝所有请求。\n\n本地开发模式（`RUNTIME_ENV=dev`，由 Docker Compose 设置）则无需认证，方便您自由迭代。\n\n### 认证设置\n\n请参阅 [部署到 Railway](#deploy-to-railway) 以获取完整的设置流程，包括如何从 AgentOS 获取 `JWT_VERIFICATION_KEY`。Agno 控制平面负责 JWT 发放、会话管理、追踪、指标以及 Web UI。更多详细信息请参考 [AgentOS 安全文档](https:\u002F\u002Fdocs.agno.com\u002Fagent-os\u002Fsecurity\u002Foverview?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=security)。\n\n### 模式级强制执行\n\n除了 API 层面的认证外，Dash 还在数据库层面强制实施数据访问控制：\n\n- **分析师**以 `default_transaction_read_only=on` 模式连接——PostgreSQL 会拒绝任何写入尝试。\n- **工程师**的写操作仅限于 `dash` 模式——一个 SQLAlchemy 事件监听器会阻止针对 `public` 模式的任何 DDL\u002FDML 操作。\n- **领导者**没有直接的数据库访问权限。\n\n这些是基础设施层面的安全保障措施，而非提示指令。无论模型生成什么内容，它们都会生效。\n\n## 了解更多\n\n- [OpenAI 的内部数据代理](https:\u002F\u002Fopenai.com\u002Findex\u002Finside-our-in-house-data-agent\u002F) — 设计灵感来源\n- [自我改进的 SQL 代理](https:\u002F\u002Fwww.ashpreetbedi.com\u002Farticles\u002Fsql-agent) — 对早期架构的深入探讨\n- [Agno 文档](https:\u002F\u002Fdocs.agno.com?utm_source=github&utm_medium=example-repo&utm_campaign=agent-example&utm_content=dash&utm_term=docs)\n\n\u003Cp align=\"center\">基于 \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fagno-agi\u002Fagno\">Agno\u003C\u002Fa> 构建 · 用于智能体软件的运行时\u003C\u002Fp>","# Dash 快速上手指南\n\nDash 是一个基于系统工程原则构建的**自学习数据智能体**。它通过六层上下文 grounding 提供准确答案，并随着每次查询不断自我进化。支持通过 Slack、终端或 AgentOS Web UI 进行交互。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows (需安装 WSL2)\n*   **核心依赖**:\n    *   [Git](https:\u002F\u002Fgit-scm.com\u002F)\n    *   [Docker](https:\u002F\u002Fwww.docker.com\u002F) 及 Docker Compose\n    *   [Python 3.10+](https:\u002F\u002Fwww.python.org\u002F) (用于本地脚本运行)\n*   **API 密钥**:\n    *   **OpenAI API Key**: 必须拥有有效的 `OPENAI_API_KEY`。\n    *   *(可选)* **AgentOS 账号**: 如需使用 Web UI，请访问 [os.agno.com](https:\u002F\u002Fos.agno.com) 注册登录。\n\n> **注意**: 本项目主要依赖官方源，暂无官方提供的中国镜像加速方案。如遇网络问题，请自行配置全局代理或使用国内镜像站替代基础依赖下载。\n\n## 安装步骤\n\n### 1. 克隆项目与配置环境变量\n\n```sh\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fagno-agi\u002Fdash.git && cd dash\n\n# 复制环境变量模板\ncp example.env .env\n\n# 编辑 .env 文件，填入您的 OPENAI_API_KEY\n# 可以使用 vim, nano 或任何文本编辑器\n```\n\n### 2. 启动系统服务\n\n使用 Docker Compose 一键启动数据库和应用服务：\n\n```sh\ndocker compose up -d --build\n```\n\n### 3. 生成样本数据并加载知识库\n\nDash 需要初始数据和业务上下文才能工作。执行以下命令将合成数据载入数据库：\n\n```sh\n# 生成模拟的 SaaS 指标数据\ndocker exec -it dash-api python scripts\u002Fgenerate_data.py\n\n# 加载预定义的知识库（表结构说明、业务规则等）\ndocker exec -it dash-api python scripts\u002Fload_knowledge.py\n```\n\n启动完成后，您可以访问 `http:\u002F\u002Flocalhost:8000\u002Fdocs` 确认 API 文档页面是否正常显示。\n\n## 基本使用\n\n安装完成后，您可以通过以下两种方式立即开始体验 Dash 的数据分析能力。\n\n### 方式一：通过 AgentOS Web UI (推荐)\n\n这是最直观的交互方式，适合查看可视化结果和管理会话。\n\n1.  访问 [os.agno.com](https:\u002F\u002Fos.agno.com) 并登录。\n2.  点击 **Add OS** → 选择 **Local** → 输入地址 `http:\u002F\u002Flocalhost:8000`。\n3.  点击 **Connect** 建立连接。\n4.  在对话框中尝试输入以下自然语言问题（基于内置的 SaaS 数据集）：\n\n    *   `What's our current MRR?` (当前的月度经常性收入是多少？)\n    *   `Which plan has the highest churn rate?` (哪个套餐的流失率最高？)\n    *   `Show me revenue trends by plan over the last 6 months` (展示过去 6 个月各套餐的收入趋势)\n    *   `Which customers are at risk of churning?` (哪些客户有流失风险？)\n\n### 方式二：通过命令行 (CLI)\n\n如果您偏好终端操作，可以直接在本地运行 Python 模块进行对话：\n\n```sh\n# 确保已激活虚拟环境（如果是在本地开发模式下）\n# source .venv\u002Fbin\u002Factivate \n\n# 运行 CLI 模式\npython -m dash\n```\n\n输入上述相同的自然语言问题，Dash 将自动生成 SQL、查询数据库并返回经过解释的业务洞察。","某 SaaS 公司的数据分析师需要在每周例会上快速回答关于营收趋势和客户流失的高层提问，但往往受困于复杂的数据准备过程。\n\n### 没有 dash 时\n- **沟通成本高**：业务方用自然语言提问（如“哪个套餐流失率最高？”），分析师需手动将其转化为复杂的 SQL 查询，耗时且易出错。\n- **缺乏业务语境**：原始数据库字段晦涩难懂，缺少“部落知识”（如特定促销活动的背景），导致生成的报表难以直接解释业务现象。\n- **无法持续进化**：每次遇到新的数据异常或逻辑修正，都需要人工重新编写代码，系统无法从历史错误中自动学习优化。\n- **响应滞后**：从接到问题到产出带洞察的结论，通常需要数小时甚至数天，无法支持实时的战略决策。\n\n### 使用 dash 后\n- **自然语言交互**：直接在 Slack 或终端输入英文问题，dash 基于六层上下文理解意图，自动生成并执行准确的查询语句。\n- **深度语境融合**：dash 将数据库结构与业务文档、历史对话等六层信息结合，给出的答案不仅包含数据，还附带可操作的业务解读。\n- **自我学习闭环**：每处理一次查询，dash 都会记录反馈并优化后续表现，随着使用次数增加，其对特定业务逻辑的理解越来越精准。\n- **即时洞察交付**：原本需要数小时的分析工作缩短至秒级，团队能立即获得关于 MRR 变化或高风险客户的明确结论。\n\ndash 通过系统工程原则构建的自学习机制，将原本割裂的数据查询转变为具备业务记忆与进化能力的智能决策伙伴。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fagno-agi_dash_06b44ce8.png","agno-agi","Agno","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fagno-agi_365b57cd.png","The programming language for agentic software.",null,"support@agno.com","AgnoAgi","https:\u002F\u002Fagno.com","https:\u002F\u002Fgithub.com\u002Fagno-agi",[83,87,91],{"name":84,"color":85,"percentage":86},"Python","#3572A5",87.9,{"name":88,"color":89,"percentage":90},"Shell","#89e051",11.3,{"name":92,"color":93,"percentage":94},"Dockerfile","#384d54",0.8,1998,221,"2026-04-17T16:31:30","Apache-2.0",4,"Linux, macOS, Windows","未说明",{"notes":103,"python":101,"dependencies":104},"该工具主要基于 Docker 和 Docker Compose 运行，依赖外部数据库（PostgreSQL + pgvector）。需要配置 OpenAI API 密钥。支持通过 Slack、终端或 AgentOS Web UI 进行交互。生产环境部署可使用 Railway。无需本地安装 Python 依赖即可通过 Docker 运行，但本地开发需自行设置虚拟环境。",[105,106,107,108,109,110],"docker","docker-compose","fastapi","uvicorn","psycopg2","pgvector",[13,14],"2026-03-27T02:49:30.150509","2026-04-18T22:33:44.160021",[115,120],{"id":116,"question_zh":117,"answer_zh":118,"source_url":119},41024,"语义（SEMANTIC）和业务（BUSINESS）信息应该按需加载还是全部放入上下文？","系统采用混合方法：\n1. 系统提示词（System Prompt）：仅包含轻量级且始终相关的上下文摘要，例如表名、关键注意事项和指标定义。\n2. 查询时检索：详细的知识（如验证过的查询、完整架构、经验教训）会根据用户的具体问题，通过混合搜索（向量 + 关键词）按需加载。\n这种设计避免了将所有信息dump进上下文导致过载的问题，同时确保代理能准确搜索知识库。","https:\u002F\u002Fgithub.com\u002Fagno-agi\u002Fdash\u002Fissues\u002F1",{"id":121,"question_zh":122,"answer_zh":123,"source_url":119},41025,"当需要处理多个具有不同业务和语义信息的系统时，推荐的架构模式是什么？","当涉及多个数据库或领域时，正确的模式是采用多代理（Multi-agent）架构。具体选项包括使用一个路由代理（Router agent）来根据用户意图选择特定的子代理，每个子代理负责特定源的业务、语义和知识。这比试图在单个上下文中处理所有系统更高效。",[]]