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.1.tar.gz (49.4 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.1-py3-none-any.whl (60.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yaacai-0.1.1.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

Hashes for yaacai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6d99570cea3a4fccf9fa8a2a6186c8ad804ea8eb6cfb7fdeecf2eb4316f48953
MD5 ea925938405aa1872678ea10ca1559e6
BLAKE2b-256 a6313da80cebb20729ad0b45e7d01387b379e2c58eaf9e06623a4f18ad44ef92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yaacai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 60.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b42c6186118701a51fd301358b5b6614ff2d4ace44c7aedb37cf669fd16c387
MD5 b756ca287f357b4b65a5940e2aa47107
BLAKE2b-256 785f2754ce6996fff62e12937fe3459cdb6575a5a5f25a402592b9db4dc1d320

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