# Definable AI ## Docs - [Cost Tracking](https://docs.definable.ai/advanced/cost-tracking.md): Track token usage and costs across models, agents, and sessions. - [Error Handling](https://docs.definable.ai/advanced/error-handling.md): Handle exceptions, configure retries, and build resilient agents. - [Media Types](https://docs.definable.ai/advanced/media-types.md): Work with images, audio, video, and files across models and agents. - [Run Output & Events](https://docs.definable.ai/advanced/run-output.md): Understand the data returned from every agent run. - [Agentic Loop](https://docs.definable.ai/agents/agentic-loop.md): Unified async generator powering both arun() and arun_stream(). - [Authentication](https://docs.definable.ai/agents/auth.md): Secure your agent's HTTP endpoints and messaging interfaces with API keys, JWT, allowlists, or composite auth. - [Building Agents](https://docs.definable.ai/agents/building-agents.md): Start simple: a model, tools, and instructions. - [Agent Configuration](https://docs.definable.ai/agents/configuration.md): Fine-tune agent behavior with AgentConfig. - [Evaluation](https://docs.definable.ai/agents/evaluation.md): Evaluate agent quality across accuracy, performance, reliability, and custom criteria. - [Middleware](https://docs.definable.ai/agents/middleware.md): Intercept, modify, and extend agent execution with composable middleware. - [Multi-Turn Conversations](https://docs.definable.ai/agents/multi-turn.md): Maintain conversation context across multiple agent interactions. - [What are Agents?](https://docs.definable.ai/agents/overview.md): Agents are AI programs that use tools to accomplish tasks. - [Plugins](https://docs.definable.ai/agents/plugins.md): Extend agent behavior with composable, dependency-aware plugins. - [Running Agents](https://docs.definable.ai/agents/running-agents.md): Execute agents synchronously, asynchronously, or with streaming. - [Agent Runtime](https://docs.definable.ai/agents/runtime.md): Deploy agents with HTTP endpoints, webhooks, cron jobs, and messaging interfaces. - [Scheduling](https://docs.definable.ai/agents/scheduling.md): Schedule agent execution with intervals, one-shots, and cron triggers. - [Security](https://docs.definable.ai/agents/security.md): Production-grade security features for agents — tool policies, rate limiting, prompt injection detection, SSRF protection, and security audits. - [Testing](https://docs.definable.ai/agents/testing.md): Test agents without API calls using MockModel and assertion helpers. - [Tracing](https://docs.definable.ai/agents/tracing.md): Export structured events from agent runs for debugging and observability. - [Agent with Knowledge](https://docs.definable.ai/agents/usage/agent-with-knowledge.md): Ground an agent in documents using RAG. - [Agent with Memory](https://docs.definable.ai/agents/usage/agent-with-memory.md): Give an agent persistent memory across conversations. - [Agent with Streaming](https://docs.definable.ai/agents/usage/agent-with-streaming.md): Stream agent responses token by token in real time. - [Agent with Structured Output](https://docs.definable.ai/agents/usage/agent-with-structured-output.md): Return typed Pydantic models from agent responses. - [Agent with Tools](https://docs.definable.ai/agents/usage/agent-with-tools.md): Build an agent that uses custom tools to take actions. - [Browser Toolkit](https://docs.definable.ai/browser/overview.md): Playwright CDP browser automation — 55 tools, role-based refs, 3 connection modes. - [Claude Code Agent](https://docs.definable.ai/claude-code/overview.md): Wrap the Claude Code CLI with Definable's full feature ecosystem - [Agent Examples](https://docs.definable.ai/examples/agents.md): Examples for building agents with tools, toolkits, and streaming. - [Auth Examples](https://docs.definable.ai/examples/auth.md): Examples for API key, JWT, allowlist, and composite authentication. - [Browser Examples](https://docs.definable.ai/examples/browser.md): Examples for browser automation with Playwright CDP. - [Evaluation Examples](https://docs.definable.ai/examples/evaluation.md): Examples for accuracy, performance, reliability, and agent-as-judge evaluation. - [Guardrail Examples](https://docs.definable.ai/examples/guardrails.md): Examples for input, output, and tool guardrails. - [Interface Examples](https://docs.definable.ai/examples/interfaces.md): Examples for Discord, Slack, voice calls, multi-interface, desktop control, and gateway deployments. - [Knowledge Examples](https://docs.definable.ai/examples/knowledge.md): Examples for building RAG pipelines with documents, embedders, and vector databases. - [MCP Examples](https://docs.definable.ai/examples/mcp.md): Examples for connecting to MCP servers, reading resources, and using prompts. - [Memory Examples](https://docs.definable.ai/examples/memory.md): Examples for session memory, store backends, and agent integration. - [Model Examples](https://docs.definable.ai/examples/models.md): Examples for invoking LLMs across providers. - [Examples Overview](https://docs.definable.ai/examples/overview.md): Runnable code examples for every major feature. - [Reader Examples](https://docs.definable.ai/examples/readers.md): Examples for file readers, custom readers, and standalone usage. - [Replay Examples](https://docs.definable.ai/examples/replay.md): Examples for inspecting past runs and comparing outputs. - [Security Examples](https://docs.definable.ai/examples/security.md): Examples for tool policies, rate limiting, prompt injection detection, and security audits. - [Skills Examples](https://docs.definable.ai/examples/skills.md): Examples for built-in skills, markdown skills, and the skill registry. - [Team Examples](https://docs.definable.ai/examples/teams.md): Examples for multi-agent teams with coordinate, route, collaborate, and tasks modes. - [Tool Examples](https://docs.definable.ai/examples/tools.md): Examples for defining tools with parameters, hooks, caching, and dependencies. - [Workflow Examples](https://docs.definable.ai/examples/workflows.md): Examples for sequential, parallel, conditional, loop, and router workflows. - [Your First Agent](https://docs.definable.ai/first-agent.md): Build and run your first agent with tools in under 20 lines of code. - [Guardrails Overview](https://docs.definable.ai/guardrails/overview.md): Check, modify, or block content at input, output, and tool checkpoints. - [Multimodal Input](https://docs.definable.ai/input-output/multimodal.md): Send images, audio, video, and files to models and agents. - [Streaming](https://docs.definable.ai/input-output/streaming.md): Stream responses token-by-token from models and agents. - [Structured Output](https://docs.definable.ai/input-output/structured-output.md): Return typed Pydantic models from models and agents. - [Installation](https://docs.definable.ai/installation.md): Install Definable and set up your environment. - [Call (Voice)](https://docs.definable.ai/interfaces/call.md): Connect your agent to phone calls with Twilio or Plivo. - [Custom Interfaces](https://docs.definable.ai/interfaces/custom-interfaces.md): Build your own interface to connect agents to any messaging platform. - [Discord](https://docs.definable.ai/interfaces/discord.md): Connect your agent to Discord as a bot. - [Email](https://docs.definable.ai/interfaces/email.md): Connect agents to email via IMAP and SMTP. - [Interface Hooks](https://docs.definable.ai/interfaces/hooks.md): Intercept, filter, and modify messages and responses at every stage of the pipeline. - [Identity Resolution](https://docs.definable.ai/interfaces/identity.md): Map users across platforms to a single canonical identity. - [Multi-Interface Serving](https://docs.definable.ai/interfaces/multi-interface.md): Run multiple interfaces concurrently with automatic restart and graceful shutdown. - [Interfaces Overview](https://docs.definable.ai/interfaces/overview.md): Connect agents to messaging platforms with automatic sessions, hooks, and media handling. - [Sessions](https://docs.definable.ai/interfaces/sessions.md): Automatic per-user conversation management with history, state, and expiry. - [Slack](https://docs.definable.ai/interfaces/slack.md): Deploy your agent as a Slack bot with Socket Mode or HTTP Events API. - [Telegram](https://docs.definable.ai/interfaces/telegram.md): Deploy your agent as a Telegram bot with polling or webhooks. - [Discord Bot](https://docs.definable.ai/interfaces/usage/discord-bot.md): Deploy an agent as a Discord bot with tools and memory. - [Multi-Platform Agent](https://docs.definable.ai/interfaces/usage/multi-platform.md): Serve one agent across Telegram, Discord, and Slack simultaneously. - [Slack Bot](https://docs.definable.ai/interfaces/usage/slack-bot.md): Deploy an agent as a Slack bot with slash commands. - [Telegram Bot](https://docs.definable.ai/interfaces/usage/telegram-bot.md): Deploy an agent as a Telegram bot with tools and voice support. - [WebSocket](https://docs.definable.ai/interfaces/websocket.md): Real-time bidirectional communication via WebSocket. - [WhatsApp](https://docs.definable.ai/interfaces/whatsapp.md): Connect agents to WhatsApp via Twilio or Baileys (self-hosted). - [Definable](https://docs.definable.ai/introduction.md): Build, run, and deploy AI agents with models, tools, knowledge, and memory. - [Agent Integration](https://docs.definable.ai/knowledge/agent-integration.md): Connect knowledge bases to agents for automatic or on-demand retrieval. - [Documents](https://docs.definable.ai/knowledge/documents.md): The core data unit in the knowledge pipeline. - [Hybrid Search & Scoring](https://docs.definable.ai/knowledge/hybrid-search.md): Combine vector similarity with full-text search, MMR diversity, and temporal decay for better retrieval. - [Knowledge Overview](https://docs.definable.ai/knowledge/overview.md): Build RAG pipelines to give your agents access to custom data. - [Chunkers](https://docs.definable.ai/knowledge/pipeline/chunkers.md): Split documents into smaller, overlapping pieces for better retrieval. - [Embedders](https://docs.definable.ai/knowledge/pipeline/embedders.md): Convert text into vector embeddings for similarity search. - [Readers](https://docs.definable.ai/knowledge/pipeline/readers.md): Read content from text files, PDFs, and web pages into documents. - [Rerankers](https://docs.definable.ai/knowledge/pipeline/rerankers.md): Improve search result relevance with cross-encoder reranking. - [Vector Databases](https://docs.definable.ai/knowledge/pipeline/vector-databases.md): Store and search document embeddings with seven built-in backends. - [Basic RAG](https://docs.definable.ai/knowledge/usage/basic-rag.md): Build a knowledge base and ground an agent in documents. - [Hybrid Search](https://docs.definable.ai/knowledge/usage/hybrid-search-example.md): Combine vector similarity with BM25 keyword search for better retrieval. - [MCP Configuration](https://docs.definable.ai/mcp/configuration.md): Configure MCP servers, transports, timeouts, and tool filtering. - [MCP Error Handling](https://docs.definable.ai/mcp/error-handling.md): Handle connection failures, timeouts, and protocol errors. - [Getting Started with MCP](https://docs.definable.ai/mcp/getting-started.md): Connect to your first MCP server and call tools from your agent. - [Mock MCP Servers](https://docs.definable.ai/mcp/mock-servers.md): Test MCP integrations without running real servers. - [MCP Overview](https://docs.definable.ai/mcp/overview.md): Connect to MCP servers and use their tools, resources, and prompts. - [MCP Prompts](https://docs.definable.ai/mcp/prompts.md): Use reusable prompt templates from MCP servers. - [MCP Resources](https://docs.definable.ai/mcp/resources.md): Read data from MCP servers using the resource provider. - [Agent Integration](https://docs.definable.ai/memory/agent-integration.md): How memory integrates with the agent lifecycle. - [Memory Overview](https://docs.definable.ai/memory/overview.md): Session-scoped conversation memory with auto-summarization for agents. - [Memory Stores](https://docs.definable.ai/memory/stores.md): Storage backends for session conversation memory. - [Anthropic](https://docs.definable.ai/models/anthropic.md): Use Claude models from Anthropic. - [DeepSeek](https://docs.definable.ai/models/deepseek.md): Use DeepSeek models for cost-effective, high-quality AI generation. - [Google Gemini](https://docs.definable.ai/models/google.md): Use Google Gemini models. - [Metrics & Pricing](https://docs.definable.ai/models/metrics-and-pricing.md): Track token usage, latency, and cost across all model calls. - [Mistral](https://docs.definable.ai/models/mistral.md): Use Mistral AI models. - [Model as String](https://docs.definable.ai/models/model-as-string.md): Use string shorthand instead of importing model classes. - [Moonshot](https://docs.definable.ai/models/moonshot.md): Use Moonshot (Kimi) models for AI generation. - [Ollama](https://docs.definable.ai/models/ollama.md): Use local models via Ollama. - [OpenAI](https://docs.definable.ai/models/openai.md): Use OpenAI models including GPT-4o, GPT-4o-mini, o1, and more. - [OpenAI-Like Providers](https://docs.definable.ai/models/openai-like.md): Connect to any provider that exposes an OpenAI-compatible API. - [OpenRouter](https://docs.definable.ai/models/openrouter.md): Access 100+ models through a single API. - [What are Models?](https://docs.definable.ai/models/overview.md): Unified interface for calling LLMs across 10 providers. - [Perplexity](https://docs.definable.ai/models/perplexity.md): Use Perplexity Sonar models with built-in search. - [Model Resilience](https://docs.definable.ai/models/resilience.md): Automatic key rotation, failover, and rate limit handling. - [Streaming](https://docs.definable.ai/models/streaming.md): Stream model responses token-by-token for real-time output. - [Structured Output](https://docs.definable.ai/models/structured-output.md): Get type-safe, validated responses from LLMs using Pydantic models. - [Vision & Audio](https://docs.definable.ai/models/vision-and-audio.md): Send images, audio, video, and files to multimodal LLMs. - [xAI](https://docs.definable.ai/models/xai.md): Use xAI Grok models with optional live search capabilities. - [Observability Dashboard](https://docs.definable.ai/observability/overview.md): Live monitoring dashboard for Definable agents — events, traces, metrics, and run comparison. - [Quickstart](https://docs.definable.ai/quickstart.md): Five patterns to get started with Definable. - [File Readers](https://docs.definable.ai/readers/overview.md): Extract text and multimodal content from files (PDF, DOCX, PPTX, XLSX, images, audio) and inject into agent context automatically. - [Deep Research](https://docs.definable.ai/reasoning/deep-research.md): Autonomous multi-wave research with source synthesis. - [Thinking](https://docs.definable.ai/reasoning/thinking.md): Add a reasoning phase before the agent generates responses. - [Agent](https://docs.definable.ai/reference/agents/agent.md): Reference for the Agent class. - [AgentConfig](https://docs.definable.ai/reference/agents/config.md): Reference for AgentConfig parameters. - [RunOutput](https://docs.definable.ai/reference/agents/run-output.md): Reference for RunOutput and RunOutputEvent. - [Knowledge](https://docs.definable.ai/reference/knowledge/knowledge.md): Reference for the Knowledge class. - [Memory](https://docs.definable.ai/reference/memory/memory.md): Reference for the Memory class and stores. - [Model](https://docs.definable.ai/reference/models/model.md): Reference for model classes and common parameters. - [Team](https://docs.definable.ai/reference/teams/team.md): Reference for the Team class. - [@tool Decorator](https://docs.definable.ai/reference/tools/decorator.md): Reference for the @tool decorator. - [Workflow](https://docs.definable.ai/reference/workflows/workflow.md): Reference for Workflow and step types. - [Replay Overview](https://docs.definable.ai/replay/overview.md): Inspect, compare, and re-execute past agent runs. - [Built-in Skills](https://docs.definable.ai/skills/built-in.md): Ready-to-use skills for math, date/time, text processing, file I/O, HTTP, JSON, shell, web search, and macOS control. - [MacOS Skill](https://docs.definable.ai/skills/macos.md): Give any agent full macOS control — screen capture, input simulation, app management, file operations, and more. - [Skills Overview](https://docs.definable.ai/skills/overview.md): Bundle instructions, tools, and dependencies into reusable agent capabilities. - [Skill Registry](https://docs.definable.ai/skills/registry.md): Manage collections of markdown-based skills with eager or lazy loading. - [Building Teams](https://docs.definable.ai/teams/building-teams.md): Create multi-agent teams with execution modes and delegation. - [Delegation](https://docs.definable.ai/teams/delegation.md): How the leader agent delegates work to team members. - [What are Teams?](https://docs.definable.ai/teams/overview.md): Teams coordinate multiple agents to collaborate, route, or divide work. - [Running Teams](https://docs.definable.ai/teams/running-teams.md): Execute teams and handle responses. - [Collaborate Team](https://docs.definable.ai/teams/usage/collaborate-team.md): All members work in parallel, leader synthesizes. - [Coordinate Team](https://docs.definable.ai/teams/usage/coordinate-team.md): Leader picks members and synthesizes their responses. - [Route Team](https://docs.definable.ai/teams/usage/route-team.md): Classify and dispatch to a single specialist. - [Tasks Team](https://docs.definable.ai/teams/usage/tasks-team.md): Autonomous task decomposition and delegation. - [KnowledgeToolkit](https://docs.definable.ai/toolkits/knowledge-toolkit.md): Give agents explicit tools to search and query a knowledge base. - [MCPToolkit](https://docs.definable.ai/toolkits/mcp-toolkit.md): Expose tools from MCP servers to your agents. - [Toolkits Overview](https://docs.definable.ai/toolkits/overview.md): Bundle related tools into reusable, self-contained packages. - [Async Tools](https://docs.definable.ai/tools/creating-tools/async-tools.md): Define asynchronous tools for non-blocking operations. - [Tool Caching](https://docs.definable.ai/tools/creating-tools/caching.md): Cache tool results to avoid redundant computation and API calls. - [Tool Dependencies](https://docs.definable.ai/tools/creating-tools/dependencies.md): Inject services, state, and context into tools. - [Tool Hooks](https://docs.definable.ai/tools/creating-tools/hooks.md): Run logic before and after tool execution. - [Creating Tools](https://docs.definable.ai/tools/creating-tools/overview.md): Write custom Python functions as agent-callable tools. - [Tool Parameters](https://docs.definable.ai/tools/creating-tools/parameters.md): Define tool parameters with type hints and descriptions. - [What are Tools?](https://docs.definable.ai/tools/overview.md): Tools are functions agents call to interact with external systems. - [Building Workflows](https://docs.definable.ai/workflows/building-workflows.md): Create workflows with composable step types. - [What are Workflows?](https://docs.definable.ai/workflows/overview.md): Workflows orchestrate agents through sequential, parallel, conditional, and iterative steps. - [Conditional Workflow](https://docs.definable.ai/workflows/patterns/conditional.md): If/else branching based on step output. - [Loop Workflow](https://docs.definable.ai/workflows/patterns/loop.md): Iterative refinement with end conditions. - [Parallel Workflow](https://docs.definable.ai/workflows/patterns/parallel.md): Execute multiple steps concurrently and combine results. - [Router Workflow](https://docs.definable.ai/workflows/patterns/router.md): Dynamic N-way routing by selector function. - [Sequential Workflow](https://docs.definable.ai/workflows/patterns/sequential.md): Linear step chains where each step receives the previous step's output. - [Running Workflows](https://docs.definable.ai/workflows/running-workflows.md): Execute workflows and access step results. - [Basic Workflow](https://docs.definable.ai/workflows/usage/basic-workflow.md): Build a simple sequential workflow with two agents. - [Nested Workflows](https://docs.definable.ai/workflows/usage/nested-workflows.md): Compose parallel, conditional, and sequential steps into a complex pipeline. ## OpenAPI Specs - [openapi](https://docs.definable.ai/api-reference/openapi.json) ## Optional - [GitHub](https://github.com/definable-ai/definable) - [PyPI](https://pypi.org/project/definable-ai/)