bash-agent

Minimal coding agent runtime in pure Bash and awk, with C, Go and Rust ports

Image 1 of 1: bash-agent site with an install and stream-json example and its runtime numbers

An agent loop with tools for files, search, execution, skills and parallel sub-agents, written in Bash and awk with only curl and rg beside them. Sessions are resumable and forkable, every run writes events.jsonl, and C, Go and Rust ports keep the same semantics.

  • 99%+Cache hit, long sessions

Trade-offs

  • Bash and awk with zero runtime dependencies beyond curl and rg. It runs wherever Bash 5 does, and three native ports carry the same semantics for speed.
  • Compaction is decided by a cost model, not a token or turn threshold: cache savings on later calls against the cache lost and the summary request itself.
  • Summaries reuse the main agent's prefix so the compaction request itself hits the cache, which the design puts at about 90% of its input token cost saved.

Q&A4

When the expected saving beats the cost: cache-read savings over the remaining calls, minus the cache invalidated by the new summary and kept messages, minus the summary request. Remaining calls are estimated from the turns left in the task.

Reviews

Loading reviews

    More in AI agents

    See all 99 →
    • HashCortxLocal-first desktop workspace for chat, coding agents and agent teams
    • ZeroboxDeny-by-default process sandbox with per-host secret injection
    • DeftSelf-hosted workspace shared by people and AI agents
    • EntrolyLocal context layer that picks what coding agents send to the model
    • Active GraphEvent-sourced graph runtime for long-running, auditable agents
    • AgenvoySelf-hosted agent harness in one Go binary, running around the clock

    More in Shell

    See all 4 →
    • Proxmox ManagerTerminal manager for Proxmox VE guests, with health checks and alerts
    • MuxMasterProfile-driven video repacker that converts only what a target needs
    • bash_ctBash command-resolution tracer: why a name resolves and what finally runs
    • journalotJournaling from the terminal: Markdown files in the editor, committed to git

    More in CLI tools

    See all 74 →
    • blitcpFile copier that reads in disk order, dedupes and streams over raw SSH
    • jc-rsjc rewritten as one static binary that turns command output into JSON
    • pistachioDeclarative PostgreSQL schema management with a plan and apply workflow
    • quiverDump, load, copy and stream MySQL, MariaDB and TiDB from one consistent snapshot
    • haxMinimalist terminal coding agent written in C
    • roam-codeLocal code index and checks that coding agents can query