Skip to main content

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 i during 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.json in 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 /clear to 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

yaacai-0.1.3.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaacai-0.1.3-py3-none-any.whl (61.3 kB view details)

Uploaded Python 3

File details

Details for the file yaacai-0.1.3.tar.gz.

File metadata

  • Download URL: yaacai-0.1.3.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for yaacai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e938cc9c17f69eee9b929f2da005529ed60b3e6082548e6ece9e27c8d4f70f85
MD5 00cbca9e0c9c6254b7919902fc80ce4b
BLAKE2b-256 af92da99bc551896853682af632a4eb33d25dce73a301bcd8c627a62ca8e7eab

See more details on using hashes here.

File details

Details for the file yaacai-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: yaacai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 61.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for yaacai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 adffc37e16665b0bd003459a85a4c9173eead1dccbc63b37700bdd11e1bd357e
MD5 34da2c74d4abb8b654df90e2cbda95c8
BLAKE2b-256 d18b846f184c193a8d25f6ecc719ff0b09440bf60682dbc59b4a445a15e58e17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page