Run AI agents locally.
Fully transparent.
KLAW runs AI agents directly in your shell. It plans, writes files, executes commands, and repairs errors, keeping everything fully visible step-by-step with complete permission control.
Quick Installation
Install globally via npm or clone directly from GitHub. Available for Windows PowerShell, Linux / WSL, and macOS.
Support for Any Provider
Switch models dynamically using CLI flags or configure your provider in ~/.klaw/config.json.
OpenAI & GPT-4o
Fast, precise generation with gpt-4o-mini or gpt-4o defaults.
Google Gemini
Native integration with gemini-2.0-flash for rapid planning and coding tasks.
Anthropic Claude
Powered by claude-3-5-sonnet for complex architectural reasoning.
OpenRouter
Access hundreds of models using a single unified OpenRouter API key.
Ollama (Local AI)
Run 100% offline with local models like llama3.2 without sharing data.
Langdock
Enterprise multi-llm routing and custom endpoints compatibility.
Model Context Protocol
Connect Klaw directly to Claude Desktop, Cursor, or any other MCP host to run Klaw agents as a tool.
{
"mcpServers": {
"klaw": {
"command": "npx",
"args": ["-y", "@phartmann80/klaw", "mcp"]
}
}
}
Built for Developer Control
KLAW operates through four specialized, coordinated agents that run strictly within your workspace.
Architect Agent
Generates structured JSON execution plans before any file edits take place, validating steps and retry logic automatically.
Writer Agent
Creates and modifies project files safely, enforcing workspace boundary security to prevent modifications outside your target folder.
Shell Agent
Runs terminal commands with strict user prompt checks, non-interactive CI flags (--ci), and real-time execution logging.
Fixer Agent
Captures command failures (such as missing npm packages or syntax errors), inspects context, applies precise patches, and retries automatically.
- CLI
--modeland--provideroverride flags - Non-interactive auto-approval mode with
--yesand--ci - Model Context Protocol (MCP) server support built in
- Zero telemetry; everything runs locally in your terminal
- Automated recovery loop for broken builds