Building a Bash-Based LLM Agent REPL with Minimal Dependencies
A developer created a custom agent REPL loop using exclusively standard command-line building blocks to minimize dependencies. The system relies on pipes, text streams, and append-only logs, aligning closely with classic Unix philosophy. This approach allows for flexible injection of tools to inspect, filter, redirect, and audit various stages of the agent loop. Key features include a plug-and-play backend scoped to a single command-line tool, ensuring portability across different model providers. Agent memory and context are stored in an append-only history file, enabling easy introspection, modification, and rewinding. While tested with an Ollama backend, the design supports any OpenAI-API compatible REST interface. The source code for this project is available on GitHub under the repository name llayer.