mini-agent
Minimal implementation of a coding assistant, capable of reading, writing, and editing files, as well as running shell commands.
Requirements
- Python 3.x
- An API key for one of the supported providers:
- Google Gemini
- Anthropic
- OpenRouter
Installation
-
Clone the repository:
git clone https://github.com/hissain/mini-agent.git cd mini-agent -
Install dependencies (standard library only, no external pip packages required).
Configuration
Set the environment variable for your chosen provider:
-
For Google Gemini:
export GEMINI_API_KEY="your-key-here"
-
For Anthropic:
export ANTHROPIC_API_KEY="your-key-here"
-
For OpenRouter:
export OPENROUTER_API_KEY="your-key-here"
Optionally, you can specify the model:
export MODEL="gemini-2.0-flash"Usage
Run the agent:
python agent.pyCommands
/qorexit: Quit the application./c: Clear the conversation history./i: Show system information.
Inspired by nanocode