YAAC (Yet Another Agentic Coder) - An AI coding assistant powered by Pydantic AI
Project description
YAAC (Yet Another Agentic Coder)
An AI-powered coding assistant CLI, built with Pydantic AI.
Runs in your terminal, reads and edits your files, executes commands โ like Claude Code, but model-agnostic and fully open.
Features
- ๐ค Multi-provider โ Anthropic, OpenAI, Google Gemini, Groq, Mistral, Ollama
- ๐ Full tool suite โ read/write/edit files, run shell commands, search code, LSP diagnostics
- ๐ง Subagents & planning โ spawn independent subagents, delegate planning to a read-only planner
- ๐ Skills system โ persistent, reusable instructions discoverable by the agent
- โ Session todos โ per-session task tracking so the agent never loses context mid-task
- ๐ฌ Persistent history โ conversations saved to
.yaac/history.json, compacted automatically - ๐ LSP integration โ real type errors and code intelligence (hover, go-to-definition, references)
- โก Streaming output โ text streams in real-time; tool calls shown inline
- ๐ Interrupt & refine โ press
iduring a run to interrupt and add more details
Installation
Install from PyPI
pip install yaacai
Update
pip install --upgrade yaacai
Local / development install
pip install -e .
# With optional provider support
pip install -e ".[openai]" # OpenAI
pip install -e ".[google]" # Google Gemini
pip install -e ".[groq]" # Groq
pip install -e ".[mistral]" # Mistral
pip install -e ".[all]" # All providers
# With dev dependencies
pip install -e ".[dev]"
Configure and run
# Set your API key (Anthropic is the default provider)
export ANTHROPIC_API_KEY=sk-ant-...
# Launch
yaac
# Use a specific model
yaac --model openai:gpt-4o
yaac --model google:gemini-2.0-flash
yaac --model groq:llama-4-scout
yaac --model ollama:llama3
Usage
Just type your request at the > prompt:
> read main.py and explain what it does
> add error handling to the parse_input function
> run the tests and fix any failures
> refactor the auth module to use async/await
Built-in commands
| Command | Description |
|---|---|
exit / quit / bye |
Quit YAAC |
/clear |
Clear conversation history |
/help |
Show help |
/skills |
List loaded skills |
/model |
Open interactive model picker |
/model <provider:model> |
Switch model (e.g. openai:gpt-4o) |
/key |
Show API key status for current provider |
/key <value> |
Set & save the API key for the current provider |
Interrupt & refine
Press i while YAAC is running to interrupt the current turn. You'll be prompted to add extra details; pressing Enter continues with the original instruction.
Environment variables
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key |
OPENAI_API_KEY |
OpenAI API key |
GOOGLE_API_KEY |
Google Gemini API key |
GROQ_API_KEY |
Groq API key |
MISTRAL_API_KEY |
Mistral API key |
YAAC_MODEL |
Default model (overrides ~/.yaac/config.json) |
YAAC_DEBUG |
Set to 1 for full error tracebacks |
API keys and the default model are also persisted in ~/.yaac/config.json when set via /key or /model.
Supported models
Use the format provider:model-id anywhere a model is expected.
| Provider | Example model IDs |
|---|---|
anthropic |
claude-sonnet-4-6, claude-opus-4, claude-haiku-4 |
openai |
gpt-4o, gpt-4.1, o3, o4-mini |
google |
gemini-2.0-flash, gemini-1.5-pro |
groq |
llama-4-scout, llama-3.3-70b, kimi-k2 |
mistral |
mistral-large, mistral-small |
ollama |
any locally running model, e.g. llama3, mistral |
Tools available to the agent
File tools
| Tool | Description |
|---|---|
read_file |
Read file contents with line numbers (supports offset/limit) |
write_file |
Create a new file |
update_file |
Apply a unified diff to an existing file |
list_directory |
List directory contents with sizes |
Shell & search
| Tool | Description |
|---|---|
run_bash |
Execute shell commands (tests, git, build, etc.) |
glob_search |
Find files by glob pattern |
grep_search |
Search file contents by regex |
LSP & code intelligence
| Tool | Description |
|---|---|
lsp_diagnostics |
Get real type errors and warnings from a language server |
lsp_query |
Hover info, go-to-definition, references, document symbols |
Agent & planning
| Tool | Description |
|---|---|
plan_mode |
Delegate planning to a dedicated read-only planning subagent |
spawn_subagent |
Spawn an independent subagent with a fresh context |
create_skill |
Persist a new reusable skill to ~/.yaac/skills/ |
create_agent_profile |
Persist a new agent profile to ~/.yaac/agents/ |
Session management
| Tool | Description |
|---|---|
todo_read |
Read all todos for the current session |
todo_write |
Create or update session-scoped todos |
Skills
Skills are persistent, reusable instruction sets discovered automatically. Place a SKILL.md file with YAML frontmatter in any of these locations:
<project>/.yaac/skills/<skill-name>/SKILL.md โ project-level (highest priority)
~/.yaac/skills/<skill-name>/SKILL.md โ user-level (global)
SKILL.md format:
---
name: my-skill
description: One-line description shown in the catalog.
---
Full instructions in Markdown...
The agent sees only the name and description at startup. Full instructions are loaded on-demand via the activate_skill tool when a task matches. Use /skills to list all loaded skills, or create_skill to let the agent create one automatically.
Conversation history & context management
- History is persisted to
.yaac/history.jsonin the working directory. - Tool results are truncated automatically to avoid bloating the context.
- When input token usage exceeds 65 % of the model's context window, history is compacted automatically.
- Use
/clearto reset the conversation entirely.
Development
pip install -e ".[dev]"
# Run without installing
python -m yaac.main
Architecture
yaac/
โโโ main.py # CLI entry point, REPL loop, streaming output
โโโ agent.py # Pydantic AI agent creation & system prompt
โโโ config.py # Model resolution, pricing, API key management
โโโ skills.py # Skill discovery, catalog & activation
โโโ history.py # Conversation persistence & compaction
โโโ completer.py # Tab-completion, model picker, toolbar
โโโ ui.py # Rich console helpers
โโโ beast.py # Beast mode (extended context features)
โโโ tools/
โ โโโ file_tools.py # read_file, write_file, update_file, list_directory
โ โโโ shell_tools.py # run_bash
โ โโโ search_tools.py # glob_search, grep_search
โ โโโ lsp_tools.py # lsp_diagnostics, lsp_query
โ โโโ meta_tools.py # plan_mode, create_skill, create_agent_profile
โ โโโ subagent_tools.py # spawn_subagent
โ โโโ todo_tools.py # todo_read, todo_write
โโโ lsp/ # LSP server management
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yaacai-0.1.2.tar.gz.
File metadata
- Download URL: yaacai-0.1.2.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a552affc47a9c8552c1c4b07ec9d61c2c91e11ee82f4027bdc8e2c1478273ba1
|
|
| MD5 |
8997ce14f3526f43b1b9067445fb5f59
|
|
| BLAKE2b-256 |
a551a8a35064204c4d2c1cfb0b64b53f8245d4c6c7a9bd4109d51a840af7d1f5
|
File details
Details for the file yaacai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: yaacai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 60.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ed72fd46bbefd30e3ea1e707ae87499d68669d7173385ccc4e99b3529c1c526
|
|
| MD5 |
83c475a870efb9f33be4756971e1709a
|
|
| BLAKE2b-256 |
e849839e39423dcbf6629e3482efece5eb29b3b1d6bb87e21239a834abc02f53
|