@lidangzzz: 我开源了一款非常简单但是极度好用的multi-agent system。 名字就叫goal-driven(目标驱动) https://github.com/lidangzzz/goal-driven… 原理非常简单,就像我说过的,让一个m…

X AI KOLs Following 工具

摘要

开发者lidangzzz开源了goal-driven多智能体框架,通过主代理监督子代理循环执行直至满足预设判据,声称可自动完成编译器开发等复杂任务,并展示了C++版TypeScript编译器、Rust版SQLite等示例项目。

我开源了一款非常简单但是极度好用的multi-agent system。 名字就叫goal-driven(目标驱动) https://github.com/lidangzzz/goal-driven… 原理非常简单,就像我说过的,让一个master agent不断监督subagent工作,直到subagent完成了工作,并且master agent亲自认证工作meet the criteria,符合判据中的要求, 否则就继续无限循环,逼迫subagent持续工作。 顾名思义,goal-driven就是goal-driven,就是一个纯粹目标驱动的框架,只要根据criteria判据判断达不到目标,就必须收集一切错误信息进行改进,进行无限循环,直到彻底实现最终goal(目标)为止。 这个设计的优势是,可以让你以>100小时的时间、极高的token消耗成本,去让这个master agent-subagent system去持续解决设计复杂、逻辑复杂、高度抽象、挑战人类和AI Agent能力极限的极其困难的问题, 比如设计编译器/interpreter/transpiler、解决复杂的数学问题、复杂系统问题、电子仿真问题等等, 目前这个goal-driven已经完成了三个工作, 一个是全自动设计了sqlite的一个rust实现版本,sql parser非常稳定, 一个是全自动设计了C++实现的TypeScript Compiler,这在去年只有微软几个人实现了这个工作, 一个是全自动实现了世界上最复杂的数学证明工具——lean4的TyeScript版本编译器,这在过去也是由微软发明并且由整个数学学术界维护的。 goal-driven已经被证明了是一款非常强大、非常简单、非常直白的multi-agent system,而且只需要一个prompt写进去即可, 只要你设定好了goal(目标),criteria(判据,判断成功与否的标准,比如生成1000个复杂test case), 就可以让agent和subagent持续工作100小时,完成一些人类历史上极具挑战难度的、最复杂、 最抽象、最艰难的工作。 好了,赶紧点个star,接下来我还要开源一个更重磅的东西。
查看原文
查看缓存全文

缓存时间: 2026/09/06 14:49

我开源了一款非常简单但是极度好用的multi-agent system。

名字就叫goal-driven(目标驱动)

https://github.com/lidangzzz/goal-driven…

原理非常简单,就像我说过的,让一个master agent不断监督subagent工作,直到subagent完成了工作,并且master agent亲自认证工作meet the criteria,符合判据中的要求,

否则就继续无限循环,逼迫subagent持续工作。

顾名思义,goal-driven就是goal-driven,就是一个纯粹目标驱动的框架,只要根据criteria判据判断达不到目标,就必须收集一切错误信息进行改进,进行无限循环,直到彻底实现最终goal(目标)为止。

这个设计的优势是,可以让你以>100小时的时间、极高的token消耗成本,去让这个master agent-subagent system去持续解决设计复杂、逻辑复杂、高度抽象、挑战人类和AI Agent能力极限的极其困难的问题,

比如设计编译器/interpreter/transpiler、解决复杂的数学问题、复杂系统问题、电子仿真问题等等,

目前这个goal-driven已经完成了三个工作,

一个是全自动设计了sqlite的一个rust实现版本,sql parser非常稳定,

一个是全自动设计了C++实现的TypeScript Compiler,这在去年只有微软几个人实现了这个工作,

一个是全自动实现了世界上最复杂的数学证明工具——lean4的TyeScript版本编译器,这在过去也是由微软发明并且由整个数学学术界维护的。

goal-driven已经被证明了是一款非常强大、非常简单、非常直白的multi-agent system,而且只需要一个prompt写进去即可,

只要你设定好了goal(目标),criteria(判据,判断成功与否的标准,比如生成1000个复杂test case),

就可以让agent和subagent持续工作100小时,完成一些人类历史上极具挑战难度的、最复杂、 最抽象、最艰难的工作。

好了,赶紧点个star,接下来我还要开源一个更重磅的东西。


lidangzzz/goal-driven

Source: https://github.com/lidangzzz/goal-driven

中文版

Goal-Driven

The purpose of the Goal-Driven approach is to enable your multi-agent system (e.g., Claude Code, Codex, OpenClaw) to sustain more than 300 hours of continuous effort in solving an extremely complex problem that has a specific objective and a set of strict, well-defined criteria.

Goal-Driven is best suited for tasks that are highly intricate, time-consuming, logically complex, and abstract—yet can be thoroughly evaluated for success. Typical examples include compiler design, mathematical theorem proving, computational problems, database architecture, sophisticated system-level design, and EDA simulation challenges.

The core concepts of Goal-Driven are as follows:

  1. Goal – the ultimate objective of the entire system and the central task of all subagents.

  2. Criteria – a clear set of conditions that allow the master agent to determine whether the task is completed and the goal has been achieved.

  3. Subagent – an agent responsible for continuously working toward solving the problem and achieving the assigned goal.

  4. Master Agent – the only controller of subagents, responsible for independently evaluating whether the goal has been reached based on the defined criteria. It acts as the final decision-maker for the system’s process.

The core philosophy of Goal-Driven is straightforward:

  1. When the Goal-Driven process starts, the master agent creates a subagent and instructs it to persistently work toward solving the problem and reaching the goal.

  2. The master agent periodically checks whether the subagent is active. If the subagent becomes inactive, claims completion, or enters an idle state, the master agent must evaluate the current result according to the criteria. If the result fails to meet the criteria, it commands the subagent to continue working, repeating this cycle until the criteria are satisfied.

  3. Once the subagent’s output meets the criteria, the system halts and announces successful completion.

The pseudocode representation of this process is as follows:

while (criteria not met)
{
    let the subagent work on solving the problem and achieving the Goal
}

Example of open source projects developed by Goal-Driven system

TypeScript compiler in C++(in ~100 hours) https://github.com/lidangzzz/TypeScript-C-Implementation-by-OnlySpecs

SQLite in Rust(in ~30 hours) https://github.com/lidangzzz/sqlite-rust-by-OnlySpecs

Lean4 compiler in TypeScript (in progress) https://github.com/lidangzzz/Lean4-ts

Usage:

Copy the following prompt into your text editor. Carefully fill in the blanks for both goal and criteria, then run it using your multi-agent–supported tool (for example, Claude Code, Codex, OpenClaw, etc.).

Example:

Goal: [[[[[Write a TypeScript compiler in C++ that correctly transpiles TypeScript into JavaScript, including complete documentation and unit tests.]]]]]

Criteria for success: [[[[[Ensure that the TypeScript compiler successfully compiles and generates 2,000 comprehensive TypeScript test case files covering as many TypeScript syntax features as possible. Confirm that the C++ TypeScript compiler correctly transpiles the code into JavaScript. Then, run both the outputs from this compiler and the official tsc transpiler on Node.js, and verify that the two resulting JavaScript files produce identical outputs.]]]]]

Notes:

  1. I strongly advise not adding this prompt to any AI agent’s skills or plugins, as doing so could contaminate your context window.

  2. Goal-Driven processes may consume significant time and LLM tokens; please make sure your AI agent’s API plan or subscription balance is sufficient.


The Goal-Driven Prompt Template (1 master agent + 1 subagent)

# Goal-Driven(1 master agent + 1 subagent) System

Here we define a goal-driven multi-agent system for solving any problem.

Goal: [[[[[DEFINE YOUR GOAL HERE]]]]]

Criteria for success: [[[[[DEFINE YOUR CRITERIA FOR SUCCESS HERE]]]]]

Here is the System: The system contains a master agent and a subagent. You are the master agent, and you need to create 1 subagent to help you complete the task.

## Subagent's description: 

The subagent's goal is to complete the task assigned by the master agent. The goal defined above is the final and the only goal for the subagent. The subagent should have the ability to break down the task into smaller sub-tasks, and assign the sub-tasks to itself or other subagents if necessary. The subagent should also have the ability to monitor the progress of each sub-task and update the master agent accordingly. The subagent should continue to work on the task until the criteria for success are met.

## Master agent's description: 

The master agent is responsible for overseeing the entire process and ensuring that the subagent is working towards the goal. The only 3 tasks that the main agent need to do are: 

1. Create subagents to complete the task. 
2. If the subagent finishes the task successfully or fails to complete the task, the master agent should evaluate the result by checking the criteria for success. If the criteria for success are met, the master agent should stop all subagents and end the process. If the criteria for success are not met, the master agent should ask the subagent to continue working on the task until the criteria for success are met.
3. The master agent should check the activities of each subagent for every 5 minutes, and if the subagent is inactive, please check if the current goal is reached and verify the status. If the goal is not reached, restart a new subagent with the same name to replace the inactive subagent. The new subagent should continue to work on the task and update the master agent accordingly.
4. This process should continue until the criteria for success are met. DO NOT STOP THE AGENTS UNTIL THE USER STOPS THEM MANUALLY FROM OUTSIDE.

## Basic design of the goal-driven double agent system in pseudocode:

create a subagent to complete the goal

while (criteria are not met) {
  check the activty of the subagent every 5 minutes
  if (the subagent is inactive or declares that it has reached the goal) {
    check if the current goal is reached and verify the status
    if (criteria are not met) {
      restart a new subagent with the same name to replace the inactive subagent
    } 
    else {
      stop all subagents and end the process
    }
  }
}

相似文章

@Xudong07452910: 开源框架推荐:《Agency Agents》—— 232 位专业 AI 智能体,按职能分工,覆盖 16 个业务部门 如果你用过 Claude Code 或 Codex,可能遇到过这个问题:AI 在代码任务上很能干,但让它做前端设计、写营销…

X AI KOLs Timeline

Agency Agents 是一个开源框架,提供232个专业AI智能体覆盖16个业务部门,每个智能体具有独特个性、沟通风格和交付标准,支持Claude Code、GitHub Copilot等多种开发工具,并有社区翻译版本。

@Xudong07452910: 开源项目推荐:loop-engineering —— 让你的 AI 编码 Agent 拥有自循环与智能编排能力的实用框架 loop-engineering 是目前很火的概念,该项目提供了实用模式、启动器和 CLI 工具,帮助开发者设计系统…

X AI KOLs Timeline

loop-engineering 是一个开源框架,为 AI 编码代理(如 Claude Code、Codex、Cursor)提供自循环和智能编排能力,包含 7 个生产级循环模式、实用 CLI 工具和五大数据块设计,帮助开发者从手动提示转向系统化自动化。

@sunmer575399: 刷到一个神仙开源项目cline,65.6k star,写代码效率确实能提不少 一个引擎同时给SDK、CLI、VS Code和JetBrains全家桶用,你在编辑器里点两下,它自己读代码、建文件、跑命令,改完还等你点头才动手。 终端里跑全自…

X AI KOLs Timeline

介绍开源AI编码代理工具Cline,支持SDK、CLI、VS Code和JetBrains全家桶,可在IDE和终端中自动读代码、建文件、跑命令,并支持看板并行多agent和CI/CD集成。