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
ShellandFilesystemcan 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.
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
Release history Release notifications | RSS feed
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 birdie_agent-0.5.1.tar.gz.
File metadata
- Download URL: birdie_agent-0.5.1.tar.gz
- Upload date:
- Size: 106.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e60c229ceae3f671c150ccc0325c44ec97db5c67c914922221a0be4ce8e5fd
|
|
| MD5 |
61e0144c989c06015bc13e36864b53dd
|
|
| BLAKE2b-256 |
8f4c0e14d5a646d17352298b8f31d18c8549d21fdb5661d4d7d53427d30f5ade
|
Provenance
The following attestation bundles were made for birdie_agent-0.5.1.tar.gz:
Publisher:
publish.yml on gkvas/birdie
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
birdie_agent-0.5.1.tar.gz -
Subject digest:
56e60c229ceae3f671c150ccc0325c44ec97db5c67c914922221a0be4ce8e5fd - Sigstore transparency entry: 1892882481
- Sigstore integration time:
-
Permalink:
gkvas/birdie@db370279c36912a35b76eca50b4ab236c691d17f -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/gkvas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@db370279c36912a35b76eca50b4ab236c691d17f -
Trigger Event:
push
-
Statement type:
File details
Details for the file birdie_agent-0.5.1-py3-none-any.whl.
File metadata
- Download URL: birdie_agent-0.5.1-py3-none-any.whl
- Upload date:
- Size: 89.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00471a5e27dc273887aa39b61d2916f8234ac81e12a0487b74085dd4a971f71c
|
|
| MD5 |
808094c2e05e3eb690c75eba42d65c5d
|
|
| BLAKE2b-256 |
8802b48514f15622c75a919382a0acf8bb5a0647f8675a409f22f9fb748737f6
|
Provenance
The following attestation bundles were made for birdie_agent-0.5.1-py3-none-any.whl:
Publisher:
publish.yml on gkvas/birdie
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
birdie_agent-0.5.1-py3-none-any.whl -
Subject digest:
00471a5e27dc273887aa39b61d2916f8234ac81e12a0487b74085dd4a971f71c - Sigstore transparency entry: 1892882593
- Sigstore integration time:
-
Permalink:
gkvas/birdie@db370279c36912a35b76eca50b4ab236c691d17f -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/gkvas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@db370279c36912a35b76eca50b4ab236c691d17f -
Trigger Event:
push
-
Statement type: