A simple code editing assistant powered by Pydantic AI, supporting multiple LLM providers and delegation to sub-agents. This agent provides tools for reading, listing, editing, searching, and creating files to help with code-related tasks.
Hugely inspired by How to Build an Agent by Thorsten Ball of AmpCode.
Agent C defaults to running with Ollama and the gpt-oss:120b-cloud model.
-
Install Ollama:
- Download and install Ollama
- Sign in:
ollama signin(this will prompt you to create an account if you don't have one) - Pull the model:
ollama pull gpt-oss:120b-cloud - Start Ollama:
ollama serve
-
Install uv:
- Install
uvusing the standalone installer for your OS.
- Install
-
Run Agent C:
- Run:
uvx git+https://github.com/badlydrawnrod/agent-c - Interact with the agent by typing commands or questions. Type "quit" or "exit" to end.
- Run:
For other providers (e.g., OpenAI, Anthropic), see Configuration below.
-
Clone the repository:
git clone https://github.com/badlydrawnrod/agent-c.git cd agent-c -
Install
uv:- Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - Linux/macOS:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Windows:
-
Install dependencies:
- Run:
uv sync
- Run:
The agent uses three TOML files for configuration:
providers.toml: Master list of supported LLM providers (usually no need to edit).config.toml: Override default settings for providers (e.g., change models).personalities.toml: Define agent personalities with custom prompts and settings (e.g., coder, reviewer, debugger).
To use providers requiring API keys (like Anthropic or OpenAI), set environment variables:
- Windows (Command Prompt):
set ANTHROPIC_API_KEY=your_key - Windows (PowerShell):
$env:ANTHROPIC_API_KEY = 'your_key' - Linux/macOS:
export ANTHROPIC_API_KEY=your_key
Ollama requires no API key but must be running locally.
Run the agent with:
uv run agent-c --personality coderAvailable personalities: coder (default), reviewer, debugger.
Override the model:
uv run agent-c --personality reviewer --model gpt-4Run without installing (using uvx):
uvx --from . agent-c --personality coderInteract by typing commands or questions. Exit with "quit" or "exit".
Run tests and linting:
uv run pytest
uv run mypy
uv run ruffThis project is licensed under the MIT License - see the LICENSE file for details.