diff --git a/README.md b/README.md index 8ab44455..2b42753d 100644 --- a/README.md +++ b/README.md @@ -351,9 +351,13 @@ Baselines across these dimensions include **Claude Code**, **OpenAI CodeX**, and ## 📅 Roadmap & News +- **2026-05-23** — 🆕 **TUI v3 released** (`frontends/tui_v3.py`). Block-based scrollback with proper resize reflow, per-terminal color profile for cross-terminal parity, and feature parity with v2. +- **2026-05-18** — 🆕 **Morphling mode**. Project-level skill absorption — extract goal + tests from any external repo, then decide per component: call, rewrite, or discard. See `memory/morphling_sop.md`. +- **2026-05-17** — 🆕 **Goal Hive mode**. Multi-worker cooperative Goal mode — BBS-coordinated master/workers running long-horizon objectives in parallel. See `memory/goal_hive_sop.md`. - **2026-05-15** — 🖥️ **Desktop GUI released**. One-line installs ship a ready-to-run desktop app (`frontends/GenericAgent.exe`). Developers launch via `python launch.pyw`. - **2026-05-14** — 🆕 **Conductor sub-agent orchestration**. Spawn, supervise, and auto-clean parallel sub-agents; first-class delegation primitives complementing `/btw` side-questions. - **2026-05-12** — 🆕 **TUI v2 released** (`frontends/tuiapp_v2.py`). Refined Textual frontend with image-paste folding, file paste, block-delete, Ctrl+C copy, history navigation, and `/llm` / `/export` / `/continue` pickers. +- **2026-05-08** — 🆕 **Goal mode** (`reflect/goal_mode.py`). Time-budget-driven self-driven loop — "keep optimizing X for N hours" with no premature delivery. - **2026-04-21** — 📄 [**Technical Report on arXiv**](https://arxiv.org/abs/2604.17091) — *GenericAgent: A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization*. - **2026-04-11** — Introduced **L4 session archive memory** and scheduler cron integration. - **2026-03-23** — Personal WeChat supported as a bot frontend. @@ -388,6 +392,7 @@ Thanks to the **LinuxDo** community for the support! - [chilishark27/ga-manager](https://github.com/chilishark27/ga-manager) - [wangjc683/galley](https://github.com/wangjc683/galley) +- [FroStorM/A3Agent](https://github.com/FroStorM/A3Agent/tree/workbench) --- @@ -720,9 +725,13 @@ GenericAgent 通过 **分层记忆 × 最小工具集 × 自主执行循环** ## 📅 路线图与最新动态 +- **2026-05-23** — 🆕 **TUI v3 正式发布**(`frontends/tui_v3.py`)。基于块的滚屏回看 + 正确的 resize 重排,每终端独立配色保证跨终端一致,并与 v2 达成功能对齐。 +- **2026-05-18** — 🆕 **Morphling 模式**。项目级能力吞噬 —— 从任意外部仓库抽取目标与测例后,对每个核心组件分别决定调用、重写或舍弃。详见 `memory/morphling_sop.md`。 +- **2026-05-17** — 🆕 **Goal Hive 模式**。多 worker 协作版 Goal —— Master/Worker 通过 BBS 协同推进长程目标。详见 `memory/goal_hive_sop.md`。 - **2026-05-15** — 🖥️ **桌面 GUI 发布**。一键安装会自带可直接运行的桌面端(`frontends/GenericAgent.exe`),开发者也可用 `python launch.pyw` 启动。 - **2026-05-14** — 🆕 **Conductor 子 Agent 编排**。派发、监督、自动清理并行子 Agent;与 `/btw` 旁路子 Agent 互补,提供一等公民级的任务委派原语。 - **2026-05-12** — 🆕 **TUI v2 正式发布**(`frontends/tuiapp_v2.py`)。重做视觉风格的 Textual 前端,支持图片粘贴折叠、文件粘贴、块删除、Ctrl+C 复制、历史导航,以及 `/llm` / `/export` / `/continue` 选择器。 +- **2026-05-08** — 🆕 **Goal 模式**(`reflect/goal_mode.py`)。时间预算驱动的自驱循环 —— "持续优化 X N 小时",预算没到不准提前交付。 - **2026-04-21** — 📄 [**技术报告已发布至 arXiv**](https://arxiv.org/abs/2604.17091) — *GenericAgent: A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization*。 - **2026-04-11** — 引入 **L4 会话归档记忆**,并接入 scheduler cron 调度。 - **2026-03-23** — 支持个人微信接入作为 Bot 前端。 @@ -757,7 +766,7 @@ GenericAgent 通过 **分层记忆 × 最小工具集 × 自主执行循环** - [chilishark27/ga-manager](https://github.com/chilishark27/ga-manager) - [wangjc683/galley](https://github.com/wangjc683/galley) -- https://github.com/FroStorM/A3Agent/tree/workbench +- [FroStorM/A3Agent](https://github.com/FroStorM/A3Agent/tree/workbench) --- diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 8d4525f1..eec10a58 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -48,9 +48,36 @@ python3 --version ### 下载项目 -1. 打开 [GitHub 仓库页面](https://github.com/lsdefine/GenericAgent) -2. 点绿色 **Code** 按钮 → **Download ZIP** -3. 解压到你喜欢的位置 +最方便的方式是 **一键安装**(自带隔离 Python 环境 + Git + 桌面端): + +**Windows PowerShell** + +```powershell +powershell -ExecutionPolicy Bypass -c "irm http://fudankw.cn:9000/files/ga_install.ps1 | iex" +``` + +**Linux / macOS** + +```bash +curl -fsSL http://fudankw.cn:9000/files/ga_install.sh | bash +``` + +或者手动 clone(开发者): + +```bash +git clone https://github.com/lsdefine/GenericAgent.git +cd GenericAgent +uv venv && uv pip install -e ".[ui]" +``` + +也可以走最朴素的 ZIP:[GitHub 仓库页面](https://github.com/lsdefine/GenericAgent) → 点绿色 **Code** → **Download ZIP** → 解压到喜欢的位置。 + +> 💡 **让 Claude / Codex 等 Agent 帮你装**:把下面这条 curl 丢给它,它会按官方指南替你完成安装: +> ```bash +> curl -fsSL https://raw.githubusercontent.com/lsdefine/GenericAgent/refs/heads/main/docs/installation_zh.md +> ``` +> +> 📖 平台差异、排障、升级流程见 [`docs/installation_zh.md`](installation_zh.md)。 ### 创建配置文件 @@ -62,62 +89,55 @@ python3 --version ### 配置示例 -**最常见的用法:** +**推荐首选:Claude 原生协议**: ```python -# 变量名含 'oai' → 走 OpenAI 兼容格式 (/chat/completions) -oai_config = { - 'apikey': 'sk-你的密钥', - 'apibase': 'http://你的API地址:端口', - 'model': '模型名称', +# 变量名同时含 'native' 和 'claude' → NativeClaudeSession(API 原生工具字段) +native_claude_config = { + 'name': 'claude', # /llms 显示名 & mixin 引用名 + 'apikey': 'sk-xxx', # sk-ant- 走 x-api-key;其它走 Bearer + 'apibase': 'https://api.anthropic.com', # 官方直连;反代渠道填对应地址 + 'model': 'claude-opus-4-7', # [1m] 后缀触发 1M 上下文 beta + # 'fake_cc_system_prompt': True, # CC switch / 反代渠道必须置 True } ``` -```python -# 变量名含 'claude'(不含 'native')→ 走 Claude 兼容格式 (/messages) -claude_config = { - 'apikey': 'sk-你的密钥', - 'apibase': 'http://你的API地址:端口', - 'model': 'claude-sonnet-4-20250514', -} -``` +**也支持:OpenAI 原生协议**: ```python -# MiniMax 使用 OpenAI 兼容格式,变量名含 'oai' 即可 -# 温度自动修正为 (0, 1],支持 M2.7 / M2.5 全系列,204K 上下文 -oai_minimax_config = { - 'apikey': 'eyJh...', - 'apibase': 'https://api.minimax.io/v1', - 'model': 'MiniMax-M2.7', +# 变量名同时含 'native' 和 'oai' → NativeOAISession +native_oai_config = { + 'name': 'gpt', # /llms 显示名 & mixin 引用名 + 'apikey': 'sk-xxx', + 'apibase': 'https://api.openai.com/v1', # 自动补 /v1/chat/completions + 'model': 'gpt-5.5', } ``` -**使用标准工具调用格式(适合较弱模型):** +**进阶:Mixin 故障转移**(多 session 自动切换,最稳的玩法): ```python -# 变量名同时含 'native' 和 'claude' → Claude 标准工具调用格式 -native_claude_config = { - 'apikey': 'sk-ant-你的密钥', - 'apibase': 'https://api.anthropic.com', - 'model': 'claude-sonnet-4-20250514', +# llm_nos 按优先级排列;首项失败按指数退避切下一项 +mixin_config = { + 'llm_nos': ['claude', 'gpt'], # 与上面 native_* 的 name 字段对应 + 'max_retries': 10, + 'base_delay': 0.5, } ``` -> 💡 还支持 `native_oai_config`(OpenAI 标准工具调用)、`sider_cookie`(Sider)等,详见 `mykey_template.py` 中的注释。 +> 💡 完整字段说明(`thinking_type` / `reasoning_effort` / `context_win` / `proxy` / Zhipu / MiniMax / Kimi / OpenRouter 等渠道示例)见 `mykey_template.py` 顶部注释。 ### 关键规则 -**变量命名决定接口格式**(不是模型名决定的): +**变量命名决定 Session 类型**(不是模型名决定的): -| 变量名包含 | 触发的 Session | 适用场景 | -|-----------|---------------|---------| -| `oai` | OpenAI 兼容 | 大多数 API 服务、OpenAI 官方 | -| `claude`(不含 `native`) | Claude 兼容 | Claude API 服务 | -| `native` + `claude` | Claude 标准工具调用 | 较弱模型推荐,工具调用更规范 | -| `native` + `oai` | OpenAI 标准工具调用 | 较弱模型推荐,工具调用更规范 | - -> 例:用 Claude 模型,但 API 服务提供的是 OpenAI 兼容接口 → 变量名用 `oai_xxx`。 -> 例:用 MiniMax 模型 → 变量名用 `oai_minimax_config`,MiniMax 走 OpenAI 兼容接口。 +| 变量名包含 | 触发的 Session | 工具协议 | 适用场景 | +|-----------|---------------|---------|---------| +| `native` + `claude` | NativeClaudeSession | API 原生 tool 字段 | **推荐首选** — Claude 原生协议 | +| `native` + `oai` | NativeOAISession | API 原生 tool 字段 | GPT/o 系列、OAI 兼容渠道 | +| `mixin` | MixinSession | 多 session 故障转移 | 最稳;要求被引用 session 全为 native | +| `claude`(不含 `native`) | ClaudeSession | 文本协议工具 | **deprecated**,后续版本可能移除 | +| `oai`(不含 `native`) | LLMSession | 文本协议工具 | **deprecated**,后续版本可能移除 | **`apibase` 填写规则**(会自动拼接端点路径): @@ -167,13 +187,16 @@ Agent 会自己读代码、找出需要的包、全部装好。 ### 升级到图形界面 -依赖装完后,就可以用 GUI 模式了: +依赖装完后,可以选择适合你的前端: -```bash -python3 launch.pyw -``` +| 前端 | 启动命令 | 说明 | +|------|---------|------| +| **桌面端** | 双击 `frontends/GenericAgent.exe`(Windows 一键安装自带) | 真原生窗口,零终端依赖 | +| **TUI v3** | `python frontends/tui_v3.py` | 基于块的滚屏回看、resize 重排、每终端独立配色,跨终端体验一致 | +| **TUI v2** | `python frontends/tuiapp_v2.py` | Textual 键盘驱动界面,图片粘贴折叠、`/llm`/`/export`/`/continue` 选择器 | +| **Streamlit / 悬浮窗** | `python launch.pyw` | 浏览器中打开的 Streamlit UI,附带桌面悬浮窗 | -启动后会出现一个桌面悬浮窗,直接在里面输入任务指令。 +> 💡 Windows 下推荐用 **Git Bash** 跑 TUI;PowerShell / cmd 对 Unicode 和键位支持较弱。仍异常时请直接告诉 Agent:「参考 Claude Code 在 Windows 终端的最佳配置帮我把 TUI 修一遍」。 ### 可选:让 Agent 帮你做的事 @@ -244,6 +267,10 @@ Agent 会自动配好。如果你电脑上没有 Git,它也会帮你下载 por | **Plan(规划)** | `查看你的代码,告诉我你的 plan 模式怎么启用` | | **SubAgent(子代理)** | `查看你的代码,告诉我你的 subagent 模式怎么启用` | | **自主探索** | `查看你的代码,告诉我你的自主探索模式怎么启用` | +| **Goal** | `查看你的代码,告诉我 goal 模式怎么启用` | +| **Goal Hive(多 worker 协作)** | `查看你的代码,告诉我 goal hive 模式怎么启用` | +| **Conductor(多 subagent 编排)** | `查看你的代码,告诉我 conductor 模式怎么启用` | +| **Morphling(吞噬外部项目)** | `查看你的代码,告诉我 morphling 模式怎么启用` | > 💡 这就是 GenericAgent 的核心设计理念:**代码即文档**。Agent 能读懂自己的源码,所以任何功能你都可以直接问它。 @@ -268,4 +295,4 @@ GenericAgent 不预设技能,而是**靠使用进化**。每完成一个新任 > Agent 会自动 pull 最新代码并解读 commit log,告诉你新增了什么能力。 -> 更多细节请参阅 [README.md](../README.md) 或 [详细版图文教程](https://my.feishu.cn/wiki/CGrDw0T76iNFuskmwxdcWrpinPb)。 \ No newline at end of file +> 更多细节请参阅 [README.md](../README.md) 或 [详细版图文教程](https://my.feishu.cn/wiki/CGrDw0T76iNFuskmwxdcWrpinPb)。