It turns out Bash is All You Need to write a language model REPL (and jq and curl)
Mirrored from r/LocalLLaMA for archival readability. Support the source by reading on the original site.
While working on an self-educational exercise tinkering with local models and trying my hand at setting up agents, I went down a rabbit hole: to see how far I could build a custom agent REPL loop using exclusively command-line building blocks and stripping out dependencies wherever possible.
It turns out you can get pretty far with pipes, text streams, append only logs, and standard command-line components - concepts pretty well aligned with classic Unix philosophy. The agent is a wrapper composed of a handful of smaller programs, which should allow for flexibly injecting various tool to inspect, filter, redirect, and audit different stages of the agent loop.
Some features that may be of interest:
- Minimal dependencies: no Python, NodeJS, etc., and the core command-line components should be widely available on most modern Unix-adjacent environments
- Plug-and-play backend: the agent-model boundary is scoped to a single command-line tool, which should allow for portability across different model providers
- Simple, transparent state: agent memory/context is stored in an append-only history file, which allows for easy introspection, modification, rewinding, and more.
I put the code up here if anyone wants to poke around: https://github.com/cloudkj/llayer
Hope you find it interesting. Curious to hear what you think!
[link] [comments]
More from r/LocalLLaMA
-
Been running Qwen3.6-27B through a 3-critic harness. The harness matters more than I thought
Jun 30
-
I Hate Dario Amodei, and everything he stands for.
Jun 29
-
Introducing LongCat-2.0 - , a large-scale MoE language model with 1.6 trillion total parameters and ~48 billion activated per token. This was the stealth model that was on Openrouter under the name 'owl-alpha'.
Jun 29
-
Krea-2-Turbo Image Model - Easy to be fully uncensored, but it can also EDIT Images!
Jun 29
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.