Agno Framework

repository·main·Indexed 12 days ago

https://github.com/agno-agi/agno

A comprehensive framework and runtime for building and managing production-grade agent platforms. Agno provides an SDK for development, AgentOS for serving agents as services, and a UI for platform management. It supports a capability ladder ranging from core tools and structured output to durable memory, guardrails, and multi-agent teams and workflows. Version 2.8.7.

Tokens
241K
Snippets
815
Records
1.3K
Agent score
94%

What's inside Agno

  1. Overview of the Agno Agent Platform

    main

    Agno is a framework and runtime designed for building, running, and managing agent platforms. It consists of three primary components:

    1. Agno SDK: Used to build your agents.
    2. AgentOS Runtime: Used to run your agent platform as a service.
    3. AgentOS UI: A web interface used to manage the platform.

    Agno is designed to give developers full ownership of their agent stack, including control over data, memory, and security (via JWT-based RBAC), while providing observability through simulations and usage data.

  2. Overview of Docling Tools Cookbook examples

    main

    The cookbook is organized into several functional files:

    • run.py: The main entrypoint to execute all examples.
    • paths.py: Contains helper functions for managing shared test resource paths.
    • basic_examples.py: Demonstrates standard conversion examples across multiple formats.
    • ocr_example.py: Demonstrates advanced OCR (Optical Character Recognition) configuration.

    Supported file types in these examples include:

    • Documents: PDF, DOCX, Markdown, HTML, XML, XLSX, PPTX
    • Images: PNG (e.g., invoices)
    • Multimedia: Audio/Video to VTT conversion (e.g., MP4)
  3. Overview of Data Labeling workflows and modalities

    main

    The Data Labeling cookbook provides agents for labeling, classification, and synthetic data generation across multiple modalities and output shapes.

    Modalities and Tasks

    • Text: Classification (sentiment, intent), Multilabel classification, Extraction (into Pydantic objects), Span labeling (NER, PII), and Pairwise preference (ranking A vs B for RLHF).
    • Image: Classification, Extraction (attributes, OCR), Extraction to VectorDB, and Bounding Box detection (x, y, w, h).
    • Audio: Classification (language, emotion), Transcription (with diarization/timestamps), and Extraction (action items, attendees).
    • Video: Classification and Extraction (events, scene descriptions).
    • Document: Classification (invoices, contracts) and Extraction (multipage PDF to typed objects).

    Composed Patterns

    These patterns can be layered on top of any modality:

    • LLM as Judge: Scoring outputs against a rubric for evaluations.
    • Quality Review: A pipeline consisting of a labeler, reviewer, and adjudicator.
    • Inter-Annotator Agreement: Measuring agreement (Fleiss' kappa, Krippendorff's alpha, Cohen's kappa) and routing low-agreement items to review.

    Synthetic Data Generation

    Workflows designed to generate and curate training data (JSONL format) rather than labeling existing inputs:

    • Instruction Generation: Self-instruct and Evol-Instruct pipelines.
    • Rejection Sampling: Sampling solutions and keeping those accepted by a verifier/judge.
    • Dataset Curation: Filtering via quality-gates, MinHash deduplication, and benchmark decontamination.
    • Critique and Revision: Constitutional-AI style (draft $\rightarrow$ critique $\rightarrow$ revise).
    • Persona-driven Generation: Using typed personas to generate problems and gold answers.
    • Tool Call Trajectories: Generating function-calling SFT data validated against Agno tool schemas.
  4. Overview of Agno agent examples

    main

    The cookbook/examples directory contains small, complete agent implementations that demonstrate advanced patterns:

    • second_brain: Demonstrates personal memory managed behind your own MCP (Model Context Protocol) server.
    • metrics_desk: Demonstrates an agent capable of answering questions about your production database from any MCP client.
    • team_brain: Demonstrates a shared decision log that an entire team can write into.
  5. Explore Agent Teams cookbook patterns and topics

    main

    The Agent Teams cookbook is organized into specialized directories covering various multi-agent coordination patterns and advanced features:

    Core Coordination & Execution

    • 01_quickstart/: Core team coordination patterns (route, broadcast, tasks, and nested teams).
    • 02_modes/: Team execution modes including coordinate, route, broadcast, and tasks.
    • 11_reasoning/: Multi-purpose reasoning team patterns.
    • 14_run_control/: Control mechanisms like cancellation, retries, model inheritance, remote teams, and background execution.

    Data, Knowledge & Memory

    • 05_knowledge/: Team knowledge, filters, and custom retrievers.
    • 06_memory/: Memory manager, agentic memory, and LearningMachine examples.
    • 07_session/: Session persistence, options, summaries, and history search.
    • 12_learning/: Learning patterns (always, configured, entity memory, session planning, learned knowledge, decision log).
    • 15_distributed_rag/: Multi-member distributed retrieval using PgVector, LanceDB, or reranking.
    • 16_search_coordination/: Coordinated RAG/search patterns across team members.
    • 21_state/: Managing shared session state across members and nested teams.

    Input, Output & Context

    • 04_structured_input_output/: Structured schemas, overrides, and streaming.
    • 08_streaming/: Response streaming and event monitoring.
    • 09_context_management/: Context filtering, introductions, and few-shot context.
    • 10_context_compression/: Tool-result compression and compression manager usage.
    • 13_hooks/: Input pre-hooks, output post-hooks, and stream hooks.
    • 17_dependencies/: Managing runtime dependencies in context, tools, and member flows.
    • 19_multimodal/: Workflows involving audio, image, and video.

    Tools, Safety & Monitoring

    • 03_tools/: Custom tools and tool hook patterns.
    • 18_guardrails/: Protections against prompt-injection, moderation, and PII.
    • 20_human_in_the_loop/: Confirmation, external execution, and user-input-required flows.
    • 22_metrics/: Inspection of team, session, and member metrics.
  6. Human-in-the-Loop patterns and examples

    main

    The Human-in-the-Loop cookbook provides several patterns for managing agent execution flows that require human intervention:

    • Agentic User Input: The agent explicitly requests input from the user during its execution loop (agentic_user_input.py).
    • Tool Confirmation:
      • Requiring confirmation before any tool execution (confirmation_required.py).
      • Advanced confirmation patterns (confirmation_advanced.py).
      • Using toolkits for confirmation (confirmation_toolkit.py).
      • Confirmation specifically when using the MCP toolkit (confirmation_required_mcp_toolkit.py).
    • External Tool Handling:
      • Managing flows for external tool execution (external_tool_execution.py).
      • Using a mix of external and regular tools within a single agent (mixed_external_and_regular_tools.py).
    • Stateful Interactions:
      • Tools that require user input to proceed (user_input_required.py).
      • Confirmation flows where tools modify session_state before pausing, ensuring state changes persist through the pause/continue round-trip (confirmation_with_session_state.py).
  7. Workflow components for Verified Datasets

    main

    The Verified Dataset workflow is composed of three primary scripts:

    1. basic.py: Handles the core logic of verifying attempts, selecting the learning zone, and exporting passing attempts.
    2. curate_learning_zone.py: Makes the strict partial-rate curation rule explicit during the selection process.
    3. export_manifest.py: Pairs the generated dataset with its provenance sidecar and produces a compact manifest.

    Requirements:

    • OPENAI_API_KEY must be set in your environment.
  8. Available Multilabel Classification Implementations

    main

    The cookbook provides three distinct implementation patterns for multilabel classification:

    1. Basic (basic.py): Maps text to a set of tags from a flat label space.
    2. With Confidence (with_confidence.py): Maps text to tags and includes a per-tag confidence score.
    3. Hierarchical (hierarchical.py): Maps text to parent/child tags based on a defined taxonomy.
  9. Production knowledge patterns overview

    main

    The production patterns cookbook provides real-world implementation strategies for deploying robust knowledge systems. Key patterns include:

    • Multi-source RAG: Loading data from files, URLs, and raw text in a single batch.
    • Knowledge Lifecycle Management: Implementing workflows for inserting, skipping existing data, removing data, and tracking status.
    • Multi-tenancy: Isolating knowledge per tenant using isolate_vector_search to ensure data privacy.
    • Error Handling: Implementing idempotent inserts, batch error handling, and data verification.
    • Security (SSRF Prevention): Restricting URL-fetching readers using the allowed_hosts parameter to prevent Server-Side Request Forgery (SSRF) attacks.
  10. Advanced Agent Capabilities Overview

    main

    The advanced cookbook provides implementation patterns for high-performance and production-ready agent behaviors, including:

    • Context Management: Caching model responses, advanced context compression strategies, and compressing tool call results.
    • Execution Control: Running agents in the background (structured or unstructured), concurrent execution of multiple agents, and cancelling running agents with partial content persistence.
    • Reliability & Observability: Configuring retries with exponential backoff, listening to agent lifecycle events, accessing run metrics, and custom logging/debugging.
    • Knowledge & State: Creating and managing cultural knowledge, serializing/deserializing agents, and managing custom cancellation logic.
  11. Explore Agno Knowledge Cookbook archives

    main
    The Agno Knowledge Cookbook archive contains preserved examples and recipes for implementing various knowledge management strategies. You can use these folders to find implementation patterns for specific tasks such as reading data, chunking text, embedding content, and managing vector databases.
  12. Explore agent skill examples

    main

    The skills cookbook contains several examples demonstrating how to define and use agent skills and helper scripts:

    • basic_skills.py: Demonstrates fundamental skill implementation.
    • sample_skills/code-review/scripts/check_style.py: Demonstrates a skill for checking code style.
    • sample_skills/git-workflow/scripts/commit_message.py: Demonstrates a skill for generating git commit messages.