Buddy AI
Build AI agents that work for you โ not just chat with you.
Buddy AI is a batteries-included Python framework for building, deploying, and managing intelligent agents. One unified API gives you 30+ LLM providers, 200+ tools, persistent memory, RAG knowledge, multi-agent teams โ and an autonomous virtual employee that ships real work while you sleep.
โญ Featured in v2.2.0
New in v2.2.0 โ Built-in Prompt Caching
Save up to 90 % of repeated prompt-token costs with a single flag. Anthropic gets explicit cache_control breakpoints on system prompt, tools, and conversation history. OpenAI gets automatic server-side caching with cache-hit metrics surfaced automatically.
New in v2.2.0 โ Competency Engine
Teaching AI Agents to Know What They Don't Know. Read the full story โ plain English, runnable code, honest framing.
Featured article โ PULSE
Meet your autonomous teammate. What PULSE is, the nine-page web UI, desktop app with system tray, and a Python quick start โ no invented features.
-
Token Efficiency Suite
Six layered techniques to slash costs and latency: prompt caching (Anthropic & OpenAI), proxy-aware caching (LiteLLM, OpenRouter, Azure), Token Budget Manager (auto-compress history + cap tool outputs), session summaries. One flag per technique โ compose freely.
-
Release article โ Competency Engine
Teaching AI Agents to Know What They Don't Know โ what's new in v2.2.0, the report-card metaphor, and three runnable code walkthroughs (scoring, autonomous loop, runtime routing).
-
PULSE โ Autonomous Virtual Employee
A fully autonomous teammate that works your task queue, creates real files in its workspace, learns from documents and URLs, attends meetings, writes daily standups, suggests proactive work, and remembers everything across sessions โ no babysitting required.
One command starts it:
buddy pulse start -
Competency Engine
A balance-aware scoring & orchestration layer that measures an agent or team's competency across domains, autonomously prioritizes the weakest gaps to train next, and routes each task to the most competent member with outcome feedback.
It measures, routes, and prioritizes โ an interpretable layer on top of your models.
๐ค Why Buddy AI?
-
One API, every model
Swap between OpenAI, Anthropic, Google, AWS Bedrock, Azure, Cohere and 30+ providers without rewriting your agent. Mix and match, fail over, and integrate custom models.
-
Tools out of the box
Ship faster with 200+ built-in tools, and add your own with a simple decorator. Automatic schema generation means function calling just works.
-
Memory that persists
Conversation summarization, long-term storage, and user-specific memories that carry across sessions โ so your agents actually remember.
-
Production from day one
FastAPI REST apps, interactive UIs, Docker & Kubernetes support, and enterprise security features built into the framework.
๐ Key Features
-
Advanced Agent System
- Intelligent agents with persistent memory and personality
- Multi-agent teams with sophisticated orchestration
- Agent evolution through automated improvement
- Personality engine for behavioral modeling
-
Multi-Model Support
- 30+ LLM providers under one unified interface
- Model switching and failover
- Custom model integration
-
Extensible Tool System
- 200+ built-in tools for common tasks
- Custom tool creation with simple decorators
- Function calling, composition, and chaining
-
Knowledge & RAG
- Multi-format document processing (PDF, DOCX, MDโฆ)
- Vector database integration (ChromaDB, Pinecone, Weaviate)
- Semantic search with intelligent ranking
-
Teams & Workflows
- Multi-agent collaboration and communication
- Template-based workflow automation
- A robust execution engine
-
Deploy Anywhere
- FastAPI integration for REST APIs
- Interactive apps and playgrounds
- Docker & Kubernetes ready
๐ฆ Quick Start
Spin up your first agent in a few lines:
from buddy import Agent
from buddy.models.openai import OpenAIChat
agent = Agent(
name="Assistant",
model=OpenAIChat(),
instructions="You are a helpful assistant.",
)
response = agent.run("Hello, what can you do?")
print(response.content)
Add memory and a real web-search tool to build a research assistant:
from buddy import Agent
from buddy.models.openai import OpenAIChat
from buddy.tools.tavily import TavilyTools
from buddy.memory.agent import AgentMemory
agent = Agent(
name="ResearchBot",
model=OpenAIChat(),
memory=AgentMemory(),
tools=[TavilyTools()],
instructions="You are a research assistant that can search the web.",
)
response = agent.run("What are the latest developments in AI?")
print(response.content)
Score and route your team's competency
Want to know where your agents are strong โ and send each task to the right one?
๐๏ธ Architecture Overview
graph TD
A[User Input] --> B[Agent]
B --> C[Model Provider]
B --> D[Memory System]
B --> E[Tool System]
B --> F[Knowledge Base]
C --> G[OpenAI/Anthropic/etc.]
D --> H[Vector Storage]
E --> I[Built-in Tools]
E --> J[Custom Tools]
F --> K[Documents/URLs]
B --> L[Response Generation]
L --> M[User Output]
๐ฏ Core Modules
| Module | Description | Highlights |
|---|---|---|
| Agent | Core agent implementation | Memory, tools, personality, evolution |
| PULSE | Autonomous virtual employee | Real file output, persistent memory, meetings, standups, web UI |
| Competency Engine | Scoring & orchestration | Domain scoring, gap prioritization, runtime routing |
| Models | LLM provider integrations | 30+ providers, unified interface |
| Tools | Function calling system | 200+ tools, custom creation |
| Memory | Memory management | Conversation, long-term, user memories |
| Knowledge | RAG and document processing | Multi-format, vector search |
| Team | Multi-agent collaboration | Orchestration, communication |
| Workflows | Process automation | Template-based, execution engine |
| Token Efficiency | 6-layer cost reduction | Prompt cache, proxy cache, token budget, tool trimming, history compression |
| Integrations | LangChain & LangGraph interop | Buddy models/agents as LangChain & LangGraph components, competency routing edges |
| Training | Model fine-tuning | Data prep, training, evaluation |
| CLI | Command-line interface | Workspace management, operations |
| API | REST API framework | FastAPI integration, endpoints |
๐ Documentation Structure
This documentation is organized into the following sections:
- Getting Started โ Installation, setup, and first steps
- Core Concepts โ Understanding the fundamental components
- Agent Framework โ Deep dive into agent capabilities
- Model Providers โ Working with different LLM providers
- Tools & Functions โ Building and using tools
- Memory System โ Managing agent memory and state
- Knowledge Management โ RAG and document processing
- Advanced Features โ Multi-modal, reasoning, planning, competency, prompt caching
- Integrations โ Use Buddy with LangChain and LangGraph
- Examples & Tutorials โ Practical examples and use cases
๐ค Community & Support
- GitHub: esasrir91/buddy-ai
- Issues: Bug Reports & Feature Requests
- Discussions: Community Forum
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
Ready to build intelligent AI agents? Get started now โ