多 Agent 并行,终于有人做出来了。Parallel execution of multiple agents is finally here.


AI free token/AI免费积分

 

前一段时间我跑了三个Claude Code代理,把一个项目做了三种不同的重构。

结果第二个代理写完之后就把第一个的文件给覆盖了。

时间、token 都浪费了,全部白干。

本来不想再折腾了。

直到最近刷到一个叫 Orca 的项目。

思路很有意思,它把Git worktree当作IDE的核心对象来使用。

每个代理都运行在单独的一个目录中,并且各个文件之间相互隔离。

不会乱改文件,相当省心。

GitHub 上已经斩获 10771 个Star。

图片

下面我给你们实际演示一下,你就知道有多厉害了

我再用它来尝试三种不同的重构成方案。

我在 Orca 中一键创建三个worktree,并且每个 worktree 上都运行着一个 ClaudeCode 代理。

图片

第一个代理开始在 worktree-1 里改代码。

第二个代理同时在 worktree-2 里改同一批文件,但完全不会覆盖第一个的改动。

图片

第三个代理也在 worktree-3 里跑。

用一个窗口来查看三个代理的进展情况,挑最好的方案合并。

图片

整个过程中我只是点击了几次鼠标。

创建worktree、启动代理、比较结果,整个过程都没有离开IDE。

它把每个 AI 代理都给你隔离好了

01 并行 Worktree。

一个prompt同时发送给 5 个代理,每个代理都在自己的Git worktree中运行。

传统的做法是手工切分支、文件互相覆盖、Git状态很乱。

Orca 的做法是:一键生成、5 个代理同时运行、实时比较差异、选择最好的方案合并。

图片

也可以把代理放在远程服务器上运行,用本地IDE来控制文件和终端,并且可以自动重连。

它支持 25种的 CLI Agent。

图片

02 配合手机端使用。

使用手机来监控、控制正在运行中的代理,并接收完成的通知以及远程发送命令。

以前跑长时间的任务,出去开会回来的时候发现代理已经跑了。

图片

现在用手机查看进度、接到通知后马上介入、远程发送命令,不需要坐在工位上等。

手机端也可以做未读标记,便于之后回到电脑上继续处理。

图片

03 终端分屏。

Ghostty 级别的终端体验、WebGL 渲染、无限分屏、滚动缓冲区重启之后仍然保留。

传统终端:卡顿、分屏有限、重启丢失历史。

Orca终端:流畅、无限分屏、历史一直保留,适用于长时间运行的代理任务。

图片

代理还可以用命令行来控制Orca,自动生成worktree、截屏、填表单。

04 设计模式。

以前是手动截屏、用文字来描述UI的问题,效率很低。

现在:点击元素就会自动生成完整的上下文,AI 会直接理解到 UI 的结构。

图片

也可以把截图以及DOM信息一并发送给代理,使它能够更加准确地修改界面。

该功能对于前端开发以及UI调试非常有用。

05 GitHub 和 Linear 原生集成。

在 IDE 中直接浏览 PR、Issue、Project Board,并且可以一键创建 worktree。

以前是切到浏览器里看PR,再切回IDE里写代码,来回切换。

现在:在 IDE 中查看任务、创建 worktree、编写代码、评审、提交,一条龙服务。

图片

PR和Issue会自动关联到worktree上,并且CI检查的结果也会在侧面栏中实时显示出来。

不需要分窗口,整个评审过程都放在一个界面上进行。

06 拖拽文件到代理。

可以直接把文件或者图片直接拖到代理的对话框里,会自动保存并加上上下文。

以前是把截图保存在桌面上,然后手动上传到代理上,并且要自己写出路径。

现在:拖到那里就可以了,代理直接拿到文件的内容,少了很多步骤。

图片

图片、代码文件、日志文件都可以拖过来,代理会马上看到内容。

想试的话,装起来很简单

桌面端下载:

Github上可以下载到macOS、Windows、Linux的安装包,大家可以根据自己的需要下载。

图片

Homebrew 安装(macOS):

brew install --cask stablyai/orca/orca

安卓端安装包也有。

图片

苹果用户可以在App Store中搜索Orca进行下载。

安装好桌面端之后,在Orca中添加项目、创建worktree、启动代理,就完成了。

到这里缺点也给大家提提

这几个地方你得注意下。

你要理解Git worktree的意思。

团队要学习worktree生命周期管理、命名规范、清理策略等知识,有一定的学习曲线。

但是学会了之后,多个代理并发就很容易了。

磁盘占用会增加。

有多个worktree同时存在,每一个都是一个独立的磁盘目录,就会占到更多的空间。

手机端的功能比较少。

手机端可以进行监控以及远程控制,但是不能创建worktree、修改文件或者执行代理。

 需要自己订阅 AI。

Orca 不提供 AI 模型订阅服务,你需要自己去订阅 Claude Code、Codex 等服务。

写在最后

多代理协作已经是 AI 编码的新常态了。

但是大部分开发者仍然使用传统的IDE,自己切换分支、自己管理worktree。

这很不合理。

就比如在git出现之前,大家都是自己手动备份代码文件夹一样。

把 git worktree 也变成 IDE 的一等公民,并且实现自动化的管理、可视化的展示和一键式的切换。

越用越觉得,这才是AI时代的IDE应该有的样子。

项目基于 MIT 协议开放,感兴趣的同学可以去 GitHub 仓库看看源码和文档。

开源地址:https://github.com/stablyai/orca

既然看到这了,欢迎随手点赞、在看、转发,也可以给我个星标⭐,接收最新的文章,我们下期见!

 

A while ago, I ran three Claude Code agents to perform three different refactorings on a project.

The result was that the second agent overwrote the files of the first one after finishing.

Time and tokens were wasted, and everything was done in vain.

I didn't want to mess around with it anymore.

That was until recently, when I came across a project called Orca.

The idea is very interesting; it uses the Git worktree as the core object of the IDE.

Each agent runs in a separate directory, and the files are isolated from each other.

There is no random overwriting of files, so it is very reliable.

It has already garnered 10,771 stars on GitHub.

Now I'll show you a practical demonstration so you can see how powerful it is.

I will try to use it to perform three different refactorings.

In Orca, I created three worktrees with one click, and a ClaudeCode agent is running on each worktree.

The first agent starts modifying the code in worktree-1.

The second agent simultaneously modifies the same set of files in worktree-2, but it does not overwrite the changes of the first one.

The third agent also runs in worktree-3.

I use a single window to view the progress of all three agents and choose the best solution to merge.

During the entire process, I only clicked the mouse a few times.

Creating worktrees, starting agents, and comparing results were all done within the IDE without leaving it.

It isolates each AI agent for you.

01 Parallel Worktrees.

A single prompt is sent to 5 agents, and each agent runs in its own Git worktree.

The traditional approach involves manually switching branches, overwriting files, and ending up with a messy Git state.

Orca's approach is: generate with one click, run 5 agents simultaneously, compare differences in real-time, and select the best solution to merge.

You can also run the agents on a remote server and control the files and terminal with the local IDE, with automatic reconnection.

It supports 25 different CLI agents.

02 Using it with the mobile app.

Use your phone to monitor and control running agents, receive completion notifications, and send commands remotely.

In the past, if you were running a long task and went to a meeting, you might come back to find the agent had already finished.

Now, you can check the progress on your phone, intervene immediately after receiving a notification, and send commands remotely without having to wait at your workstation.

The mobile app can also set unread markers to make it easier to continue processing on the computer later.

03 Terminal splitting.

Ghostty-level terminal experience, WebGL rendering, infinite splitting, and scroll buffer retained after restart.

Traditional terminals: lag, limited splitting, history lost after restart.

Orca terminal: smooth, infinite splitting, history always retained, suitable for long-running agent tasks.

Agents can also control Orca via the command line to automatically generate worktrees, take screenshots, and fill out forms.

04 Design mode.

In the past, you had to manually take screenshots and describe UI problems with text, which was inefficient.

Now: clicking on an element automatically generates the full context, allowing the AI to directly understand the UI structure.

You can also send screenshots and DOM information to the agent together, allowing it to modify the interface more accurately.

This feature is very useful for front-end development and UI debugging.

05 Native integration with GitHub and Linear.

Browse PRs, issues, and project boards directly in the IDE, and create worktrees with one click.

In the past, you had to switch to the browser to view a PR and then switch back to the IDE to write code.

Now: view tasks in the IDE, create worktrees, write code, review, and commit all in one window.

PRs and issues are automatically linked to the worktree, and CI check results are displayed in the sidebar in real-time.

There is no need to split windows; the entire review process takes place in a single interface.

06 Drag-and-drop files to agents.

You can directly drag files or images into the agent's dialog box, and they will be saved with the context automatically.

In the past, you had to save the screenshot on the desktop, manually upload it to the agent, and write out the path yourself.

Now: just drag it over, and the agent gets the file content immediately, which is much faster.

You can drag images, code files, and log files, and the agent will see the content right away.

If you want to try it, the installation is very simple.

Desktop download:

You can download the macOS, Windows, and Linux installation packages from the GitHub repository.

Homebrew installation (macOS):

Android installation packages are also available.

Apple users can search for Orca in the App Store to download it.

After installing the desktop version, add a project, create a worktree, and start the agent in Orca, and you are done.

Here are some drawbacks to consider:

Here are some things you need to pay attention to.

You need to understand what a Git worktree is.

The team needs to learn about worktree lifecycle management, naming conventions, and cleanup strategies, which involves a learning curve.

However, once you learn it, running multiple agents in parallel becomes much easier.

Disk usage increases.

If you have multiple worktrees active at the same time, each one is an independent directory on the disk, which takes up more space.

The mobile app has limited functionality.

The mobile app can be used for monitoring and remote control, but it cannot create worktrees, modify files, or execute agents.

Orca does not provide an AI model subscription service; you need to subscribe to services like Claude Code or Codex yourself.

In conclusion.

Multi-agent collaboration is becoming the new norm for AI coding.

However, most developers still use traditional IDEs and manually switch branches and manage worktrees themselves.

This is inefficient.

It is like how, before Git, everyone used to manually copy folders to back up their code.

Orca elevates the Git worktree to a first-class citizen of the IDE, providing automated management, visual display, and one-click switching.

The more I use it, the more I think this is how IDEs should be in the age of AI.

The project is open-source under the MIT license. Interested readers can check out the source code and documentation on the GitHub repository.

Repository address: https://github.com/stablyai/orca

Since you've read this far, please like and share this post, and consider following me for the latest updates. See you next time!

图片

图片

图片

图片

图片

图片

图片

图片

图片

图片

图片

图片

图片

图片

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry