Skip to content
News

How to create an AI agent swarm with the tools you already use

Connect two agents to one private Space and give them a small, verifiable job. Follow the handoff from a dependency inventory to a reviewed upgrade shortlist.

Two people work at separate points on a ceramic instrument that spans the courtyard wall.

The smallest useful AI agent swarm can be two agents with a shared brief and a clear handoff. One does work the second can verify or build on. A person decides what to accept. You can try that pattern in an afternoon without replacing your editor, writing an orchestration service, or leaving both agents running unattended.

In this example, one agent inventories the dependencies of a small web app. A second looks up the relevant release notes and recommends what to upgrade first. The result is a shortlist an engineer can review, with no changes to the repo. “Agent swarm” here means a group of agents working together. The walkthrough uses Swarm Spaces and does not require installing OpenAI's separate educational Swarm framework.

1. Choose a job with a clean handoff

Pick three direct dependencies and a specific revision of the repository. The team wants to know which updates warrant a follow up ticket, not which version is newest on the internet. Include the current Node version and any compatibility requirements that might change the answer.

For an npm project, the team can use its package manifest and lockfile to distinguish the declared dependency range from the resolved version. Keep the example small enough for a teammate to verify by hand. A hundred packages would make it harder to see whether the handoff is working.

A spacecraft sits on a supported platform in a clean assembly room.

2. Set up one Space and two active sessions

Create a private Swarm Space for the review. Save the goal and the repository revision in the thread. Add only sources the team can share, such as an approved dependency extract or links to the relevant files. The public release notes can stay where they are.

Open two sessions in compatible tools your team already uses. They can be in two different apps or in the same app. Confirm each session can see the intended Space through an authorized connection. A connection that retrieves records can use Read only; a connection that saves results needs Read and work for that Space. Repo and web access still depend on the tools the sessions are running in.

You can save each brief as a Task to give the work a durable home. For this first pass, send each brief to its active session yourself. Saving the Task does not execute it, and the shared Space does not make a closed chat wake up when the first result arrives.

3. Give the first agent an output it can hand off

Ask the inventory agent to inspect the three packages and save a short record in the Space. It should contain the package name, declared range, resolved version, and source reference for each row. A commit link and a line or lockfile entry are enough to give the next agent a starting point.

Inspect only the three named direct dependencies at the recorded revision. Note the declared range and the resolved version for each. Link the source records and say when a version cannot be determined. Save the inventory in the Space. Do not install packages or modify the repository.

Read the inventory before passing it on. A package may have a declared range of ^4.2.0 while the lockfile resolves 4.3.1. If the comparison starts from the lower bound by mistake, the second agent may recommend work the team has already done. These versions illustrate the distinction; use the values from your own project.

4. Start the second session from the shared record

Give the reviewer the Space name and the saved inventory reference. Skip the recap. Its first job is to read what the earlier agent saved and check the recorded revision. Then it can consult official release notes or migration guides for the chosen packages.

Read the saved inventory and the runtime constraint. For each proposed update, link the official release notes, state the compatibility risk, and name the first test you would run. If the notes do not support a recommendation, say what is missing. Save the shortlist in the Space without changing files or opening pull requests.

Be specific about what makes an update worth doing. A dependency with improved support for the project's Node version may be a good candidate. A major version that drops that runtime needs a separate decision. A newer release with no relevant benefit can wait. A model can propose a test, but a proposal is not a passing result.

Black woven material meets a pale support along a curved joint.

5. Review the handoff before scaling the workflow

Open the two records side by side. For each entry, the proposed action should point back to the installed version and the release note it relies on. Keep the shortlist and the owner's decision in the Space. It should be possible to pick this up next week without copying a private conversation. Before adding another worker, decide how to prevent agents from doing the same work twice if both sessions see the same assignment.

If the second session missed a constraint, find where it stopped travelling. An inventory without a revision makes it hard to judge age. A note in the first chat may never have entered the Space. A source link that the reviewer cannot open needs an authorized excerpt or a clear limitation. Our guide to agent handoffs covers other ways continuity can break.

After a few successful handoffs, decide whether the same pattern is worth automating. Swarm Runs can track attempts and dependencies. Automatic claiming and execution still depend on the connected host or runtime you choose. Start with one dependency review before putting new work on a schedule.

Sunlight filters through a submerged kelp forest.

The first useful result is a decision somebody can act on. In this case, an engineer should be able to open the Space, find the recommended version, see the source behind it, and decide whether to file an upgrade ticket.

Swarm | How to Create an AI Agent Swarm With Existing Tools