Settings

Theme

Herdr: Agent multiplexer that lives in your terminal

github.com

166 points by mzehrer · 114 comments

Reader

36 threads
isityettime

Once you get it set up, Emacs is a pretty damn good "agent" multiplexer as well. I use agent-shell with Projectile on Doom Emacs as my main workflow these days, and it works very well even if I have 6 projects open or whatever.

Claude and Codex are also both quite good at working with Emacs as well. Depending on your isolation/sandboxing strategy, they can either run commands against your session via emacsclient (a bit scary) or dump elisp in the REPL for you to evaluate. Both are really efficient in terms of giving you a fast feedback loop.

  • evanjrowley

    Please share any useful guides and/or resources for agentic development with Emacs!

  • fhars

    If you like scary, there are also emacs based agents like gptel which support tools like "eval-elisp".

    A kitchen sink is almost indistinguishable from a sandbox, right?

    ... right?

    • isityettime

      Hahahaha. I think for the limited purpose of iterating on elisp code, using gptel or efrit to let an agent run wild and iterate in a live environment could be useful. I'd want to run that in a VM though, and not as my user or with access to personal data beyond reusable parts of my config.

ricardobeat

The utility is not obvious, but I've been using herdr for a few weeks after a friend recommended it, and it's been a great tool.

I had about a dozen different terminal windows, each one with multiple tabs, which was becoming a mess to manage; multiple agents and harnesses running that I could only inspect by remote access/VNC away from home.

With this, I can keep things more organized (project workspaces, tabs), because it's backed by a persistent process, I can ssh into the machine, with tailscale, run herdr and see all active sessions, do some debugging and one-off prompts.

Even better, I can do that from my phone and iPad using Prompt/Termius. It gives me the best part of 'xxclaw' harnesses with none of the complexity.

  • giwook

    Couldn't you just use tmux for the remote access?

    • lucasban

      Short version, yes, but herdr is more mouse / touch friendly in my experience. I was using tmux for my mobile access before and after tweaking things it worked well, but herdr worked out of the box for me.

  • bangau1

    Does herdr with termius on android support touch/tap operation? I tried herdr on mac, it works really great. But i tried access it via termius from my android, I can't tap/interact with it. Am i missing something?

joch

I switched from tmux to Zellij a while back, and lately added a stop hook that sends a terminal ping to the correct tab when the agent is done (and I'm not looking at the tab). It has been pretty convenient so far.

Added an example here:

https://johnny.chadda.se/zellij-stop-hook/

mintflow

Will people really need a bunch of different agents? Even using two codex session for different project make me feel a bit overwhelmed, or may be i just old

  • WinstonSmith84

    Maybe not when answers will be almost instant, but the biggest gap to me now is latency, not capability. Having to wait for 5 minutes and more for an answer, I can switch to another project / feature / etc. and run work streams in parallel.

  • gb2d_hn

    Same. I haven't been able to see how people let agent loops run without significant steering and produce good quality software. VS Code with one or two integrated terminals running is fine for me. Or a couple of VS Code instances if I'm working one a couple of projects concurrently. The advantage of VS Code is the code / diff visibility if you like to be hands on.

  • fooster

    I often have many active. Bug investigations, writing code, reviewing, checking logs after deploys and so on.

  • zihotki

    I found that a good tool helps a lot once I switched to Github Copilot app. It solved the friction and mental tax for me. I easily manage 4 sessions in parallel on same or different projects while 2 was max in the past. The bottleneck now is only in review and decision making.

  • hombre_fatal

    If you have more than one issue to work on, then you can open an agent for each one and go though them round-robin.

    Maybe very early on a greenfield project you only have one known issue (the next feature you're building), but other than that seems like short-changing yourself.

  • lofaszvanitt

    Nope, they need to signal, that they know what they are doing and chic, and very trendy. And agent cnt must be > 12, open windows cnt > 6 otherwise feels himself as a peasant.

  • rw_panic0_0

    yeah I also don't really see a use case for me, like do ppl really run that many agents in parallel that they cannot comfortably multiplex them using just a terminal emulator

    • Escapade5160

      I'm a power user and it's not an issue for me. I just use Kitty with multiple windows and panes. I can jump between using hotkeys with no problem.

  • shepherdjerred

    I usually have 5-8 at a time

nullbio

Herdr is great, I've been using it for over a month now. Their API is awesome too - you can build tools around it.

  • skinfaxi

    Have you built anything around it? I was thinking it might be useful to potentially script based on space and tab name (like create dir named tab in space) and other little QOL workflow tweaks but haven't looked into it really.

zachncst

Getting a lot of flack in all these comments, I really like this tool. Have been super easy to use and scale to multiple agents. I've had a ton of issues with tmux and copy and paste, this just works. I was using warp terminal, and even working on my own fork of it with it's recent open source status, but this has won me over.

willdoenlen

I've been using this and it's been really nice for a specific use case: running agents locally alongside agents in a remote sandbox environment. Most apps managing this split seem to want to manage your sandbox for you, but we've already built out some nice tooling and infrastructure for that that meets our needs. I don't want to add a new vendor in the mix for our infra that may not exist in a year and that will be harder to integrate with. Combined with some additional tooling I made, herdr lets me easily connect to remote agent sessions, see their status in the sidebar and fluidly switch back to work on my local machine from one interface.

evanjrowley

Unlike Cmux, Herder will not call out to multiple web services upon start-up.

crashabr

How does it compare with https://github.com/agent-of-empires/agent-of-empires

mst98

nice, not dissimilar to what i built for https://github.com/storozhenko98/beehive

  • w4yai

    I'd suggest adding a few screenshots on the Github README, otherwise I wouldn't have enough attention to imagine how it looks. I had to go to the website to appreciate your work, otherwise I'm like "what is it?"

  • AgentMasterRace

    time to ask AI what the best features in yours and Ops are and then merge them into my also similar project .

kerlenton

Multiplexing the agents is clearly the first obvious pain point, but the other one I keep encountering after this is visibility: with multiple agents running, it becomes difficult to see what each of them is doing, what program did they call, and where they are getting stuck until they complete or fail.

Is there any information from Herdr about what each agent is up to beyond the output? Or does it just concentrate on orchestration for the time being?

  • mikeryan

    I’ve been using herdr for about a week. There is visibility into which terminals need attention and you can set up workspaces to organize it. I’ve enjoyed it so far though the key bindings are all over the place - likely due to it trying to avoid existing bindings.

cush

One interesting thing that I couldn't find in these comments or in their docs (even in the https://herdr.dev/docs/preview/concepts/#mouse-ui section), is that Herdr supports native-feeling scroll. You can scroll with your mouse wheel. That to me is a killer feature over tmux

  • NamlchakKhandro

    Introducing... Zellij.

  • Ycros

    I mean, assuming you're on tmux 3.6 or newer, try setting `set -g mouse on` in your tmux conf, then scrolling should just work. Should it be a default? Maybe. (edit: also lets you click on panes, adjust splits, etc.)

bazhand

Been using https://cmux.com for past few months, and runs nicely over ssh + tmux with native tabs.

timwis

I started using this today and am really enjoying the notifications when agents are awaiting input, and the status indicators!

But it feels odd to have it outside of tmux. I've got everything else in tmux, but I have to switch to another terminal tab to get to my agents, and then back to my normal shortcuts. I find that a bit jarring... Is that what other folks are doing?

JSR_FDED

How do people use terminal multiplexers together with vim?

Ctrl+B is so hardwired in my fingers for scrolling back one screen that there's no way I'm remapping that one in vim itself. So then you have to remap that in your terminal multiplexer, while at the same time there's a bunch of people saying never change the leader key...

Curious what vim users especially do about this?

  • azuanrb

    I'm using tmux + zoxide+ https://github.com/joshmedeski/sesh. Then on Ghostty, I have keybinds for my workflow. Cmd+k to open/switch workspace. Each workspace is just a new tmux session.

  • coldtea

    >Ctrl+B is so hardwired in my fingers for scrolling back one screen that there's no way I'm remapping that one in vim itself.

    Give it a month and whatever you remapped will be "hardwired" too.

    In any case, no reason to keep Ctrl-B in tmux either, you can remap that just as well.

  • pyr0hu

    As a vim user, I just remap C+B to C+A. It's much easier on the fingers too. Issue arises when I ssh somewhere that doesn't have the leader remapped but that's usually pretty rare when I have to vim in a tmux session on a remote host so not really an issue

  • mynegation

    I use tmux with vim and configure it to use Ctrl-a. Not for vim, but because I started with GNU screen that used this key. For the cases when I need actual Ctrl-a, tmux is configured to send it when I do “Ctrl-a a”.

  • NamlchakKhandro

    The secret is to abandon vimkeys and rebind everything to normal keys like ctrl + c instead of Y...

  • jasonpeacock

    Change the tmux leader to ctrl-space, problem fixed!

wb14123

I wrote a harness leveraging tmux and nvim: https://github.com/wb14123/tcode . It's able to open subagents and even talk with them, all managed by tmux and using nvim as the UI for both the editor and the messages display window.

nok22kon

does it support a setup where each agent can be in a different SSH session? or must they all run in the same place.

it seems to support running a remote herdr over SSH but unclear if it can add remote agents (each agent has its own sandbox where its installed and you first SSH into it and then start the agent there)

  • scirob

    Same question.

    I usually have one local clause orchestrating multiple remote Claude in different tmux . And then another orchester and remote vm worker sin tmux for another repo etc...

    It gets a bit hard to keep the overview but I don't want to give up my parallelism, your too might help

  • ricardobeat

    Each work pane gives you a new terminal session, you can ssh into a remote and it will be kept alive. Should work fine.

  • steinroe

    afaik, you should be able to use named session to achieve this: https://herdr.dev/docs/persistence-remote/

hagen8

This is way to complex... Why don't just use some harness which manages all that and give u a good UI?

  • dagss

    I have been actively searching for such a thing for months without finding it.

    Some are OS X only.

    Some will not work well with VMs/isolated agents.

    Currently using emdash, which is going in a great direction but somewhat new and buggy still.

    • justinwarner

      Nimbalyst does a pretty good job. Some gaps but I can manage multiple agents across multiple projects well enough.

    • dandaka

      What is your top chart? I am using GUI harnesses from model providers and not happy with any of them.

  • deathmonger5000

    You might like Circus Chief. It’s a web based UI focused on mobile - local first. Supports Claude Code, Codex, and Gemini. Supports auto retries when you run out of tokens, scheduled tasks etc. It’s been great for me as I juggle a Codex, Claude Code, and z.ai subscription.

    https://github.com/ferrislucas/Circus-Chief

    Full disclosure: it’s my project

  • bhu8

    May I plugin my own stuff? https://getviberia.com

  • ricardobeat

    for example…?

    I don’t believe any current harness offers this level of organization and running bare shell sessions inside.

jarredkenny

I started building my own version of this before I discovered herdr, and while its not quite the same it's improved my development workflow by an order of magnitude. https://jmux.build

I am going to give them a try side by side!

whinvik

I finally switched to Zed + Terminal Thread + Tmux.

The terminal agent threads allow me to run in multiple projects. They always run in a project scoped tmux session so they are always on.

And of course Zed does remote via ssh so the agents can run without me needing to keep my laptop on.

swah

Ideal would be that I have this graphical environment (cmux like) that is actually herdr behind the scenes, so that if I access remotely it "degrades" from GUI with proper tabs and projects to this Herdr TUI..

iamfreee

if you prefer to self host but with a gui there is https://github.com/kdlbs/kandev

AgentMasterRace

Damm, looks a lot like my almost abandoned "foreman", except the mine has a background "foreman" that watches for issues and corrects them.

snapplebobapple

has anybody figured out how to get this to open a fixed layout? I'm using tmuxp to do this easily with tmux but would switch to this pretty quickly if it was easy to get my layout over. It's really nice. It's like zellij without the bloat (but with different ai bloat that doesn't seem to drag down performance at all and isn't in your face unless you want it in your face)

FergusArgyll

How do you use multiple agents in one project? Isn't there race conditions? or is this for 2 separate projects at once?

progx

I need a shepherd for my terminals.

chaoxu

On the webpage's demo, it has a really slick looking UI. How do we have that?

canadiantim

I'm interested but it doesn't look like it'd be very mobile-friendly.

elij

this works so seamlessesly inside emacs out the box without a dedicated app

https://github.com/elij/macher-agent

cybice

Nothing beats tmux + iterm 2 integration. Its really my terminal.

  • timwis

    Can you say more about what it gives you over tmux alone? I've assumed it's just native tmux tabs

scubbo

Tried this for a couple days, but conductor.build is way better IME. Running _in_ the terminal is a flex, but doesn't actually bring any advantage.

Andreas-Y

nice tool

andrijaskontra

Just use tmux no?

  • boxed

    How would you know if a tab that isn't frontmost is waiting for input or complete or whatever?

    • frumiousirc

      It's not so straight-forward. Either you must add hooks the the agent to notify tmux directly or you must use an external tool that polls tmux to determine one of its panes has gone silent and then based on that, send notification to tmux.

      The poling requires tmux (not screen nor dtach, as far as I could find). And, silence for N seconds is just that, the poll doesn't know if that really means waiting for input or something else. With agents (like claude) that have a throbber/spinner going while "thinking", silence is a good indicator.

      Kitty terminal can be polled for current text and then see if that has changed in N seconds. This would allow not having to depend on tmux which may be preferable to some kitty users. Generally, using tmux always surfaces some annoying problems for me.

    • rocqua

      Someone else suggested the bell character. But you can also just set tmux pane names or color. Which you can also do from your agent harnass.

    • anarticle

      I added sounds: https://github.com/gpurkins/waiting-for-claudot which has become a bit pavlovian. This along with notifications in iTerm is good enough to juggle some claude sessions.

    • baalimago

      You use an agentic harness which terminates with bell character[0]. This lights up tmux, clearly indicating that it's done.

      [0]: https://en.wikipedia.org/wiki/Bell_character

      • timwis

        Does this mean adding instructions to AGENTS.md saying to end everything with the bell character? Or do harnesses have this in their settings somewhere?

        • zavec

          I think generally harnesses have this. In claude code it's `"preferredNotifChannel": "terminal_bell"` in the settings.json, pi and opencode looks like you have to either add a hook yourself somewhere or use an extension.

        • baalimago

          Depends on the harness I imagine. If there's some sort of "post run" hook I'm sure it can be added there. Or, if the harness is open source, a PR to add it would work too.

    • enoch2090

      You can achieve this with features that Tmux already have. Glued a tool that works:

      https://gist.github.com/Enoch2090/5026c417f86ff6ff4fbe30c22b...

  • ZeelRajodiya

    How about running this inside tmux?

  • nullbio

    This works much better than tmux.

KuhlMensch

Nice, another ghostty spawn. One of these days I'll install one :3

sharts

Looks almost like conductor.build, but not quite the same.

felooboolooomba

At least one of us needs to up our dosage.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection