What is agent-code?
agent-code is an open-source, AI-powered coding agent for the terminal. You describe what you want in natural language, and the agent reads your codebase, runs commands, edits files, and iterates until the task is done.
It's built in pure Rust for speed, safety, and a single static binary with zero runtime dependencies.
What can it do?
How it works
The core loop is simple:
- You type a request
- The agent sends your request + conversation history to an LLM
- The LLM responds with text and tool calls
- The agent executes the tools (file reads, edits, shell commands, etc.)
- Tool results are fed back to the LLM
- Repeat until the task is done
Every tool call passes through a permission system before executing. You stay in control.
You: "add input validation to the signup endpoint"
Agent:
→ FileRead src/routes/signup.rs
→ Grep "validate" src/
→ FileEdit src/routes/signup.rs (add validation logic)
→ Bash "cargo test"
→ FileEdit src/routes/signup.rs (fix test failure)
→ Bash "cargo test"
✓ All tests pass. Validation added.
Key features
- 32 built-in tools for file operations, shell commands, code search, web access, language servers, and more
- 42 slash commands for git, session management, diagnostics, sharing, and agent control
- 12 bundled skills including security review, architecture advisor, bug hunter, and implementation planner
- 12 LLM providers — Anthropic, OpenAI, xAI, Google, DeepSeek, Groq, Mistral, Together, Zhipu, Ollama, AWS Bedrock, Google Vertex
- Permission system with configurable rules per tool, pattern matching, and protected directories
- MCP support for connecting external tool servers
- Memory system for persistent context across sessions
- Plugin system for bundling skills, hooks, and configuration
- Session persistence with save, resume, share, fork, and rewind
- Plan mode for safe read-only exploration
- Extended thinking for complex reasoning tasks
- Cross-platform — Linux, macOS, and Windows
Architecture
┌─────────────┐
│ CLI / REPL │
└──────┬───────┘
│
┌────────────────▼────────────────┐
│ Query Engine │
│ stream → tools → loop → compact │
└──┬──────────┬──────────┬────────┘
│ │ │
┌────────▼──┐ ┌────▼─────┐ ┌──▼───────┐
│ Tools │ │ Perms │ │ Hooks │
│ 31 built │ │ allow │ │ pre/post │
│ + MCP │ │ deny/ask │ │ shell │
└───────────┘ └──────────┘ └──────────┘