Skip to content

Buddy AI

Buddy AI Logo

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.

PyPI version Python 3.10+ License: MIT GitHub stars

pip install buddy-ai[all]

Get started Read the docs


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.

agent = Agent(model=Claude(id="claude-opus-4-5"), cache_prompt=True)

Prompt Caching guide

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.

Read the release article

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.

:octicons-account-hard-hat-24: Read the PULSE article

  • 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.

    Token Efficiency guide ยท Prompt Caching

  • 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).

    Read the article

  • 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

    Read the article ยท Technical reference

  • 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.

    Explore the engine


๐Ÿค” 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

    Agent framework

  • Multi-Model Support


    • 30+ LLM providers under one unified interface
    • Model switching and failover
    • Custom model integration

    Model providers

  • Extensible Tool System


    • 200+ built-in tools for common tasks
    • Custom tool creation with simple decorators
    • Function calling, composition, and chaining

    Tools & functions

  • Knowledge & RAG


    • Multi-format document processing (PDF, DOCX, MDโ€ฆ)
    • Vector database integration (ChromaDB, Pinecone, Weaviate)
    • Semantic search with intelligent ranking

    Knowledge management

  • Teams & Workflows


    • Multi-agent collaboration and communication
    • Template-based workflow automation
    • A robust execution engine

    Team collaboration

  • Deploy Anywhere


    • FastAPI integration for REST APIs
    • Interactive apps and playgrounds
    • Docker & Kubernetes ready

    Deployment options


๐Ÿšฆ 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?

from buddy.eval.competency import CompetencyEval

ev = CompetencyEval(
    domains={"reasoning": 7, "memory": 6, "deployment": 4},
    base=9,
    dependency={("reasoning", "deployment"): 0.4},
)
result = ev.run()
print(f"Competency index: {result.index:.2%}")
print(f"Weakest domain:   {result.weakest_domain()}")

Dive into the Competency Engine โ†’


๐Ÿ—๏ธ 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:

๐Ÿค Community & Support

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


Ready to build intelligent AI agents? Get started now โ†’