Show HN: Axe – A 12MB binary that replaces your AI framework
TL;DR Highlight
Define single-purpose LLM agents with TOML config files and wire them together with Unix pipes and git hooks — minimal infrastructure, maximum composability.
Who Should Read
Developers who like Unix philosophy and want to build lightweight LLM agent workflows without heavy frameworks like LangChain or CrewAI.
Core Mechanics
- The pattern: each agent is defined by a TOML file specifying its model, system prompt, input/output format, and available tools.
- Agents communicate via stdin/stdout — making them composable with Unix pipes: `cat issue.txt | agent-analyzer | agent-coder | agent-reviewer`.
- Git hooks (pre-commit, post-commit, etc.) serve as natural trigger points for agent invocation — running linting agents, PR summarizers, or commit message generators automatically.
- This approach intentionally avoids heavyweight orchestration frameworks — the philosophy is that Unix pipes are a better abstraction than framework-specific agent graphs.
- The TOML config makes agents version-controllable, reviewable, and shareable — treating agent definitions as code rather than ephemeral prompts.
Evidence
- The author shared several working TOML agent definitions and example pipe chains for common development workflows.
- HN commenters who valued Unix philosophy were enthusiastic — several shared similar setups they'd built independently.
- Some critiques: complex multi-agent workflows (loops, conditional branching) are awkward in pure pipe-and-filter architectures; you eventually want a proper orchestrator.
- Others noted that TOML + pipes works great for linear pipelines but breaks down for agent workflows that need shared state or complex coordination.
How to Apply
- Start with simple single-purpose agents for tasks you do repeatedly: commit message generation, PR description drafting, issue summarization.
- Define agents in TOML/YAML files checked into your repo — this makes them reviewable, reproducible, and team-shareable.
- Wire agents into git hooks for zero-friction automation: a pre-commit hook that runs a linting agent, a post-merge hook that summarizes what changed.
- Use Unix pipe composition for linear workflows, but switch to a proper orchestration framework if you need loops, conditional logic, or shared state between agents.
Code Example
snippet
# TOML Agent configuration example (e.g., commit-writer.toml)
[agent]
name = "commit-writer"
model = "claude-3-5-haiku-20241022"
system = "Given a git diff on stdin, output a single conventional commit message. One line only."
skills = ["core/unix-output.md", "core/be-concise.md", "domain/git.md"]
# CLI usage example
$ git diff --staged | axe run commit-writer
$ git diff --staged | axe run commit-writer | git commit -F -
# bash Agent script approach shared in community comments (direct implementation without Axe)
#!/usr/bin/env bash
# ai-commit-msg: stdin=git diff, stdout=conventional commit message
set -euo pipefail
source "${AGENTS_DIR:-$HOME/.agents}/lib/agent-lib.sh"
SYSTEM=$(load_skills \
core/unix-output.md \
core/be-concise.md \
domain/git.md \
output/plain-text.md)
SYSTEM+='\n\nTask: Given a git diff on stdin, output a single conventional commit message. One line only.'
run_agent "$SYSTEM"Terminology
TOMLTom's Obvious Minimal Language — a configuration file format designed for readability, used here to define agent configurations.
Unix pipesThe mechanism for chaining programs by connecting stdout of one to stdin of the next — a composable, language-agnostic way to build data processing pipelines.
Git hooksScripts that run automatically at specific points in the git workflow (pre-commit, post-merge, etc.) — used here as agent trigger points.