展示HN:Sgai – 目标驱动的多智能体软件开发 (GOAL.md → 可运行代码)
Show HN: Sgai – Goal-driven multi-agent software dev (GOAL.md → working code)

原始链接: https://github.com/sandgardenhq/sgai

## Sgai:AI驱动的本地软件开发 Sgai 将软件开发转化为以目标为导向的多智能体工作流——一个直接在你的代码仓库中运行的本地“AI软件工厂”。 你无需逐步提示,只需在 `GOAL.md` 文件中**定义期望的结果**(例如:“构建一个音乐音序器Web应用”)。 Sgai 然后利用 AI 智能体(开发者、审查者等)来**规划和执行工作**,并将其可视化为工作流图。 你通过审查计划、回答澄清问题和监控进度来**监督**。 完成情况通过自动化测试和代码检查来验证。 主要特性包括:**可视化工作流**、**专业智能体**、**本地执行**(数据不会离开你的机器)和**从过往会话中学习技能**。 Sgai 不仅是自动补全,它*构建*软件。 **安装**通过 `opencode` 或手动设置(需要 Go、Node.js、bun)实现。 演示视频可在 [https://youtu.be/NYmjhwLUg8Q](https://youtu.be/NYmjhwLUg8Q) 观看,更多文档请访问 [https://github.com/sandgardenhq/sgai](https://github.com/sandgardenhq/sgai)。

## Sgai:目标驱动的AI辅助开发 Sandgardenhq 发布了 Sgai,一个开源(Go)的AI辅助软件开发工具,其方法与典型的提示方式不同。开发者不是给出逐步指令,而是定义在 `GOAL.md` 文件中所需的*结果*,然后 Sgai 利用一个协调的AI代理网络来实现它。 这些代理会将目标分解为任务(开发者、审查员、安全分析师等),提出澄清问题,编写和测试代码,并迭代直到满足完成条件。一切都在你的仓库本地运行,并提供一个Web仪表盘来可视化代理的工作流程——不会自动推送到GitHub。 目前 Sgai 仍处于早期阶段,已被内部用于原型设计。作者指出,其许可证是修改后的MIT许可证,旨在防止直接的商业竞争,避免将Sgai作为托管服务提供,尽管承认这种决定可能会带来一些限制。 **链接:** * **演示:** [https://youtu.be/NYmjhwLUg8Q](https://youtu.be/NYmjhwLUg8Q) * **GitHub:** [https://github.com/sandgardenhq/sgai](https://github.com/sandgardenhq/sgai)
相关文章

原文

Sgai Logo

Define your goal. Launch the dashboard. Watch AI agents plan, execute, and validate your software — with you in control.

Example: "Build a drag-and-drop image compressor" → 3 agents (developer, reviewer, designer) → Working app with tests passing → 45 minutes.

📺 Watch the 4-minute demo →

Sgai Dashboard


Sgai turns software development into a goal-driven, multi-agent workflow.

Instead of prompting step-by-step, you:

  1. Define the outcome — "Build a music sequencer web app"
  2. Agents plan the work — Breaking it into a visual workflow diagram of tasks
  3. You supervise — Watch progress, answer questions when agents need guidance
  4. Success checks — Tests, linting, or other validation determines "done"

Not autocomplete. Not a chat window. A local AI software factory.


  • See what's happening — Visual workflow diagram instead of hidden AI reasoning
  • Multiple specialists — Developer writes code, reviewer checks it, safety analyst validates
  • Approve before execution — Review the plan and answer questions, then agents work autonomously
  • Proof of completion — Tests must pass before work is marked done
  • Works locally — Runs in your repository, nothing leaves your machine

Recommended: Automated Setup via opencode

opencode update
opencode auth login
opencode --model anthropic/claude-opus-4-6 run "install Sgai using the instructions from https://github.com/sandgardenhq/sgai/blob/main/INSTALLATION.md"

This runs the official installation guide automatically and launches a demo workspace.


Required: Go, Node.js, bun, opencode

Recommended: jj (version control), tmux (session management), ripgrep (code search), Graphviz (diagram rendering)

go install github.com/sandgardenhq/sgai/cmd/sgai@latest

Or build from source:

git clone https://github.com/sandgardenhq/sgai.git
cd sgai
cd cmd/sgai/webapp && bun install && cd ../../..
make build

See INSTALLATION.md for details.


Open: http://localhost:8080


📺 Prefer watching? See the demo → https://youtu.be/NYmjhwLUg8Q

Most users create goals using the built-in wizard.

Goals are stored in GOAL.md and describe outcomes — not implementation steps.

Example GOAL.md:

---
flow: |
  "backend-developer" -> "code-reviewer"
completionGateScript: make test
interactive: yes
---

# Build a REST API

Create endpoints for user registration and login with JWT auth.

- [ ] POST /register validates email, hashes password
- [ ] POST /login returns JWT token
- [ ] Tests pass before completion

See GOAL.example.md for full reference.

Choose a Template

Sgai breaks your goal into a workflow diagram of coordinated agents with defined roles.

Dependencies are explicit. Execution is visible.

3. Approve the Plan & Monitor

Agent Questions

Before execution begins, agents ask clarifying questions about your goal.

Once you approve the plan, agents work autonomously — executing tasks, running tests, and validating completion.

You can:

  • Monitor real-time progress (optional)
  • Interrupt execution if needed
  • Review diffs and session history
  • Fork sessions to try different approaches

Most of the time, you approve the plan and come back when it's done.

4. Learn from Past Sessions with Skills

Skills Library

Sgai extracts reusable skills and code snippets from completed sessions — your agents get smarter over time.


What Happens to Your Code?

  • Agents operate inside your local repository
  • Changes go through your version control (we recommend jj, but Git works)
  • Sgai does not automatically push to remote repositories

You stay in control.


Sgai accepts improvements as specifications inside GOALS/.

  1. Create GOALS/YYYY_MM_DD_feature_name.md
  2. Describe desired behavior and success criteria
  3. Submit a PR

See the GOALS directory for examples.


Found a bug or have a feature request? Open an issue →

Want to discuss ideas or share what you built? Start a discussion →


Developer documentation lives in docs/, produced by Doc Holiday, of course!


https://github.com/sandgardenhq/sgai/blob/main/LICENSE


Sgai was created by Ulderico Cirello, and is maintained by Sandgarden.

联系我们 contact @ memedata.com