00:00:00Last week, we made a video about the Claude Code agent swarm feature,
00:00:03where specialised sub-agents are created for specific tasks,
00:00:07and these can communicate back to the main orchestrator or team lead.
00:00:11Well, back then, it was a hidden feature exposed with clever hacking.
00:00:15But now it's been officially released under the experimental flag
00:00:19and comes with official docs, teamwork support,
00:00:21and the ability for teammates to challenge and argue with each other.
00:00:25Hit subscribe and let's get into it.
00:00:28Anthropic have been on fire this week, from the release of Opus 4.6
00:00:32to the Super Bowl ads that have made Sam Altman unhappy.
00:00:35But agent teams has to be one of the biggest features released for Claude Code,
00:00:40combining the work of the tasks feature with parallel sub-agents.
00:00:44Although, teams are much better than sub-agents themselves.
00:00:48Let me show you.
00:00:48So for the agent teams feature to work, you need to be on version 2.1.32 or above
00:00:54and add this line to your settings.json file in your .Claude directory.
00:00:58Okay, so here I have a plan to add a web interface to a tool called XDL
00:01:03that allows you to download videos from Twitter.
00:01:05I've told the agents to read the plan, create tasks and spawn a front-end and designer teammate.
00:01:11But before I hit enter, you'll notice down here that I'm actually in Teamux.
00:01:16And this is because the agents can use Teamux or item 2 to create split panes
00:01:21to show me exactly what each teammate is doing.
00:01:24So let's hit enter and see what this does.
00:01:26Okay, so now it's reading the plan and it's creating some tasks
00:01:30before it spawns some teammates in parallel.
00:01:33And here we have our first teammate, the front-end one.
00:01:35I'm actually going to zoom out a bit so we can see it because there's a lot going on here.
00:01:39And we have our second teammate down here, which is the UI styling teammate.
00:01:43So you'll notice here that I can interact with the teammates if I wanted to,
00:01:47giving them specific commands as they work.
00:01:49And of course, if I had a bigger monitor or if I zoomed out to my regular zoom level,
00:01:53I could see exactly what each one is doing.
00:01:55But because I've zoomed in a bit, it's difficult to do that.
00:01:58Okay, and now once the teammate has finished,
00:02:00Claude codes so the main team member on this side will automatically shut it down.
00:02:04And now both teammates have finished, we can now take a look at the design,
00:02:08which looks like this.
00:02:09I'm going to paste in the URL of a tweet, hit download, and the video is actually extracting,
00:02:14which we can download and view in our browser.
00:02:18Very cool.
00:02:19Also, if we take a look in our dot Claude teams directory,
00:02:22we can see we have a folder with the name of the project and the branch.
00:02:26And if I cd into that folder, there is a config JSON file that contains the project,
00:02:31the team lead here, and the model that the team lead was using, which was haiku.
00:02:36Even though I didn't set it to be haiku, I think it chose that to be the best model for the job.
00:02:41Now, if I run the exact same prompt with the same model outside of TMUX and hit enter,
00:02:46again, it goes to work, setting up the tasks and creating the team members.
00:02:50But this time you get to see the teammates down here.
00:02:53So we have the designer, the front end developer and the main team leader.
00:02:57And if I go into a team member by pressing enter, we can see exactly what they're doing.
00:03:01And we can communicate with them in this window as well.
00:03:04So again, this is similar to the view in TMUX, but instead of getting multiple windows,
00:03:09we get one big one and we can switch between team members down here.
00:03:13And when a teammate has finished their tasks, they get shut down and the main team lead takes over.
00:03:18In this case, we can see it's telling us what tasks have been completed.
00:03:21And it's giving us a summary of what has been done.
00:03:24Now, this may seem very similar to sub-agents, but they're actually very different.
00:03:28So if we look at the documentation and scroll down until we get to this section,
00:03:31we can see the differences. So agent teams get their own independent contacts.
00:03:35Sub-agents only communicate to the main agents,
00:03:38whereas teammates can communicate with each other and they have a shared task list.
00:03:43Whereas for sub-agents, the main agents manages everything.
00:03:46But here's what's interesting.
00:03:47Sub-agents summarise the result and send it back to the main contacts,
00:03:51whereas agents have their own separate cloud instance.
00:03:55So they use way more tokens.
00:03:57So yes, the agent teams or agent swarm feature is officially here.
00:04:02Although I don't think I'll be using it that much.
00:04:04The cost of anthropic models, combined with the fact that this feature
00:04:09guzzles tokens like they're nothing, kind of makes me not want to use it as much
00:04:13and restrict it to special cases for doing research or getting an agent to check another agent's work.
00:04:19I mean, take a look at this.
00:04:20Me using the agent teams feature the first time.
00:04:23So earlier in the video, using my two teammates, excluding the main one,
00:04:27took up 29% of my usage using Opus 4.6, which is around 13,000 tokens.
00:04:34But it's important to note that running parallel agents is nothing new.
00:04:37Open code has actually had this feature for a while and so have some other agent harnesses.
00:04:41So it will be interesting to see how the agent teams feature is adopted by cloud code users,
00:04:47considering that Teamux doesn't have the most user-friendly shortcuts.