At this point why not make the agents use a restricted subset of python, typescript or lua or something.<p>Bash has been unchanged for decades but its not a very nice language.<p>I know pydantic has been experimenting with <a href="https://github.com/pydantic/monty" rel="nofollow">https://github.com/pydantic/monty</a> (restricted python) and I think Cloudflare and co were experimenting with giving typescript to agents.
This is a really interesting idea. I wonder if something like Luau would be a good solution here - it's a typed version of Lua meant for sandboxing (built for Roblox scripting) that has a lot of guardrails on it.<p><a href="https://luau.org/" rel="nofollow">https://luau.org/</a>
They use bash in ways a human never would, and it seems very intuitive for them.
Being unchanged for decades means that the training data should provide great results even for the smaller models.
Agents really do not care at all how "nice" a language is. You only need to be picky with language if a human is going to be working with the code. I get the impression that is not the use case here though
I've had LLMs write some pretty complex powershell on the fly. Still a shell language but a lot nicer.<p>Ideally something like nushell but they don't know that well
Bash is ubiquitous and is not going away any time soon. Nothing is stopping you from doing the same thing with your favorite language.
just-bash comes with Python installed, so in a way that's what this has done. I've used this for some prototypes with AI tools (via bash-tool), can't really productionise it in our current setup, but it worked very well and was undeniably pretty cool.
At least for me codex seems to write way more python than bash for general purpose stuff
I feel like Deno would be perfect for this because it already has a permissions model enforced by the runtime
On the "why bash not python/lua" question -- the answer isn't that bash is a better language. It's that bash is the only language you can assume is there.<p>When we run autonomous agents across different environments (Vercel functions, local dev, CI containers, remote VMs), Python availability is a negotiation. Bash is given. The agent doesn't need to worry about whether venv is activated, which Python version is installed, or whether a package needs to be pip-installed first.<p>There's also a subtler benefit: bash commands have predictable, well-documented side effects. When an agent runs `git commit -m "..."` it knows exactly what happened. When it runs a Python script that does the same thing via subprocess, there's now an abstraction layer to reason about.<p>The performance concern is real for I/O-heavy tasks. But for orchestration -- "list files, check git status, curl an API, write a line to a log" -- bash overhead is negligible and the interoperability wins dominate.<p>The place where this breaks down is anything requiring complex data transformation or error handling with multiple failure modes. That's where we drop into Python. The architecture that works for us: bash for the orchestration layer (run this, check that, pipe here), Python for anything with real logic.
Trying to secure the sandbox the harness is running in seems like the hard way to do things. It's not a bad idea, but I think it'd be easier to focus on isolating the sandbox and securing resources the harness sandbox accesses, since true security requires that anyhow.
We just released a driver that allows users of just-bash to attach a full Archil file system, synced to S3. This would let you run just-bash in an enrivonment where you don't have a full VM and get high-performance access to data that's in your S3 bucket already to do like greps or edits.<p>Check it out here: <a href="https://www.npmjs.com/package/@archildata/just-bash" rel="nofollow">https://www.npmjs.com/package/@archildata/just-bash</a>
The unix commandline tools being the most efficient way to use an LLM has been a surprise.<p>I wonder the reason.<p>Maybe 'do one thing well'? The piping? The fact that the tools have been around so long so there are so many examples in the training data? Simplicity? All of it?<p>The success of this project depends on the answer.<p>Even so, I suspect that something like this will be a far too leaky abstraction.<p>But Vercel must try because they see the writing on the wall.<p>No one needs expensive cloud platforms anymore.
The language choice is somewhat orthogonal to the real problem - you still need a governance layer regardless of whether agents execute bash, Python, or TypeScript.<p><pre><code> We built Execwall [1] to sit between the agent and the OS, enforcing argument-level policies. So you can allow git clone but deny git push, or allow chmod 644 but block chmod 777. Works with any shell or execution method.
The key insight is that "restricted subsets" of languages still need policy enforcement at runtime - an agent can construct dangerous commands dynamically even in a sandboxed language.
[1] https://github.com/sundarsub/execwall</code></pre>
Just curious: why wouldn't you attack this with a jail?
Interesting concept but I think the issue is to make the tools compatible with the official tools otherwise you will get odd behaviour. I think it is useful for very specific scenarios where you want to control the environment with a subset of tools only while benefiting from some form of scripts.
This ends up reading files into node.js and then running a command like grep but implemented in JS. I love the concept but isn’t this incredibly slow compared to native cli tools? Building everything in JS on top of just readFile and writeFile interfaces seems pretty limited in what you can do for performance.
last weekend I vibe-coded a project called `openfs` that plugs into just-bash<p><a href="https://github.com/jeffchuber/just-bash-openfs" rel="nofollow">https://github.com/jeffchuber/just-bash-openfs</a><p>it puts a bash interface in front of s3, filesystem (real and in-memory), postgres, and chroma.<p>still very much alpha - but curious what people think about it.<p>see an example app here: <a href="https://github.com/jeffchuber/openfs-incident-app" rel="nofollow">https://github.com/jeffchuber/openfs-incident-app</a>
I have been playing around with something like this.<p>I'm not going for compatibility, but something that is a bit hackable. Deliberately not having /lib /share and /etc to avoid confusion that it might be posix<p>On neocoties for proof of static hosting<p><a href="https://lerc.neocities.org" rel="nofollow">https://lerc.neocities.org</a>
<a href="https://github.com/vercel-labs/just-bash/blob/main/src/spec-tests/bash/KNOWN_LIMITATIONS.md" rel="nofollow">https://github.com/vercel-labs/just-bash/blob/main/src/spec-...</a><p>That's a lot of incompatibilities.<p>LLMs like to use the shell because it's stable and virtually unchanged for decades.<p>It doesn't need to worry much about versions or whether something is supported or not, it can just assume it is.<p>Re-implementing bash is a herculean effort. I wish good luck.
Incompatibilities don't matter much provided your error messages are actionable - an LLM can hit a problem, read the error message and try again. They'll also remember that solution for the rest of that session.
I don't think the current incompatibilities can be worked around.<p>Also, huge waste of tokens. And the waste is not even worth it, the sandbox seems insufficient.<p>Again, good luck to the developers. I just don't think it's ready.
No, they use it because there's a lot of training material.<p>pro-tip: vercel's <a href="https://agent-browser.dev/" rel="nofollow">https://agent-browser.dev/</a> is a great CLI for agent-based browser automation.
Why do you think there is a lot of training data? Could it be because it's stable and virtually unchanged for decades? Hmmm.
> No, they use it because there's a lot of training material.<p>Trained on an interpreter that is stable is virtually unchanged for decades. That's precisely my point.<p>It was never trained on an incompatible, partial implementation.<p>> agent-based browser automation<p>Clearly out of scope. You a bot?
[dead]
[dead]
Why couldn’t they name it `agent-bash` then? What’s with all the “just-this”, “super-that” naming?
Like developer lost the last remaining brain cells developing it, and when it’s came to name it, used the first meaningless word that came up.
After all you’re limiting discovery with name like that.