herder: Is This the Ultimate Agent Multiplexer?

BBetter Stack
컴퓨터/소프트웨어AI/미래기술

Transcript

00:00:00herder an agent multiplexer that runs inside the terminal you already use so you can run a bunch of
00:00:05coding agents side by side in different panes or tabs and actually see which one is working which
00:00:10one is blocked or which one is done complete with system notifications in a single rust binary which
00:00:15means no electron or no separate app it even has a clever way of working over ssh but with a tool
00:00:20like cmux growing in popularity why would you bother using herder hit subscribe and let's find out
00:00:28herder was built by a developer called ogle can celix who i'm assuming dropped the e from the word
00:00:34herder because he's a fan of the early 2000s i don't know but i'm assuming herder is a tool that
00:00:39you can use to herd multiple agents like a sheep herder which is a problem for well let's say most
00:00:45developers out there who are using ai to do development because it's difficult to keep
00:00:49track of what each harness is up to her to take lots of inspiration from tmux which is a terminal
00:00:54multiplexer with tabs split panes and persist sessions even after you disconnect but tmux was
00:01:00built decades ago long before ai agents existed so if you do end up running a harness inside one of
00:01:06its panes it has no idea it exists or what its status is this is why tools like warp or cmux exist
00:01:12which pull you out of your own terminal and into their own so you have to learn someone else's workflow
00:01:18which is why ogle can celix built herder to do both at once the persistence of tmux with agent awareness
00:01:24baked in and because herder is just one rust binary built with ratatouille the whole thing is just
00:01:29rendering text to your terminal so it can run anywhere that your terminal can including over ssh there's
00:01:35also a socket api which means agents can drive herder themselves which is really impressive to see
00:01:40in fact let's go through a quick demo so after installing herder using brew or curl or even a
00:01:46nix flake i'm so glad they added this option you can just run the herder command which will give you
00:01:50this view showing the terminal some workspaces and some agents now i have zoomed in a tiny bit so there
00:01:56are a few things you won't be able to see like the full extent of the commands but i'll try and do my
00:02:00best to show herder off so here you can see there aren't any workspaces and by default the prefix
00:02:05is ctrl b which is similar to tmux but i'll show you how to change that later on now the prefix has
00:02:10already been activated which i can see by this navigate down here so all i have to do is press
00:02:14shift and n to create a new workspace now of course you can navigate entirely using your keyboard
00:02:19so i can press the prefix and the question mark to see all the keyboard shortcuts but you can also
00:02:23use your mouse so i can create a new tab called two i can right click to close the tab rename my
00:02:28workspace to test create a new workspace access these settings in the menu and so on i can even
00:02:34create horizontal and vertical splits as well as renaming the specific pane and navigate between
00:02:38pains all using the mouse but the true selling point of herder is how it interacts with agents
00:02:43so at the moment this is using bash but i like to use fish so i'll change both of these terminals
00:02:46and then i'm going to open cord code on the top one and codex on the bottom but already we can see
00:02:51herder has automatically picked up on the agents and has given them statuses so claude is blocked
00:02:55and codex is idle let's address them both by giving them access to these directories and of course i can
00:03:00give them both prompts like what model am i using and we can see that herder immediately updates to
00:03:05tell us that claude is working which also works with codex cli now i've also noticed i'm in the wrong
00:03:09workspace so let's delete this one and rename this one to test but with herder the agents can also
00:03:15create workspaces tabs and splits as well let's see how that works so i'm going to quit from curda
00:03:20by pressing prefix and then q and then you can see here all the options that the herder cli gives us
00:03:24so what i'm going to do is go back into herder and this is one selling point is that it goes back to
00:03:29the exact workspace and the exact agents i had open with the same sessions but i'm going to create
00:03:34a new workspace i'm going to go into a directory and then i'm going to open up cord code and now
00:03:38i'm going to give a prompt to use herder cli to spawn up two panes with claude code in them both
00:03:44run one with this prompt to summarize the largest file in the project and another one with this prompt
00:03:49to search the code base for any hard-coded api key or secrets and here it's loaded up a new pane with
00:03:54called code i'm actually going to zoom out so we can see this a bit better and now it's running the
00:03:58other prompt in the code base so we can scroll up to see that this one has finished we can also see
00:04:03it's giving them appropriate titles so claude secrets and discord and here it's found no hard-coded api
00:04:09keys yes from here we can summarize the output of both panes and then get claude to close them so now
00:04:14it's got the information from the first pane and closed it and it's doing the same to the second pane
00:04:18which it's closed as well and down here it's giving me a nice summary now because herder is
00:04:23just a binary that you can install into your terminal i can ssh into a linux server and install herder
00:04:28the same way i installed it on a mac you can see i've done this earlier and it's restored my previous
00:04:32session so i've got open code open in one pane and i'm using vim to go through some code in another
00:04:36pane but the problem with this is that it doesn't carry over my herder configuration settings i have on
00:04:41my local mac machine to be honest i don't have many settings all i've done is change the keys from
00:04:45control b to control space and i've changed the theme to terminal but if i had a highly edited
00:04:50configuration file with specific keyboard shortcuts this could get quite annoying so one way to get
00:04:55around this is to use herder with the remote flag and ssh directly into your server which i'll explain
00:05:01exactly what it does before i hit enter so herder works by running a server and a thin client that
00:05:06communicates using a unix socket so the client sends keystrokes to the server and the server manages
00:05:11tabs pains persistence and other things now in the case of the ssh so using remote the server runs on
00:05:18the remote machine and the client actually runs on your local machine so it sends keystrokes via unix
00:05:24socket to the server and the server can show the clients the files that are on the machine itself
00:05:30but the client itself can use all the configuration settings that are on the local machine that it's
00:05:35attached to so let's take a look at that in action so back to where we left off now if i hit enter
00:05:40it's going to connect directly to my ssh machine which we can see has open code and the code file
00:05:45that we're viewing with vim but if i press control b it doesn't seem to do anything because it's using
00:05:49the configuration on my mac which works with control space to see the prefix now while we're here let's
00:05:54have a look at what else we can do in the menu so we can view keybinds which i showed you earlier but
00:05:59we can also change the theme and header gives you many themes to choose from from nord to govbox and even
00:06:04cap routine and it's also an option to trigger sound alerts and a toast menu which you can change
00:06:10via the terminal or via the system now as usual there are so many other features of herder that
00:06:15i didn't get around to going through like work tree integrations official harness integrations some of
00:06:19which you saw in the demo that give your harness access to herder official skills and lets you resume
00:06:24the exact sessions you had before you closed herder honestly the fact that this works in your existing
00:06:29terminal to me is the main selling point because as much as i love using cmux i love using western a lot
00:06:35more i've configured it to the exact way i like to use it and the fact that if i want to manage my
00:06:39agents all i have to do is spin up a new terminal tab inside westerm and just run herder yes you do
00:06:45miss the web browser from cmux but to be honest i didn't really use it much anyway and for those of
00:06:50you watching right now who use windows i have some really bad news for you because of the whole unix
00:06:54socket thing and the fact that herder uses a terminal pty there isn't currently great windows support at
00:06:59the time of recording but if you are using windows i think it's time to bite the bullet and just
00:07:04use dual boot linux yes wsl does exist but it's not exactly the same right

Key Takeaway

Herder integrates terminal multiplexing with AI agent management, allowing users to run and automate multiple coding agents within their existing terminal workflow.

Highlights

  • Herder is a terminal-based agent multiplexer built in Rust that enables side-by-side management of multiple AI coding agents.

  • The tool supports persistent sessions, split panes, and tabs, allowing users to track the status of multiple agents simultaneously.

  • A socket API allows AI agents to directly control Herder, enabling them to spawn new panes, workspaces, and tabs autonomously.

  • The client-server architecture supports remote operations via SSH, allowing local configurations to persist while managing agents on a remote machine.

  • Herder currently lacks native support for Windows due to its reliance on Unix sockets and terminal PTYs.

Timeline

Terminal-based agent management

  • Herder provides a single Rust binary to manage multiple AI agents within existing terminal environments.
  • The tool eliminates the need for separate apps or electron-based wrappers.
  • It features built-in agent awareness, enabling users to monitor which agents are active, idle, or blocked.

Standard terminal multiplexers like tmux lack context regarding AI agents running inside their panes. Herder provides the persistence of tmux while adding agent-specific status updates and a socket API, which allows agents to control their own environment.

Workflow and automation capabilities

  • Users can navigate workspaces, tabs, and split panes using keyboard shortcuts or the mouse.
  • Agents can be programmed to spawn their own workspaces and panes to perform complex tasks.
  • Status tracking updates automatically when agents are given tasks, such as searching for secrets or summarizing files.

The interface allows for fine-grained control over agent environments. By utilizing the socket API, an agent can be instructed to open specific codebases, run searches, and summarize outputs across multiple panes before closing them upon completion.

Remote operations and configuration

  • Running Herder with the remote flag allows for SSH-based session management.
  • Local configuration settings persist even when connecting to remote machines via the client-server architecture.
  • The tool offers multiple visual themes and customizable keybindings.

The client-server model keeps the server running on the remote host while the client resides on the local machine, facilitating the use of local keybindings and theme preferences over SSH. Currently, Windows support is unavailable, making Linux or macOS the primary environments for usage.

Community Posts

No posts yet. Be the first to write about this video!

Write about this video