The 12MB Binary That Replaces Your AI Framework: Meet Axe and the Anti-Bloat Movement
Why This Matters
If you've worked with AI tools lately, you know the pain. Massive npm packages, Python environments bloated with dependencies, Docker images measured in gigabytes. Want to run a simple code review agent? Better allocate 4GB of RAM and wait five minutes for everything to initialize.
The industry has been building AI tools like they're building enterprise software from 2010. But there's a counter-movement gaining momentum: developers who believe AI tooling should be small, focused, and composable. Unix philosophy applied to LLM agents.
Enter Axe — a 12MB binary that does what frameworks ten times its size can't: run focused AI agents that integrate seamlessly with your existing workflow.
The Bloat Problem
Modern AI frameworks have become the new jQuery of our time. They do everything, include everything, and break when you look at them wrong. Consider what it takes to run a simple code review agent with popular frameworks:
- Python virtual environment with 50+ dependencies
- Docker containers for isolation
- Web servers running constantly
- Browser-based interfaces you never asked for
- Plugins, extensions, and integrations you'll never use
Meanwhile, what do you actually need? A way to send a prompt to an LLM and get a response. Maybe some file access. Maybe the ability to run a shell command.
This isn't just about disk space. It's about:
- Startup time: Seconds vs milliseconds
- Composability: Can you pipe data through it?
- Reliability: Fewer moving parts means fewer failures
- Security: Smaller attack surface, easier auditing
What Axe Does Differently
Axe treats LLM agents the same way Unix treats programs. Each agent does one thing well. You define it in a TOML file, give it a focused skill, and run it from the command line.
# Install
go install github.com/jrswab/axe@latest
# Initialize config
axe config init
# Create an agent
axe agents init code-reviewer
# Run it
git diff | axe run code-reviewer
That's it. No daemon running in the background. No web interface to configure. Just a binary and your configs.
Key Features
Multi-Provider Support: Works with Anthropic, OpenAI, and Ollama (local models). Switch providers by changing one line in your TOML.
TOML-Based Configuration: Agent definitions are declarative and version-controllable. Put them in your repo alongside your code.
Sub-Agent Delegation: Agents can call other agents via LLM tool use. Chain them together for complex workflows.
Persistent Memory: Timestamped markdown logs carry context across runs. Your agents remember previous interactions.
Stdin Piping: This is where it shines. Pipe git diffs, log files, JSON output — anything — directly into an agent.
Built-In Tools: File operations, shell commands, all sandboxed to the agent's working directory.
Tutorial: Building a PR Review Agent
Let's create a practical agent that reviews pull requests. This is the classic "show me the code" moment.
Step 1: Initialize Your Agent
axe agents init pr-reviewer
This creates $XDG_CONFIG_HOME/axe/agents/pr-reviewer.toml with a template.
Step 2: Configure the Agent
Edit the TOML file:
name = "pr-reviewer"
description = "Reviews pull requests for issues and improvements"
model = "anthropic/claude-sonnet-4-20250514"
system_prompt = "You are a senior code reviewer. Focus on: correctness, performance, security, and maintainability. Be concise and actionable."
skill = "skills/code-review/SKILL.md"
workdir = "/home/user/projects/myapp"
tools = ["read_file", "list_directory"]
[memory]
enabled = true
last_n = 5
max_entries = 50
[params]
temperature = 0.2
max_tokens = 2048
Step 3: Define the Skill
Create skills/code-review/SKILL.md:
# Code Review Skill
You are reviewing code changes. Analyze for:
1. **Correctness**: Does the code do what it claims?
2. **Security**: Any vulnerabilities introduced?
3. **Performance**: Obvious inefficiencies?
4. **Maintainability**: Code smells, naming, structure?
Output format:
- **Critical**: Must fix before merge
- **Suggested**: Should consider
- **Nit**: Minor improvements
Be specific. Reference line numbers. Suggest actual code changes when helpful.
Step 4: Use It
# Review staged changes
git diff --cached | axe run pr-reviewer
# Review a specific commit
git show abc123 | axe run pr-reviewer
# Review changes to specific files
git diff main -- src/ | axe run pr-reviewer
Step 5: Integrate with Git Hooks
Create .git/hooks/pre-commit:
#!/bin/bash
# AI-powered code review on commit
git diff --cached | axe run pr-reviewer
if [ $? -ne 0 ]; then
echo "Code review found issues. Review above."
exit 1
fi
Now every commit gets an automated review. No CI configuration, no webhook setup, no dashboard to check.
Real-World Scenarios
Scenario 1: Log Analysis on Your Server
Your production logs are throwing errors. SSH into the server and analyze them in real-time:
# Tail logs and analyze errors
tail -f /var/log/app/error.log | axe run log-analyzer
# One-shot analysis
cat /var/log/app/error.log | axe run log-analyzer
The agent can identify patterns, suggest root causes, and even draft incident reports.
Scenario 2: Documentation Generator
Define an agent that reads your code and generates documentation:
name = "doc-gen"
model = "anthropic/claude-sonnet-4-20250514"
system_prompt = "Generate clear, concise documentation for the provided code."
files = ["src/**/*.go"]
tools = ["read_file", "list_directory"]
Run it:
axe run doc-gen -- --package auth
Scenario 3: Cron-Based Monitoring
Schedule regular code quality checks:
# Add to crontab
0 9 * * * cd /home/user/projects/myapp && git diff main~1 | axe run pr-reviewer | mail -s "Daily Code Review" team@company.com
Scenario 4: CI/CD Integration
Add to your GitHub Actions workflow:
- name: AI Code Review
run: |
go install github.com/jrswab/axe@latest
git diff origin/main | axe run pr-reviewer > review.md
# Post review.md as a PR comment
Scenario 5: Docker Isolation
For sensitive environments, run agents in isolated containers:
# Build once
docker build -t axe .
# Run with minimal permissions
docker run --rm -i \
-v ./agents:/home/axe/.config/axe/agents:ro \
-v ./skills:/home/axe/.config/axe/skills:ro \
-e ANTHROPIC_API_KEY \
axe run pr-reviewer < git.diff
The container runs as a non-root user with a read-only root filesystem and no capabilities.
FAQ
Q: How is this different from just calling the API directly?
A: You could. But Axe provides:
- Configuration management (TOML files, not shell scripts)
- Memory persistence across runs
- Sub-agent delegation with depth limiting
- Built-in tools with sandboxing
- MCP server integration for external tools
It's the difference between "curl" and "a properly structured workflow."
Q: What about complex multi-step workflows?
A: Use sub-agents. An agent can delegate to other agents:
name = "full-review"
sub_agents = ["pr-reviewer", "test-runner", "lint-checker"]
[sub_agents_config]
max_depth = 3
parallel = true
timeout = 120
The parent agent orchestrates; sub-agents execute.
Q: Can I use local models?
A: Yes, via Ollama:
# Start Ollama
ollama serve
# Configure agent
model = "ollama/llama3"
No API keys needed. Everything runs locally.
Q: What's the security model?
A: Built-in tools are sandboxed to the agent's working directory. No escaping via .. or symlinks. Shell commands run in isolation. Docker support includes:
- Non-root user (UID 10001)
- Read-only root filesystem
- All capabilities dropped
- No privilege escalation
Q: How much does it cost to run?
A: The binary is free (Apache-2.0). API costs depend on your provider:
- Anthropic: Per-token pricing
- OpenAI: Per-token pricing
- Ollama: Free (you provide compute)
Q: Can agents access the internet?
A: Built-in tools don't include HTTP requests. But you can:
- Use
run_commandto call curl/wget - Connect an MCP server with web tools
- Pipe data from external sources before running
Q: What if the LLM hallucinates?
A: Axe doesn't solve LLM limitations. But it helps:
- Lower temperature for more deterministic output
- Focused skills reduce scope for hallucination
- Memory shows previous corrections
- Dry-run mode lets you inspect context before calling the LLM
Troubleshooting
"No agent found"
Check your config path:
axe config path # Should show $XDG_CONFIG_HOME/axe/
ls $(axe config path)/agents/ # Should list your agents
"API key not found"
Export the environment variable:
export ANTHROPIC_API_KEY="your-key"
# or
export OPENAI_API_KEY="your-key"
"Tool access denied"
File operations are sandboxed. Ensure your workdir covers the files you want to access. Absolute paths and .. traversal are rejected.
"Sub-agent depth exceeded"
The default max depth is 5. Increase in your TOML:
[sub_agents_config]
max_depth = 5 # Hard maximum
"Ollama connection refused"
Ensure Ollama is running and accessible:
ollama serve # Start server
curl http://localhost:11434 # Test connection
For Docker, use:
docker run --add-host=host.docker.internal:host-gateway \
-e AXE_OLLAMA_BASE_URL=http://host.docker.internal:11434 \
...
"Memory files getting large"
Run garbage collection:
axe gc my-agent # Single agent
axe gc --all # All agents
The Bigger Picture
Axe isn't just another CLI tool. It's a statement about how AI tooling should be built.
The Unix philosophy gave us decades of composable, reliable software. Each tool did one thing well. Pipes connected them. The command line was the integration point.
AI tooling forgot this lesson. We built monolithic platforms. Dashboards. Electron apps. Everything-as-a-service.
But developers are pushing back. They want tools that:
- Start instantly
- Integrate with existing workflows
- Run without constant internet
- Respect system resources
- Don't require a 500MB download
Axe represents this shift: AI as a Unix tool, not a platform.
It's not the only one. The anti-bloat movement includes:
- Minimal local LLMs (llama.cpp, mistral.rs)
- Single-purpose agents
- Shell-first interfaces
- Version-controlled configs
If you're frustrated with bloated AI tools, you're not alone. The counter-movement is here. And it starts with a 12MB binary.
Getting Started
- Install Go 1.24+
- Run:
go install github.com/jrswab/axe@latest - Initialize:
axe config init - Copy an example agent from the
examples/directory - Set your API key:
export ANTHROPIC_API_KEY=... - Run:
git diff | axe run code-reviewer
Your first focused AI agent, running in seconds. No Docker. No daemon. Just results.
The anti-bloat movement is growing. Join it.
Top comments (0)