Skip to main content

Dynamic skill-based LangGraph agent

Project description

Birdie

      ___                       ___           ___                       ___     
    /\  \          ___        /\  \         /\  \          ___        /\  \    
   /::\  \        /\  \      /::\  \       /::\  \        /\  \      /::\  \   
  /:/\:\  \       \:\  \    /:/\:\  \     /:/\:\  \       \:\  \    /:/\:\  \  
 /::\~\:\__\      /::\__\  /::\~\:\  \   /:/  \:\__\      /::\__\  /::\~\:\  \ 
/:/\:\ \:|__|  __/:/\/__/ /:/\:\ \:\__\ /:/__/ \:|__|  __/:/\/__/ /:/\:\ \:\__\
\:\~\:\/:/  / /\/:/  /    \/_|::\/:/  / \:\  \ /:/  / /\/:/  /    \:\~\:\ \/__/
 \:\ \::/  /  \::/__/        |:|::/  /   \:\  /:/  /  \::/__/      \:\ \:\__\  
  \:\/:/  /    \:\__\        |:|\/__/     \:\/:/  /    \:\__\       \:\ \/__/  
   \::/__/      \/__/        |:|  |        \::/__/      \/__/        \:\__\    
    ~~                        \|__|         ~~                        \/__/    

A LangGraph-based agent that discovers capabilities at runtime from SKILL.MD and AGENT.MD files. Skills, tools, and sub-agents are all declared in plain Markdown - no code changes required to add new capabilities.

Birdie is a minimal yet fully functional implementation. The design goal is simplicity and transparency: the codebase is intended to be readable, hackable, and easy to extend. Every major feature - the agent loop, skill loading, session persistence, conversation compaction, long-term memory - is implemented in a small number of well-commented Python files that you can read from top to bottom in an afternoon.

Security notice: Birdie has no guardrails against local tool misuse. Skills such as Shell and Filesystem can read, write, and execute anything the running user is permitted to do. Only enable skills you trust and run Birdie under an account with appropriate restrictions.


Birdie CLI demo

Installation

From PyPI (recommended)

pip install birdie-agent

From source

git clone https://github.com/gkvas/birdie.git
cd birdie
pip install -e .

Optional extras

pip install "birdie-agent[mcp]"   # MCP server support
pip install -e ".[dev,mcp]"       # development + MCP (from source)

Quick start

Configure your LLM provider and run birdie.

Environment variables

# Anthropic
export LLM_VENDOR=anthropic
export LLM_MODEL=claude-sonnet-4-6
export ANTHROPIC_API_KEY=your-key-here
birdie

# OpenAI
export LLM_VENDOR=openai
export LLM_MODEL=gpt-4o
export OPENAI_API_KEY=your-key-here
birdie

# Mistral
export LLM_VENDOR=mistral
export LLM_MODEL=mistral-large-latest
export MISTRAL_API_KEY=your-key-here
birdie

#Azure OpenAI
export  LLM_VENDOR=azure
export LLM_MODEL=your-deployment-name
export AZURE_OPENAI_API_KEY=your-key-here
export AZURE_OPENAI_ENDPOINT=your-base-url
birdie

JSON config file

birdie --config ~/.birdie/provider.json
{
  "vendor": "anthropic",
  "model": "claude-sonnet-4-6",
  "api_key": "sk-ant-..."
}

See doc/cli.md for all supported vendors, config fields, and environment variable options.


Built-in skills

Skills extend Birdie and are defined in SKILL.MD files. All skills are disabled by default. Enable them for the current session:

/skill enable Shell
/skill enable DuckDuckGo

Birdie ships with the following default skills:

Skill Description
Shell Run arbitrary shell commands
Filesystem Read and write local files
ssh Connect to remote hosts and run commands
ToDo Step-by-step planning and progress tracking
Weather Weather lookup via external API
DuckDuckGo Web search - no API key required
mcp_demo Demo MCP server (echo and reverse_string)

See doc/skills.md for the full SKILL.MD format and how to write skills.


Sub-agents

Sub-agents are AI agents defined by AGENT.MD files. When enabled, a sub-agent appears to the calling LLM as a regular tool. Invoking it spins up an ephemeral agent, runs it to completion, and returns the result.

All agents are disabled by default. Enable them for the current session:

/agent enable Summarizer

Drop an AGENT.MD in ~/.birdie/agents/<name>/ to add custom sub-agents without reinstalling.

See doc/agents.md for the full AGENT.MD format and how to write custom agents.


Conversation memory

Birdie maintains three separate memory stores that work together to give the agent context across turns and sessions.

Short-term memory is handled automatically by LangGraph's SQLite checkpointer. Every message is stored in ~/.birdie/sessions/<user>/checkpoints.db and loaded at the start of each turn. The agent trims the loaded history to a 20-message context window before calling the LLM, so cost stays bounded even in very long sessions.

Manual long-term memory is written by you, explicitly. Use /remember to save any fact you want the agent to recall in future sessions:

/remember I prefer compact, direct answers without preamble
/remember The project uses Python 3.12 and pytest for tests

Notes are stored in ~/.birdie/sessions/<user>/memory.json and injected into the system prompt at the start of every turn, across all sessions.

Automatic long-term memory is written by the compaction pipeline. When a session grows beyond 100 messages, Birdie automatically summarises the oldest segment using the LLM, extracts structured facts, preferences, tool outcomes, and open tasks, and stores them in ~/.birdie/ltm/<user>.json. On future turns, the top-5 most semantically relevant entries are retrieved and injected alongside your manual /remember notes.

You can trigger compaction at any time with:

/compact

This is useful at the end of a long working session to capture everything important before starting fresh. The command displays the summary that was generated and how many messages were removed from the checkpoint.

The retrieval uses a lightweight hash-trick embedding (birdie/core/retrieval.py) that requires no model downloads or extra dependencies - just SHA-256 and a dot product.

See doc/architecture.md for a detailed explanation of how all three stores interact, how the compaction algorithm picks the split point, and how the LTM store is queried each turn.


Key commands

Command Description
/skill list List all skills and their status
/skill enable <name> Enable a skill for this session
/agent list List all sub-agents and their status
/agent enable <name> Enable a sub-agent for this session
/agent output short|full|off Control sub-agent transcript verbosity
/tool output short|full|off Control tool result verbosity
/remember <text> Save a note to long-term memory
/compact Summarise old messages into long-term memory now
/session new Start a new session
/session list List all sessions
/help Show all commands

Documentation

Document Contents
doc/cli.md CLI flags, provider config reference, all slash commands, key bindings
doc/skills.md SKILL.MD format, entrypoints, tool and knowledge skills, skill loading
doc/agents.md AGENT.MD format, sub-agent system, runtime controls, custom agents
doc/mcp.md MCP integration, declaring MCP servers, writing MCP servers
doc/architecture.md Project layout, agent loop, system prompt, providers, conversation compaction, long-term memory store, sessions

Running tests

pip install -e ".[dev,mcp]"
pytest

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

birdie_agent-0.2.13.tar.gz (88.8 kB view details)

Uploaded Source

Built Distribution

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

birdie_agent-0.2.13-py3-none-any.whl (78.5 kB view details)

Uploaded Python 3

File details

Details for the file birdie_agent-0.2.13.tar.gz.

File metadata

  • Download URL: birdie_agent-0.2.13.tar.gz
  • Upload date:
  • Size: 88.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for birdie_agent-0.2.13.tar.gz
Algorithm Hash digest
SHA256 33599cd67a0b71a952bc05b5f9184d4cebbdf01be76a19604fbe03337e82836d
MD5 d4d20a2efb715e31607b405229693b1d
BLAKE2b-256 90bafa280b3450a88bc7b194455c609a3f11aff7d66ca1621e69f80adb568515

See more details on using hashes here.

Provenance

The following attestation bundles were made for birdie_agent-0.2.13.tar.gz:

Publisher: publish.yml on gkvas/birdie

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file birdie_agent-0.2.13-py3-none-any.whl.

File metadata

  • Download URL: birdie_agent-0.2.13-py3-none-any.whl
  • Upload date:
  • Size: 78.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for birdie_agent-0.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 49e2faadd7d3bd04a42db3c3a2ed7321143a85d87c50eafcd9b139dcf3982f8f
MD5 e1c0c5d2be06360c7ea808ac828b5fef
BLAKE2b-256 a8287f3fdb7c16bab224d10486c9a5c4604f9b663d3c7de855d77cf0532d045b

See more details on using hashes here.

Provenance

The following attestation bundles were made for birdie_agent-0.2.13-py3-none-any.whl:

Publisher: publish.yml on gkvas/birdie

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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