HerdCTL is an orchestration layer for Claude Code
Learn moreTrack achievements automatically - boost your performance reviews
Try demo modeI love Claude Code, but there are three things I really wish it could do:
This is what herdctl aims to do. herdctl is an MIT-licensed orchestration layer for Claude Code. More accurately, it's an orchestration layer for the Claude Agents SDK, upon which herdctl is built. It's been built in about a week using a combination of Claude Code, ralph wiggum, and GSD. It is not production ready.
Here's a video showing it in action:
You can join the discord server to chat with those Star Trek agents. They're running in a container on an old machine in my homelab so although there's not a whole lot to be gained by trying to talk them into doing bad things, I am expecting people will try. Either I'll have a Lieutenant Worf up in time to guardrail those, or I'll just kill the agents, so YMMV.
Install it with npm install -g herdctl or check out the github repo and docs site for more.
herdctl uses .yml files to define fleets of agents that can be invoked either on by schedule or by trigger. This is a thin wrapper around the Claude Agents SDK configurations, plus a couple of herdctl-specific ones like schedules and hooks.
An agent looks a bit like this:
And a fleet is as simple as this:
Spinning up a fleet looks like this:
You can run as many fleets as you like.
Watch the video above, but in a nutshell herdctl delivers 2 types of value:
Think of some of the use cases unlocked by a custom agent that knows how to wake up and do its job, day after day. A few off the top of my head from an engineering perspective:
But Claude Code Agents are pretty general-purpose. You could use them to do all sorts of things, like:
Ultimately, it's Claude Code that gets instantiated. You can make Claude Code do basically whatever you want. A staggering proportion of what human digital workers do today will be automated away like this. I am nervous at the implications for society and the economy, all the more pressingly due to the speed at which this will happen.
On the other hand, although I'd been thinking about something like herdctl for months, I ended up building this first version in about a week, so this is coming whether we like it or not. It's too easy to build this kind of thing so it's likely to be everywhere soon. There's no fighting it; our only option is to embrace and adapt.
Connecting a Claude Code agent running on your laptop to a public discord channel is a spectacularly bad idea. Don't do it on any computer you care about. Having AI Agents be able to join company chat channels and collaborate with human co-workers is an immensely powerful ability, but it also opens up new and exciting attack vectors.
Even within the context of a company private discord or slack instance, companies will have to be very careful about who has access to these agents and what the possibilities are for a bad actor to exploit an Agent into exfiltrating data, attacking systems, or uploading that video of you practicing your lightsaber skills to youtube.
Of course, you don't have to hook anything up to discord or anywhere else. There's enormous power just in the ability to have agents run on a schedule, especially if you prompt them to improve their own performance over time.
I've starting having 2 clones of each project I work on now - one that Claude and I collaborate on in the normal way, and a second that's set aside for the herdctl engineer agent. This prevents us from stepping on each others toes.
Of course, there's no reason why you couldn't spawn 5 engineer agents, or 50, each with their own clone of the codebase to work on. herdctl provides orchestration but it doesn't provide self-organization, so if you do want 50 engineer agents you may want to consider adding some Engineering Manager agents to coordinate them.
Agents that improve themselves over time are the thing I'm most excited about at the moment (what could possibly go wrong?) and there are probably many patterns for how to have them evolve their system prompt, memories, custom tools, Claude Code skills, etc. Patterns like after-action reports, plan-vs-execution analysis, prompt and context engineering will all converge here but in principle it should be commonplace soon to have agents that automatically get smarter over time.
There are probably a ton of bugs, lies in the docs, and other assorted problems with herdctl in this initial incarnation, so probably there will be a little consolidation and cleanup but after that if there's demand I'd expect to build out the Slack integration and then either a little web app to visualize the state of the fleet or revisiting the communication paths between the agents and the fleet.
In the meantime, it would be really valuable to have a technology that allows a fleet of 50 agents to communicate with each other optimally, with some kind of topology around who can talk to who. herdctl doesn't attempt to solve that coordination problem - it should be a separate part of the agentic stack - but I'd love for someone to go build it please.
Embrace the power of AI tooling, or embrace your own destruction!