repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/reasoning_agent.py
cookbook/06_agent_os/interfaces/a2a/reasoning_agent.py
from agno.agent.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools reasoning_agent = Agent( name="reasoning-agent", id="reasoning_agent", model=OpenAIChat(id="o4-mini"), description="An advanced AI assistant with de...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/basic.py
cookbook/06_agent_os/interfaces/a2a/basic.py
from agno.agent.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS chat_agent = Agent( name="basic-agent", model=OpenAIChat(id="gpt-4o"), id="basic_agent", description="A helpful and responsive AI assistant that provides thoughtful answers and assistance with a wid...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/__init__.py
cookbook/06_agent_os/interfaces/a2a/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/structured_output.py
cookbook/06_agent_os/interfaces/a2a/structured_output.py
from typing import List from agno.agent.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS from pydantic import BaseModel, Field class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster movie." ) ending: s...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/agent_with_tools.py
cookbook/06_agent_os/interfaces/a2a/agent_with_tools.py
from agno.agent.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( name="Agent with Tools", id="tools_agent", model=OpenAIChat(id="gpt-4o"), tools=[DuckDuckGoTools()], description="A versatile AI ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/multi_agent_a2a/trip_planning_a2a_client.py
cookbook/06_agent_os/interfaces/a2a/multi_agent_a2a/trip_planning_a2a_client.py
import uuid import requests from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS # --- 1. A2A Helper Function (The Protocol) --- def _send_a2a_message(url: str, text: str) -> str: """ Internal helper to send a message using your A2A JSON-RPC format. """ p...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/multi_agent_a2a/weather_agent.py
cookbook/06_agent_os/interfaces/a2a/multi_agent_a2a/weather_agent.py
from textwrap import dedent from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.tools.openweather import OpenWeatherTools weather_agent = Agent( id="weather-reporter-agent", name="Weather Reporter Agent", description="An agent that provides up-to-da...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/interfaces/a2a/multi_agent_a2a/airbnb_agent.py
cookbook/06_agent_os/interfaces/a2a/multi_agent_a2a/airbnb_agent.py
from textwrap import dedent from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.tools.mcp import MCPTools airbnb_agent = Agent( id="airbnb-search-agent", name="Airbnb Search Agent", description="A specialized agent for finding and detailing Airbnb l...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/customize/custom_health_endpoint.py
cookbook/06_agent_os/customize/custom_health_endpoint.py
""" Example AgentOS app with a custom health endpoint. This example demonstrates how to add a custom health endpoint to your AgentOS app. """ from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.anthropic import Claude from agno.os import AgentOS from agno.os.routers.health import get...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/customize/custom_lifespan.py
cookbook/06_agent_os/customize/custom_lifespan.py
""" Example AgentOS app where the agent has a custom lifespan. """ from contextlib import asynccontextmanager from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.anthropic import Claude from agno.os import AgentOS from agno.utils.log import log_info # Setup the database db = Postgre...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/customize/custom_fastapi_app.py
cookbook/06_agent_os/customize/custom_fastapi_app.py
""" Example AgentOS app with a custom FastAPI app with basic routes. You can also run this using the FastAPI cli (pip install fastapi["standard"]): ``` fastapi run custom_fastapi_app.py ``` """ from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.anthropic import Claude from agno.os i...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/customize/override_routes.py
cookbook/06_agent_os/customize/override_routes.py
""" Example AgentOS app with a custom FastAPI app with conflicting routes. This example demonstrates the `on_route_conflict="preserve_base_app"` functionality which allows your custom routes to take precedence over conflicting AgentOS routes. When `on_route_conflict="preserve_base_app"`: - Your custom routes (/, /hea...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/customize/__init__.py
cookbook/06_agent_os/customize/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/__init__.py
cookbook/06_agent_os/rbac/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/symmetric/with_cookie.py
cookbook/06_agent_os/rbac/symmetric/with_cookie.py
""" Basic RBAC Example with AgentOS This example demonstrates how to enable RBAC (Role-Based Access Control) with JWT token authentication in AgentOS using middleware with cookie-based tokens. Prerequisites: - Set JWT_VERIFICATION_KEY environment variable or pass it to middleware - Endpoints are automatically protect...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/symmetric/advanced_scopes.py
cookbook/06_agent_os/rbac/symmetric/advanced_scopes.py
""" Advanced RBAC Example with AgentOS - Simplified Scopes with Audience Verification This example demonstrates the AgentOS RBAC system with simplified scope format: Scope Format: 1. Global resource scopes: resource:action 2. Per-resource scopes: resource:<resource-id>:action 3. Wildcard support: resource:*:action S...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/symmetric/custom_scope_mappings.py
cookbook/06_agent_os/rbac/symmetric/custom_scope_mappings.py
""" Custom Scope Mappings Example This example demonstrates how to define custom scope mappings for your AgentOS endpoints. You can specify exactly which scopes are required for each endpoint. Pre-requisites: - Set JWT_VERIFICATION_KEY environment variable or pass it to middleware - Endpoints are automatically protec...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/symmetric/basic.py
cookbook/06_agent_os/rbac/symmetric/basic.py
""" Basic RBAC Example with AgentOS This example demonstrates how to enable RBAC (Role-Based Access Control) with JWT token authentication in AgentOS using middleware. Prerequisites: - Set JWT_VERIFICATION_KEY environment variable or pass it to middleware - Endpoints are automatically protected with default scope map...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/symmetric/agent_permissions.py
cookbook/06_agent_os/rbac/symmetric/agent_permissions.py
""" Per-Agent Permissions Example with AgentOS This example demonstrates how to define per-agent permission scopes to control which users can run which specific agents. Prerequisites: - Set JWT_VERIFICATION_KEY environment variable or pass it to middleware - Endpoints are automatically protected with default scope ma...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/asymmetric/custom_scope_mappings.py
cookbook/06_agent_os/rbac/asymmetric/custom_scope_mappings.py
""" Custom Scope Mappings Example This example demonstrates how to define custom scope mappings for your AgentOS endpoints. You can specify exactly which scopes are required for each endpoint. RS256 uses: - Private key: Used by your auth server to SIGN tokens - Public key: Used by AgentOS to VERIFY token signatures ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/rbac/asymmetric/basic.py
cookbook/06_agent_os/rbac/asymmetric/basic.py
""" Basic RBAC Example with AgentOS (Asymmetric Keys) This example demonstrates how to enable RBAC (Role-Based Access Control) with JWT token authentication using RS256 asymmetric keys. RS256 uses: - Private key: Used by your auth server to SIGN tokens - Public key: Used by AgentOS to VERIFY token signatures Prerequ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/01_basic_client.py
cookbook/06_agent_os/client/01_basic_client.py
""" Basic AgentOSClient Example This example demonstrates how to use AgentOSClient to connect to a remote AgentOS instance and perform basic operations. Prerequisites: 1. Start an AgentOS server: python -c " from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.os import AgentOS...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/02_run_agents.py
cookbook/06_agent_os/client/02_run_agents.py
""" Running Agents with AgentOSClient This example demonstrates how to execute agent runs using AgentOSClient, including both streaming and non-streaming responses. Prerequisites: 1. Start an AgentOS server with an agent 2. Run this script: python 02_run_agents.py """ import asyncio from agno.client import AgentOSC...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/06_run_teams.py
cookbook/06_agent_os/client/06_run_teams.py
""" Running Teams with AgentOSClient This example demonstrates how to execute team runs using AgentOSClient, including both streaming and non-streaming responses. Prerequisites: 1. Start an AgentOS server with a team configured 2. Run this script: python 06_run_teams.py """ import asyncio from agno.client import Ag...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/08_run_evals.py
cookbook/06_agent_os/client/08_run_evals.py
""" Running Evaluations with AgentOSClient This example demonstrates how to run and manage evaluations using AgentOSClient. Prerequisites: 1. Start an AgentOS server with agents 2. Run this script: python 08_run_evals.py """ import asyncio from agno.client import AgentOSClient from agno.db.schemas.evals import Eval...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/09_upload_content.py
cookbook/06_agent_os/client/09_upload_content.py
""" Uploading Content to Knowledge Base with AgentOSClient This example demonstrates how to upload documents and content to the knowledge base using AgentOSClient. Prerequisites: 1. Start an AgentOS server with knowledge base configured 2. Run this script: python 09_upload_content.py """ import asyncio from agno.cl...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/07_run_workflows.py
cookbook/06_agent_os/client/07_run_workflows.py
""" Running Workflows with AgentOSClient This example demonstrates how to execute workflow runs using AgentOSClient, including both streaming and non-streaming responses. Prerequisites: 1. Start an AgentOS server with a workflow configured 2. Run this script: python 07_run_workflows.py """ import asyncio from agno....
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/05_knowledge_search.py
cookbook/06_agent_os/client/05_knowledge_search.py
""" Knowledge Search with AgentOSClient This example demonstrates how to search the knowledge base using AgentOSClient. Prerequisites: 1. Start an AgentOS server with knowledge base configured 2. Upload some content to the knowledge base 3. Run this script: python 05_knowledge_search.py """ import asyncio from agno...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/__init__.py
cookbook/06_agent_os/client/__init__.py
"""AgentOSClient cookbook examples."""
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/04_session_management.py
cookbook/06_agent_os/client/04_session_management.py
""" Session Management with AgentOSClient This example demonstrates how to manage sessions using AgentOSClient. Prerequisites: 1. Start an AgentOS server with an agent 2. Run this script: python 04_session_management.py """ import asyncio from agno.client import AgentOSClient async def main(): client = AgentO...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/server.py
cookbook/06_agent_os/client/server.py
""" AgentOS Server for Cookbook Client Examples """ from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.team.team import ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/client/03_memory_operations.py
cookbook/06_agent_os/client/03_memory_operations.py
""" Memory Operations with AgentOSClient This example demonstrates how to manage user memories using AgentOSClient. Prerequisites: 1. Start an AgentOS server with an agent that has enable_user_memories=True 2. Run this script: python 03_memory_operations.py """ import asyncio from agno.client import AgentOSClient ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_parallel_and_custom_function_step_stream.py
cookbook/06_agent_os/workflow/workflow_with_parallel_and_custom_function_step_stream.py
from typing import AsyncIterator, Union from agno.agent import Agent from agno.db.in_memory import InMemoryDb from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.run.workflow import WorkflowRunOutputEvent from agno.tools.duckduckgo import DuckDuckGoTools ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_router.py
cookbook/06_agent_os/workflow/workflow_with_router.py
from typing import List from agno.agent.agent import Agent from agno.db.sqlite import SqliteDb # Import the workflows from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.router import Router from agno.workflow.step import S...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/basic_workflow.py
cookbook/06_agent_os/workflow/basic_workflow.py
from agno.agent.agent import Agent # Import the workflows from agno.db.sqlite import SqliteDb from agno.models.openai.chat import OpenAIChat from agno.os import AgentOS from agno.tools.hackernews import HackerNewsTools from agno.workflow.step import Step from agno.workflow.workflow import Workflow # Define agents hac...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_history.py
cookbook/06_agent_os/workflow/workflow_with_history.py
from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.workflow.step import Step, StepInput, StepOutput from agno.workflow.workflow import Workflow # Define specialized agents for meal planning conversation meal_suggester = Agent...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_loop.py
cookbook/06_agent_os/workflow/workflow_with_loop.py
from typing import List from agno.agent.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai.chat import OpenAIChat # Import the workflows from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.loop i...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/customer_research_workflow_parallel.py
cookbook/06_agent_os/workflow/customer_research_workflow_parallel.py
import json from datetime import datetime from typing import AsyncIterator, List, Union from agno.agent import Agent from agno.db.in_memory import InMemoryDb from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.run import RunContext from agno.run.workflow ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_custom_function_updating_session_state.py
cookbook/06_agent_os/workflow/workflow_with_custom_function_updating_session_state.py
from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.run import RunContext from agno.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.step im...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_conditional.py
cookbook/06_agent_os/workflow/workflow_with_conditional.py
from agno.agent.agent import Agent from agno.db.sqlite import SqliteDb # Import the workflows from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools from agno.workflow.condition import Condition from agno.workflow.step import Step from agno.workflow.types import StepInput from agno.workflow.work...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_parallel.py
cookbook/06_agent_os/workflow/workflow_with_parallel.py
from agno.agent.agent import Agent from agno.db.sqlite import SqliteDb # Import the workflows from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.parallel import Parallel from agno.workflow.step import Step from agno.workflo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_custom_function_stream.py
cookbook/06_agent_os/workflow/workflow_with_custom_function_stream.py
from typing import AsyncIterator, Union from agno.agent.agent import Agent from agno.db.in_memory import InMemoryDb # Import the workflows from agno.db.sqlite import SqliteDb from agno.models.openai.chat import OpenAIChat from agno.os import AgentOS from agno.team import Team from agno.tools.duckduckgo import DuckDuc...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_nested_steps.py
cookbook/06_agent_os/workflow/workflow_with_nested_steps.py
from typing import List from agno.agent.agent import Agent from agno.db.postgres import PostgresDb # Import the workflows from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.loop import Loop from agno.workflow.router import...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/__init__.py
cookbook/06_agent_os/workflow/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/basic_chat_workflow_agent.py
cookbook/06_agent_os/workflow/basic_chat_workflow_agent.py
"""Example demonstrating how to add a Workflow using a WorkflowAgent to your AgentOS""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.workflow import WorkflowAgent from agno.workflow.condition import Condition from a...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/basic_workflow_team.py
cookbook/06_agent_os/workflow/basic_workflow_team.py
from agno.agent.agent import Agent # Import the workflows from agno.db.sqlite import SqliteDb from agno.models.openai.chat import OpenAIChat from agno.os import AgentOS from agno.team.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_custom_function.py
cookbook/06_agent_os/workflow/workflow_with_custom_function.py
from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai import OpenAIChat from agno.os import AgentOS from agno.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.step import Step, StepInput, StepOu...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_input_schema.py
cookbook/06_agent_os/workflow/workflow_with_input_schema.py
from typing import List from agno.agent.agent import Agent # Import the workflows from agno.db.sqlite import SqliteDb from agno.models.openai.chat import OpenAIChat from agno.os import AgentOS from agno.team.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNew...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/06_agent_os/workflow/workflow_with_steps.py
cookbook/06_agent_os/workflow/workflow_with_steps.py
from agno.agent.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai.chat import OpenAIChat # Import the workflows from agno.os import AgentOS from agno.tools.duckduckgo import DuckDuckGoTools from agno.workflow.step import Step from agno.workflow.steps import Steps from agno.workflow.workflo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/__init__.py
cookbook/04_teams/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/team_with_local_agentic_rag.py
cookbook/04_teams/team_with_local_agentic_rag.py
""" pip install agno pip install fastembed, qdrant-client pip install ollama [ollama pull qwen2.5:7b] pip install pypdf """ from agno.agent import Agent from agno.embedder.fastembed import FastEmbedEmbedder from agno.knowledge.pdf_url import PDFUrlKnowledgeBase from agno.models.ollama import Ollama from agno.team impo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/async_flows/01_async_coordination_team.py
cookbook/04_teams/async_flows/01_async_coordination_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies 2. Run: `python cookbook/teams/async/modes/02_async_coordinate.py` to run the agent This example demonstrates a coordinated team of AI agents working together asynchronously to research topics across different platforms....
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/async_flows/__init__.py
cookbook/04_teams/async_flows/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/async_flows/03_async_respond_directly.py
cookbook/04_teams/async_flows/03_async_respond_directly.py
""" This example demonstrates a team of AI agents working together asynchronously to answer questions in different languages. The team consists of six specialized agents: 1. English Agent - Can only answer in English 2. Japanese Agent - Can only answer in Japanese 3. Chinese Agent - Can only answer in Chinese 4. Spani...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/async_flows/02_async_delegate_to_all_members.py
cookbook/04_teams/async_flows/02_async_delegate_to_all_members.py
""" This example demonstrates a collaborative team of AI agents working together to research topics across different platforms. The team consists of two specialized agents: 1. Reddit Researcher - Uses DuckDuckGo to find and analyze relevant Reddit posts 2. HackerNews Researcher - Uses HackerNews API to find and analyz...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/async_flows/04_concurrent_member_agents.py
cookbook/04_teams/async_flows/04_concurrent_member_agents.py
""" This example shows how a team will delegate to member agents concurrently. You should see both member agents starting at the same time, but finishing at different times. And you'll see the member events streaming concurrently. """ from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.te...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/share_member_interactions.py
cookbook/04_teams/state/share_member_interactions.py
from agno.agent.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.team.team import Team from agno.tools.duckduckgo import DuckDuckGoTools db = SqliteDb(db_file="tmp/agents.db") web_research_agent = Agent( name="Web Research Agent", model=OpenAIChat(id="...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/agentic_session_state.py
cookbook/04_teams/state/agentic_session_state.py
from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.team.team import Team db = SqliteDb(db_file="tmp/agents.db") shopping_agent = Agent( name="Shopping List Agent", role="Manage the shopping list", model=OpenAIChat(id="o3-mini"), db=db, ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/pass_state_to_members.py
cookbook/04_teams/state/pass_state_to_members.py
from agno.agent import Agent from agno.db.in_memory import InMemoryDb from agno.models.openai import OpenAIChat from agno.team.team import Team agent = Agent( role="User Advisor", description="You answer questions related to the user.", model=OpenAIChat(id="gpt-4o-mini"), instructions="User's name is {...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/team_with_nested_shared_state.py
cookbook/04_teams/state/team_with_nested_shared_state.py
""" This example demonstrates the nested Team functionality in a hierarchical team structure. Each team and agent has a clearly defined role that guides their behavior and specialization: Team Hierarchy & Roles: ├── Shopping List Team (Orchestrator) │ Role: "Orchestrate comprehensive shopping list management and mea...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/session_state_in_instructions.py
cookbook/04_teams/state/session_state_in_instructions.py
from agno.team.team import Team team = Team( members=[], # Initialize the session state with a variable session_state={"user_name": "John"}, instructions="Users name is {user_name}", markdown=True, ) team.print_response("What is my name?", stream=True)
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/__init__.py
cookbook/04_teams/state/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/change_state_on_run.py
cookbook/04_teams/state/change_state_on_run.py
from agno.db.in_memory import InMemoryDb from agno.models.openai import OpenAIChat from agno.team.team import Team team = Team( db=InMemoryDb(), model=OpenAIChat(id="gpt-4o-mini"), members=[], instructions="Users name is {user_name} and age is {age}", ) # Sets the session state for the session with th...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/state/overwrite_stored_session_state.py
cookbook/04_teams/state/overwrite_stored_session_state.py
"""This example demonstrates how to overwrite the stored session_state with the session_state provided in the run.""" from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.team.team import Team # Create an Team that maintains state team = Team( model=OpenAIChat(id="gpt-4o-mini"),...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/tools/03_async_team_with_tools.py
cookbook/04_teams/tools/03_async_team_with_tools.py
""" This example demonstrates how to create an async team with various tools for information gathering. The team uses multiple agents with different tools (Wikipedia, DuckDuckGo, AgentQL) to gather comprehensive information about a company asynchronously. """ import asyncio from uuid import uuid4 from agno.agent.age...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/tools/02_team_with_tool_hooks.py
cookbook/04_teams/tools/02_team_with_tool_hooks.py
""" This example demonstrates how to use tool hooks with teams and agents. Tool hooks allow you to intercept and monitor tool function calls, providing logging, timing, and other observability features. """ import time from typing import Any, Callable, Dict from uuid import uuid4 from agno.agent.agent import Agent f...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/tools/01_team_with_custom_tools.py
cookbook/04_teams/tools/01_team_with_custom_tools.py
""" This example demonstrates how to create a team with custom tools. The team uses custom tools alongside agent tools to answer questions from a knowledge base and fall back to web search when needed. """ from agno.agent import Agent from agno.team.team import Team from agno.tools import tool from agno.tools.duckduc...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/tools/__init__.py
cookbook/04_teams/tools/__init__.py
""" Tools-related team examples. """
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/tools/04_tool_hooks_for_members.py
cookbook/04_teams/tools/04_tool_hooks_for_members.py
""" This example demonstrates how to use tool hooks with teams and agents. Tool hooks allow you to intercept and monitor tool function calls, providing logging, timing, and other observability features. """ from typing import Any, Callable, Dict from agno.agent.agent import Agent from agno.models.anthropic.claude im...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/streaming/02_events.py
cookbook/04_teams/streaming/02_events.py
import asyncio from uuid import uuid4 from agno.agent import RunEvent from agno.agent.agent import Agent from agno.models.anthropic.claude import Claude # from agno.models.mistral.mistral import MistralChat from agno.models.openai.chat import OpenAIChat from agno.team import Team, TeamRunEvent from agno.tools.duckduc...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/streaming/01_team_streaming.py
cookbook/04_teams/streaming/01_team_streaming.py
""" This example demonstrates streaming responses from a team. The team uses specialized agents with financial tools to provide real-time stock information with streaming output. """ from typing import Iterator # noqa from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.team.team import T...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/streaming/03_async_team_streaming.py
cookbook/04_teams/streaming/03_async_team_streaming.py
""" This example demonstrates asynchronous streaming responses from a team. The team uses specialized agents with financial tools to provide real-time stock information with async streaming output. """ import asyncio from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.team.team import Te...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/streaming/04_async_team_events.py
cookbook/04_teams/streaming/04_async_team_events.py
""" This example demonstrates how to handle and monitor team events asynchronously. Shows how to capture and respond to various events during async team execution, including tool calls, run states, and content generation events. """ import asyncio from uuid import uuid4 from agno.agent import RunEvent from agno.agen...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/streaming/__init__.py
cookbook/04_teams/streaming/__init__.py
""" Streaming-related team examples. """
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/knowledge/02_team_with_knowledge_filters.py
cookbook/04_teams/knowledge/02_team_with_knowledge_filters.py
""" This example demonstrates how to use knowledge filters with teams. Knowledge filters allow you to restrict knowledge searches to specific documents or metadata criteria, enabling personalized and contextual responses. """ from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.knowle...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/knowledge/04_team_with_custom_retriever_dependencies.py
cookbook/04_teams/knowledge/04_team_with_custom_retriever_dependencies.py
""" Example demonstrating Team with custom knowledge retriever and dependencies. This cookbook shows how to: 1. Use a custom knowledge retriever with a Team 2. Pass dependencies to team.run() 3. Access dependencies in the custom retriever function This demonstrates the fix for issue #5594 - custom retrievers can now ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/knowledge/__init__.py
cookbook/04_teams/knowledge/__init__.py
""" Knowledge-related team examples. """
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/knowledge/03_team_with_agentic_knowledge_filters.py
cookbook/04_teams/knowledge/03_team_with_agentic_knowledge_filters.py
""" This example demonstrates how to use agentic knowledge filters with teams. Agentic knowledge filters allow the AI to dynamically determine which documents to search based on the query context, rather than using predefined filters. """ from agno.agent import Agent from agno.knowledge.knowledge import Knowledge fro...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/knowledge/01_team_with_knowledge.py
cookbook/04_teams/knowledge/01_team_with_knowledge.py
""" This example demonstrates how to create a team with knowledge base integration. The team has access to a knowledge base with Agno documentation and can combine this knowledge with web search capabilities. """ from pathlib import Path from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIE...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/hooks/output_stream_hook_send_notification.py
cookbook/04_teams/hooks/output_stream_hook_send_notification.py
""" Example demonstrating sending a notification to the user after a team generates a response. It uses a post-hook which executes right after the response is processed. """ import asyncio from typing import Any, Dict from agno.models.openai import OpenAIChat from agno.run.team import TeamRunOutput from agno.team im...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/hooks/output_transformation_post_hook.py
cookbook/04_teams/hooks/output_transformation_post_hook.py
""" Example demonstrating output transformation using post-hooks with Agno Teams. This example shows how to: 1. Transform team responses by updating TeamRunOutput.content 2. Add team-specific formatting, coordination summaries, and structure 3. Enhance collaboration visibility and response organization 4. Aggregate in...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/hooks/input_transformation_pre_hook.py
cookbook/04_teams/hooks/input_transformation_pre_hook.py
""" Example demonstrating how to use pre_hook and post_hook with Agno Teams. This example shows how to: 1. Pre-hook: Comprehensive input transformation using an AI agent 2. Transform input to be more relevant to the team's collective purpose 3. Leverage team context for better input preparation """ from typing import...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/hooks/input_validation_pre_hook.py
cookbook/04_teams/hooks/input_validation_pre_hook.py
""" Example demonstrating how to use pre_hook for comprehensive input validation with Agno Teams. This example shows how to validate inputs specifically for team-based scenarios: 1. Validate input is appropriate for team collaboration 2. Check if the request can benefit from multiple perspectives 3. Ensure sufficient ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/hooks/__init__.py
cookbook/04_teams/hooks/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/hooks/output_validation_post_hook.py
cookbook/04_teams/hooks/output_validation_post_hook.py
""" Example demonstrating output validation using post-hooks with Agno Teams. This example shows how to: 1. Validate team responses for quality, coordination, and completeness 2. Ensure team outputs meet collaboration standards 3. Check for consistency between team member contributions 4. Raise OutputCheckError when t...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/metrics/01_team_metrics.py
cookbook/04_teams/metrics/01_team_metrics.py
""" This example demonstrates how to access and analyze team metrics. Shows how to retrieve detailed metrics for team execution, including message-level metrics, session metrics, and member-specific metrics. Prerequisites: 1. Run: cookbook/run_pgvector.sh (to start PostgreSQL) 2. Ensure PostgreSQL is running on local...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/metrics/__init__.py
cookbook/04_teams/metrics/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/memory/02_team_with_agentic_memory.py
cookbook/04_teams/memory/02_team_with_agentic_memory.py
""" This example shows you how to use persistent memory with an Agent. During each run the Agent can create/update/delete user memories. To enable this, set `enable_agentic_memory=True` in the Agent config. """ from agno.agent.agent import Agent from agno.db.postgres import PostgresDb from agno.memory import MemoryM...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/memory/01_team_with_memory_manager.py
cookbook/04_teams/memory/01_team_with_memory_manager.py
""" This example shows you how to use persistent memory with an Agent. After each run, user memories are created/updated. To enable this, set `enable_user_memories=True` in the Agent config. """ from uuid import uuid4 from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.memory import Memor...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/memory/__init__.py
cookbook/04_teams/memory/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/guardrails/prompt_injection.py
cookbook/04_teams/guardrails/prompt_injection.py
""" Example demonstrating how to use checks with Agno Team to implement guardrails. This example shows how to: 1. An input validation check that checks for prompt injection """ from agno.exceptions import InputCheckError from agno.guardrails import PromptInjectionGuardrail from agno.models.openai import OpenAIChat fr...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/guardrails/__init__.py
cookbook/04_teams/guardrails/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/guardrails/openai_moderation.py
cookbook/04_teams/guardrails/openai_moderation.py
""" Example demonstrating how to use OpenAI moderation guardrails with Agno Team. This example shows how to: 1. Detect and block content that violates OpenAI's content policy 2. Handle both text and image content moderation 3. Configure moderation for specific categories 4. Use both sync and async moderation checks 5....
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/guardrails/pii_detection.py
cookbook/04_teams/guardrails/pii_detection.py
""" Example demonstrating how to use PII detection guardrails with Agno Team. This example shows how to: 1. Detect and block personally identifiable information (PII) in input 2. Protect sensitive data like SSNs, credit cards, emails, and phone numbers 3. Handle different types of PII violations with appropriate error...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/dependencies/access_dependencies_in_tool.py
cookbook/04_teams/dependencies/access_dependencies_in_tool.py
""" Example showing how team tools can access dependencies passed to the team. This demonstrates: 1. Passing dependencies to team.run() 2. A team tool that receives resolved dependencies 3. Team members working together with shared data sources """ from datetime import datetime from typing import Any, Dict, Optional ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/dependencies/add_dependencies_to_context.py
cookbook/04_teams/dependencies/add_dependencies_to_context.py
from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.team import Team def get_user_profile(user_id: str = "john_doe") -> dict: """Get user profile information that can be referenced in responses.""" profiles = { "john_doe": { "name": "John Doe", "pre...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/dependencies/add_dependencies_on_run.py
cookbook/04_teams/dependencies/add_dependencies_on_run.py
from agno.models.openai import OpenAIChat from agno.team import Team def get_user_profile(user_id: str = "john_doe") -> dict: """Get user profile information that can be referenced in responses.""" profiles = { "john_doe": { "name": "John Doe", "preferences": { ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/dependencies/reference_dependencies.py
cookbook/04_teams/dependencies/reference_dependencies.py
from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.team import Team def get_user_profile(user_id: str = "john_doe") -> dict: """Get user profile information that can be referenced in responses.""" profiles = { "john_doe": { "name": "John Doe", "pre...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/dependencies/add_dependencies_to_member_context.py
cookbook/04_teams/dependencies/add_dependencies_to_member_context.py
from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.team import Team def get_user_profile(user_id: str = "john_doe") -> dict: """Get user profile information that can be referenced in responses.""" profiles = { "john_doe": { "name": "John Doe", "pre...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/04_teams/dependencies/__init__.py
cookbook/04_teams/dependencies/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false