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/12_evals/agent_as_judge/agent_as_judge_custom_evaluator.py
cookbook/12_evals/agent_as_judge/agent_as_judge_custom_evaluator.py
"""Using a custom evaluator agent instead of the default judge.""" from agno.agent import Agent from agno.eval.agent_as_judge import AgentAsJudgeEval from agno.models.openai import OpenAIChat agent = Agent( model=OpenAIChat(id="gpt-4o"), instructions="Explain technical concepts simply.", ) response = agent.r...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/12_evals/agent_as_judge/__init__.py
cookbook/12_evals/agent_as_judge/__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/12_evals/agent_as_judge/agent_as_judge_post_hook_async.py
cookbook/12_evals/agent_as_judge/agent_as_judge_post_hook_async.py
"""Async AgentAsJudgeEval as post-hook example.""" import asyncio from agno.agent import Agent from agno.db.sqlite import AsyncSqliteDb from agno.eval.agent_as_judge import AgentAsJudgeEval from agno.models.openai import OpenAIChat async def main(): # Setup database to persist eval results db = AsyncSqliteD...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/12_evals/agent_as_judge/agent_as_judge_basic.py
cookbook/12_evals/agent_as_judge/agent_as_judge_basic.py
"""Basic AgentAsJudgeEval usage with numeric scoring (1-10) and on_fail callback.""" from agno.agent import Agent from agno.db.postgres.postgres import PostgresDb from agno.eval.agent_as_judge import AgentAsJudgeEval, AgentAsJudgeEvaluation from agno.models.openai import OpenAIChat def on_evaluation_failure(evaluati...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/12_evals/agent_as_judge/agent_as_judge_binary.py
cookbook/12_evals/agent_as_judge/agent_as_judge_binary.py
"""Binary scoring mode example - PASS/FAIL evaluation.""" from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.eval.agent_as_judge import AgentAsJudgeEval from agno.models.openai import OpenAIChat # Setup database to persist eval results db = SqliteDb(db_file="tmp/agent_as_judge_binary.db") 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/12_evals/agent_as_judge/agent_as_judge_batch.py
cookbook/12_evals/agent_as_judge/agent_as_judge_batch.py
"""Batch evaluation example - evaluate multiple cases at once.""" from agno.db.sqlite import SqliteDb from agno.eval.agent_as_judge import AgentAsJudgeEval # Setup database to persist eval results db = SqliteDb(db_file="tmp/agent_as_judge_batch.db") evaluation = AgentAsJudgeEval( name="Customer Service Quality",...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/run.py
cookbook/01_demo/run.py
"""Minimal demo of the AgentOS.""" from pathlib import Path from agents.agno_knowledge_agent import agno_knowledge_agent from agents.agno_mcp_agent import agno_mcp_agent from agents.deep_knowledge_agent import deep_knowledge_agent from agents.finance_agent import finance_agent from agents.memory_manager import memory...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/db.py
cookbook/01_demo/db.py
# ============================================================================ # Configure database for storing sessions, memories, metrics, evals and knowledge # ============================================================================ from agno.db.postgres import PostgresDb # Used for Knowledge VectorDB db_url = ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/__init__.py
cookbook/01_demo/__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/01_demo/workflows/research_workflow.py
cookbook/01_demo/workflows/research_workflow.py
from textwrap import dedent from typing import Dict, List, Optional from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.tools.parallel import ParallelTools from agno.tools.reasoning import R...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/workflows/db.py
cookbook/01_demo/workflows/db.py
# ============================================================================ # Configure database for storing sessions, memories, metrics, evals and knowledge # ============================================================================ from agno.db.postgres import PostgresDb # Used for Knowledge VectorDB db_url = ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/workflows/__init__.py
cookbook/01_demo/workflows/__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/01_demo/teams/db.py
cookbook/01_demo/teams/db.py
# ============================================================================ # Configure database for storing sessions, memories, metrics, evals and knowledge # ============================================================================ from agno.db.postgres import PostgresDb # Used for Knowledge VectorDB db_url = ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/teams/finance_team.py
cookbook/01_demo/teams/finance_team.py
from textwrap import dedent from agents.finance_agent import finance_agent from agents.research_agent import research_agent from agno.models.anthropic import Claude from agno.team.team import Team from agno.tools.reasoning import ReasoningTools from db import demo_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/01_demo/teams/__init__.py
cookbook/01_demo/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/01_demo/agents/finance_agent.py
cookbook/01_demo/agents/finance_agent.py
from textwrap import dedent from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.tools.yfinance import YFinanceTools from db import demo_db # ============================================================================ # Description & Instructions # ========================================...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/db.py
cookbook/01_demo/agents/db.py
# ============================================================================ # Configure database for storing sessions, memories, metrics, evals and knowledge # ============================================================================ from agno.db.postgres import PostgresDb # Used for Knowledge VectorDB db_url = ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/self_learning_agent.py
cookbook/01_demo/agents/self_learning_agent.py
import json from datetime import datetime, timezone from typing import Optional from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.text_reader import TextReader from agno.models.openai import OpenAIResponses 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/01_demo/agents/agno_mcp_agent.py
cookbook/01_demo/agents/agno_mcp_agent.py
from textwrap import dedent from agno.agent import Agent from agno.models.anthropic import Claude from agno.tools.mcp import MCPTools from db import demo_db # ============================================================================ # Description & Instructions # ===================================================...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/youtube_agent.py
cookbook/01_demo/agents/youtube_agent.py
from textwrap import dedent from agno.agent import Agent from agno.models.anthropic import Claude from agno.tools.youtube import YouTubeTools from db import demo_db # ============================================================================ # Description & Instructions # ===========================================...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/agno_knowledge_agent.py
cookbook/01_demo/agents/agno_knowledge_agent.py
from textwrap import dedent from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.anthropic import Claude from agno.vectordb.pgvector import PgVector, SearchType from db import db_url, demo_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/01_demo/agents/memory_manager.py
cookbook/01_demo/agents/memory_manager.py
from textwrap import dedent from agno.agent import Agent from agno.models.anthropic import Claude from db import demo_db # ============================================================================ # Description & Instructions # ============================================================================ descriptio...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/deep_knowledge_agent.py
cookbook/01_demo/agents/deep_knowledge_agent.py
from textwrap import dedent from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai import OpenAIResponses from agno.tools.reasoning import ReasoningTools from agno.vectordb.pgvector import PgVector, SearchType from d...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/research_agent.py
cookbook/01_demo/agents/research_agent.py
from textwrap import dedent from agno.agent import Agent from agno.models.anthropic import Claude from agno.tools.parallel import ParallelTools from db import demo_db # ============================================================================ # Description & Instructions # =========================================...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/__init__.py
cookbook/01_demo/agents/__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/01_demo/agents/reasoning_research_agent.py
cookbook/01_demo/agents/reasoning_research_agent.py
from textwrap import dedent from agno.agent import Agent from agno.models.anthropic import Claude from agno.tools.parallel import ParallelTools from agno.tools.reasoning import ReasoningTools from db import demo_db # ============================================================================ # Description & Instruct...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/self_learning_research_agent.py
cookbook/01_demo/agents/self_learning_research_agent.py
import json from datetime import datetime, timezone from typing import Optional from agno.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.text_reader import TextReader from agno.models.openai import OpenAIResponses 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/01_demo/agents/sql/sql_agent.py
cookbook/01_demo/agents/sql/sql_agent.py
import json from typing import Optional from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.text_reader import TextReader from agno.models.anthropic import Claude from 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/01_demo/agents/sql/load_sql_knowledge.py
cookbook/01_demo/agents/sql/load_sql_knowledge.py
from pathlib import Path from agno.utils.log import logger from sql_agent import sql_agent_knowledge # ============================================================================ # Path to SQL Agent Knowledge # ============================================================================ cwd = Path(__file__).parent k...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/01_demo/agents/sql/__init__.py
cookbook/01_demo/agents/sql/__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/01_demo/agents/sql/load_f1_data.py
cookbook/01_demo/agents/sql/load_f1_data.py
from io import StringIO import pandas as pd import requests from agno.utils.log import logger from sqlalchemy import create_engine db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db_engine = create_engine(db_url) s3_uri = "https://agno-public.s3.amazonaws.com/f1" # List of files and their corresponding table...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/03_chat_history.py
cookbook/07_database/03_chat_history.py
from agno.agent.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai import OpenAIChat db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = PostgresDb(db_url=db_url, session_table="sessions") agent = Agent( model=OpenAIChat(id="gpt-4o-mini"), db=db, session_id="chat_...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/02_session_summary.py
cookbook/07_database/02_session_summary.py
from agno.agent.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai import OpenAIChat from agno.session.summary import SessionSummaryManager # noqa: F401 # Set up Postgres database db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = PostgresDb(db_url=db_url, session_table="sess...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/01_persistent_session_storage.py
cookbook/07_database/01_persistent_session_storage.py
from agno.agent.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai import OpenAIChat from agno.team.team import Team # Set up Postgres database db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = PostgresDb(db_url=db_url, session_table="sessions") agent = Agent(name="test_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/07_database/__init__.py
cookbook/07_database/__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/07_database/postgres/postgres_for_team.py
cookbook/07_database/postgres/postgres_for_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies 2. Run: `python cookbook/storage/postgres_storage/postgres_storage_for_team.py` to run the team """ from typing import List from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai 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/07_database/postgres/postgres_for_workflow.py
cookbook/07_database/postgres/postgres_for_workflow.py
from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai import OpenAIChat from agno.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.step import Step from agno.workflow.workflow import Workflow d...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/postgres/__init__.py
cookbook/07_database/postgres/__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/07_database/postgres/postgres_for_agent.py
cookbook/07_database/postgres/postgres_for_agent.py
"""Use Postgres as the database for an agent. Run `pip install ddgs sqlalchemy openai` to install dependencies.""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.tools.duckduckgo import DuckDuckGoTools db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = PostgresDb(db_url=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/07_database/postgres/async_postgres/async_postgres_for_agent.py
cookbook/07_database/postgres/async_postgres/async_postgres_for_agent.py
"""Use Postgres as the database for an agent. Run `pip install openai ddgs sqlalchemy psycopg` to install dependencies.""" import asyncio from agno.agent import Agent from agno.db.postgres import AsyncPostgresDb from agno.tools.duckduckgo import DuckDuckGoTools db_url = "postgresql+psycopg_async://ai:ai@localhost: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/07_database/postgres/async_postgres/async_postgres_for_team.py
cookbook/07_database/postgres/async_postgres/async_postgres_for_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies 2. Run: `python cookbook/db/async_postgres/async_postgres_for_team.py` to run the team """ import asyncio from typing import List from agno.agent import Agent from agno.db.postgres import AsyncPostgresDb from agno.model...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/postgres/async_postgres/async_postgres_for_workflow.py
cookbook/07_database/postgres/async_postgres/async_postgres_for_workflow.py
import asyncio from agno.agent import Agent from agno.db.postgres import AsyncPostgresDb from agno.models.openai import OpenAIChat from agno.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.step import Step from agno.workflow.workfl...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/postgres/async_postgres/__init__.py
cookbook/07_database/postgres/async_postgres/__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/07_database/sqlite/sqlite_for_team.py
cookbook/07_database/sqlite/sqlite_for_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies 2. Run: `python cookbook/storage/sqlite_storage/sqlite_storage_for_team.py` to run the team """ from typing import List from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai import Ope...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/sqlite/sqlite_for_workflow.py
cookbook/07_database/sqlite/sqlite_for_workflow.py
from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat from agno.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.step import Step from agno.workflow.workflow import Workflow 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/07_database/sqlite/__init__.py
cookbook/07_database/sqlite/__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/07_database/sqlite/sqlite_for_agent.py
cookbook/07_database/sqlite/sqlite_for_agent.py
"""Use SQLite as the database for an Agent. Run `pip install ddgs sqlalchemy openai` to install dependencies. """ from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.tools.duckduckgo import DuckDuckGoTools # Setup the SQLite database db = SqliteDb(db_file="tmp/data.db") # Setup a basic 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/07_database/sqlite/async_sqlite/async_sqlite_for_workflow.py
cookbook/07_database/sqlite/async_sqlite/async_sqlite_for_workflow.py
""" Run: `pip install openai ddgs sqlalchemy aiosqlite` to install dependencies Run: `python cookbook/db/async_sqlite/async_sqlite_for_workflow.py` to run the workflow """ import asyncio from agno.agent import Agent from agno.db.sqlite import AsyncSqliteDb from agno.models.openai import OpenAIChat 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/07_database/sqlite/async_sqlite/async_sqlite_for_agent.py
cookbook/07_database/sqlite/async_sqlite/async_sqlite_for_agent.py
"""Use SQLite as the database for an agent. Run `pip install openai ddgs sqlalchemy aiosqlite` to install dependencies.""" import asyncio from agno.agent import Agent from agno.db.sqlite import AsyncSqliteDb from agno.tools.duckduckgo import DuckDuckGoTools # Initialize AsyncSqliteDb db = AsyncSqliteDb(db_file="tmp...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/sqlite/async_sqlite/async_sqlite_for_team.py
cookbook/07_database/sqlite/async_sqlite/async_sqlite_for_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno sqlalchemy aiosqlite` to install the dependencies 2. Run: `python cookbook/db/async_sqlite/async_sqlite_for_team.py` to run the team """ import asyncio from typing import List from agno.agent import Agent from agno.db.sqlite import AsyncSqliteDb 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/07_database/sqlite/async_sqlite/__init__.py
cookbook/07_database/sqlite/async_sqlite/__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/07_database/json_db/json_for_agent.py
cookbook/07_database/json_db/json_for_agent.py
""" Use JSON files as the database for an Agent. Useful for simple demos where performance is not critical. Run `pip install ddgs openai` to install dependencies.""" from agno.agent import Agent from agno.db.json import JsonDb from agno.models.openai import OpenAIChat 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/07_database/json_db/__init__.py
cookbook/07_database/json_db/__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/07_database/json_db/json_for_workflows.py
cookbook/07_database/json_db/json_for_workflows.py
""" Use JSON files as the database for a Workflow. Useful for simple demos where performance is not critical. Run `pip install ddgs openai` to install dependencies. """ from agno.agent import Agent from agno.db.json import JsonDb from agno.models.openai import OpenAIChat from agno.team import Team from agno.tools.duc...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/json_db/json_for_team.py
cookbook/07_database/json_db/json_for_team.py
""" Use JSON files as the database for a Team. Useful for simple demos where performance is not critical. Run `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies """ from typing import List from agno.agent import Agent from agno.db.json import JsonDb from agno.models.openai 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/07_database/redis/redis_for_team.py
cookbook/07_database/redis/redis_for_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies 2. Run: `python cookbook/storage/json_storage/json_storage_for_team.py` to run the team We can start Redis locally using docker: 1. Start Redis container docker run --name my-redis -p 6379:6379 -d redis 2. Verify contai...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/redis/redis_for_agent.py
cookbook/07_database/redis/redis_for_agent.py
""" Example showing how to use Redis as the database for an agent. Run `pip install redis ddgs openai` to install dependencies. We can start Redis locally using docker: 1. Start Redis container docker run --name my-redis -p 6379:6379 -d redis 2. Verify container is running docker ps """ from agno.agent import 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/07_database/redis/redis_for_workflow.py
cookbook/07_database/redis/redis_for_workflow.py
from agno.agent import Agent from agno.db.redis import RedisDb from agno.models.openai import OpenAIChat from agno.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.hackernews import HackerNewsTools from agno.workflow.step import Step from agno.workflow.workflow import Workflow # Defin...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/redis/__init__.py
cookbook/07_database/redis/__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/07_database/mysql/mysql_for_team.py
cookbook/07_database/mysql/mysql_for_team.py
"""Use MySQL as the database for a team. Run `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies """ from typing import List from agno.agent import Agent from agno.db.mysql import MySQLDb from agno.models.openai import OpenAIChat from agno.team import Team from agno.tools.duckduckg...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/mysql/mysql_for_agent.py
cookbook/07_database/mysql/mysql_for_agent.py
"""Use MySQL as the database for an agent. Run `pip install openai` to install dependencies.""" from agno.agent import Agent from agno.db.mysql import MySQLDb db_url = "mysql+pymysql://ai:ai@localhost:3306/ai" db = MySQLDb(db_url=db_url) agent = Agent( db=db, add_history_to_context=True, ) agent.print_resp...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/mysql/__init__.py
cookbook/07_database/mysql/__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/07_database/mysql/async_mysql/async_mysql_for_agent.py
cookbook/07_database/mysql/async_mysql/async_mysql_for_agent.py
"""Use Async MySQL as the database for an agent. Run `pip install openai duckduckgo-search sqlalchemy asyncmy agno` to install dependencies. """ import asyncio import uuid from agno.agent import Agent from agno.db.base import SessionType from agno.db.mysql import AsyncMySQLDb 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/07_database/mysql/async_mysql/__init__.py
cookbook/07_database/mysql/async_mysql/__init__.py
# Async MySQL integration 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/07_database/mysql/async_mysql/async_mysql_for_team.py
cookbook/07_database/mysql/async_mysql/async_mysql_for_team.py
"""Use Async MySQL as the database for a team. Run `pip install openai duckduckgo-search newspaper4k lxml_html_clean agno sqlalchemy asyncmy` to install the dependencies """ import asyncio import uuid from typing import List from agno.agent import Agent from agno.db.base import SessionType from agno.db.mysql import 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/07_database/mysql/async_mysql/async_mysql_for_workflow.py
cookbook/07_database/mysql/async_mysql/async_mysql_for_workflow.py
"""Use Async MySQL as the database for a workflow. Run `pip install openai duckduckgo-search sqlalchemy asyncmy agno` to install dependencies. """ import asyncio import uuid from typing import List from agno.agent import Agent from agno.db.base import SessionType from agno.db.mysql import AsyncMySQLDb from agno.tools...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/gcs/gcs_json_for_agent.py
cookbook/07_database/gcs/gcs_json_for_agent.py
import uuid import google.auth from agno.agent import Agent from agno.db.base import SessionType from agno.db.gcs_json import GcsJsonDb from agno.tools.duckduckgo import DuckDuckGoTools DEBUG_MODE = False # Obtain the default credentials and project id from your gcloud CLI session. credentials, project_id = google.au...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/gcs/__init__.py
cookbook/07_database/gcs/__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/07_database/dynamodb/dynamo_for_team.py
cookbook/07_database/dynamodb/dynamo_for_team.py
"""Use DynamoDb as the database for a team. Set the following environment variables to connect to your DynamoDb instance: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_REGION Or pass those parameters when initializing the DynamoDb instance. Run `pip install openai ddgs newspaper4k lxml_html_clean agno` to instal...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/dynamodb/dynamo_for_agent.py
cookbook/07_database/dynamodb/dynamo_for_agent.py
"""Use DynamoDb as the database for an agent. Set the following environment variables to connect to your DynamoDb instance: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_REGION Run `pip install boto3` to install dependencies.""" from agno.agent import Agent from agno.db import DynamoDb # Setup the DynamoDB data...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/dynamodb/__init__.py
cookbook/07_database/dynamodb/__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/07_database/in_memory/in_memory_storage_for_team.py
cookbook/07_database/in_memory/in_memory_storage_for_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies 2. Run: `python cookbook/storage/in_memory_storage/in_memory_storage_for_team.py` to run the team """ from typing import List from agno.agent import Agent from agno.db.in_memory import InMemoryDb from agno.models.openai...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/in_memory/in_memory_storage_for_agent.py
cookbook/07_database/in_memory/in_memory_storage_for_agent.py
"""Run `pip install ddgs openai` to install dependencies.""" from agno.agent import Agent from agno.db.in_memory import InMemoryDb # Setup the in-memory database db = InMemoryDb() # Setup the agent and pass the database agent = Agent(db=db) # The Agent sessions will now be stored in the in-memory database agent.pri...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/in_memory/in_memory_storage_for_workflow.py
cookbook/07_database/in_memory/in_memory_storage_for_workflow.py
""" Use JSON files as the database for a Workflow. Useful for simple demos where performance is not critical. Run `pip install ddgs openai` to install dependencies. """ from agno.agent import Agent from agno.db.in_memory import InMemoryDb from agno.models.openai import OpenAIChat from agno.team import Team 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/07_database/in_memory/__init__.py
cookbook/07_database/in_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/07_database/mongo/mongodb_for_agent.py
cookbook/07_database/mongo/mongodb_for_agent.py
"""Use MongoDb as the database for an agent. Run `pip install openai pymongo` to install dependencies Run a local MongoDB server using: ```bash docker run -d \ --name local-mongo \ -p 27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=mongoadmin \ -e MONGO_INITDB_ROOT_PASSWORD=secret \ mongo ``` or use our script:...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/mongo/__init__.py
cookbook/07_database/mongo/__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/07_database/mongo/mongodb_for_team.py
cookbook/07_database/mongo/mongodb_for_team.py
""" Use MongoDb as the database for a team. Run `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies Run a local MongoDB server using: ```bash docker run -d \ --name local-mongo \ -p 27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=mongoadmin \ -e MONGO_INITDB_ROOT_PASSWORD=secret...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/mongo/async_mongo/async_mongodb_for_team.py
cookbook/07_database/mongo/async_mongo/async_mongodb_for_team.py
""" Use AsyncMongoDb as the database for a team. Run `pip install openai ddgs newspaper4k lxml_html_clean pymongo motor agno` to install the dependencies Run a local MongoDB server using: ```bash docker run -d \ --name local-mongo \ -p 27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=mongoadmin \ -e MONGO_INITDB_R...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/mongo/async_mongo/__init__.py
cookbook/07_database/mongo/async_mongo/__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/07_database/mongo/async_mongo/async_mongodb_for_agent.py
cookbook/07_database/mongo/async_mongo/async_mongodb_for_agent.py
"""Use AsyncMongoDb as the database for an agent. Run `pip install openai pymongo motor` to install dependencies Run a local MongoDB server using: ```bash docker run -d \ --name local-mongo \ -p 27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=mongoadmin \ -e MONGO_INITDB_ROOT_PASSWORD=secret \ mongo ``` or use ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/mongo/async_mongo/async_mongodb_for_workflow.py
cookbook/07_database/mongo/async_mongo/async_mongodb_for_workflow.py
""" Run: `pip install openai ddgs pymongo motor` to install dependencies Run: `python cookbook/db/mongo/async_mongo/async_mongodb_for_workflow.py` to run the workflow Run a local MongoDB server using: ```bash docker run -d \ --name local-mongo \ -p 27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=mongoadmin \ -e MO...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/examples/multi_user_multi_session.py
cookbook/07_database/examples/multi_user_multi_session.py
from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai import OpenAIChat db = SqliteDb(db_file="tmp/data.db") agent = Agent( model=OpenAIChat(id="gpt-4o-mini"), db=db, enable_user_memories=True, add_history_to_context=True, num_history_runs=3, ) user_1_id = "user...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/examples/selecting_tables.py
cookbook/07_database/examples/selecting_tables.py
"""Use SQLite as the database for an Agent, selecting custom names for the tables. Run `pip install ddgs sqlalchemy openai` to install dependencies. """ from agno.agent import Agent from agno.db.sqlite import SqliteDb # Setup the SQLite database db = SqliteDb( db_file="tmp/data.db", # Selecting which tables ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/examples/__init__.py
cookbook/07_database/examples/__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/07_database/surrealdb/surrealdb_for_agent.py
cookbook/07_database/surrealdb/surrealdb_for_agent.py
r""" Run SurrealDB in a container before running this script ``` docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start --user root --pass root ``` or with ``` surreal start -u root -p root ``` Then, run this test like this: ``` uv run cookbook/db/surrealdb/surrealdb_for_agent.py ``` """ from...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/surrealdb/surrealdb_for_team.py
cookbook/07_database/surrealdb/surrealdb_for_team.py
r""" Run SurrealDB in a container before running this script ``` docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start --user root --pass root ``` or with ``` surreal start -u root -p root ``` Then: 1. Run: `pip install anthropic ddgs newspaper4k lxml_html_clean surrealdb agno` to install the...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/surrealdb/surrealdb_for_workflow.py
cookbook/07_database/surrealdb/surrealdb_for_workflow.py
r""" Run SurrealDB in a container before running this script ``` docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start --user root --pass root ``` or with ``` surreal start -u root -p root ``` Then: 1. Run: `pip install anthropic ddgs newspaper4k lxml_html_clean surrealdb agno` to install the...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/surrealdb/__init__.py
cookbook/07_database/surrealdb/__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/07_database/firestore/firestore_for_agent.py
cookbook/07_database/firestore/firestore_for_agent.py
""" This recipe shows how to store agent sessions in a Firestore database. Steps: 1. Ensure your gcloud project is enabled with Firestore. Reference https://cloud.google.com/firestore/docs/create-database-server-client-library ? 2. Run: `pip install openai google-cloud-firestore agno` to install dependencies 3. Make 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/07_database/firestore/__init__.py
cookbook/07_database/firestore/__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/07_database/singlestore/singlestore_for_team.py
cookbook/07_database/singlestore/singlestore_for_team.py
""" 1. Run: `pip install openai ddgs newspaper4k lxml_html_clean agno` to install the dependencies 2. Run: `python cookbook/storage/singlestore_storage/singlestore_storage_for_team.py` to run the team """ from os import getenv from typing import List from agno.agent import Agent from agno.db.singlestore.singlestore 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/07_database/singlestore/singlestore_for_agent.py
cookbook/07_database/singlestore/singlestore_for_agent.py
"""Use SingleStore as the database for an agent. Run `pip install ddgs sqlalchemy openai` to install dependencies.""" from os import getenv from agno.agent import Agent from agno.db.singlestore.singlestore import SingleStoreDb from agno.tools.duckduckgo import DuckDuckGoTools # Configure SingleStore DB connection U...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/07_database/singlestore/__init__.py
cookbook/07_database/singlestore/__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/09_memory/08_memory_tools.py
cookbook/09_memory/08_memory_tools.py
""" Here is a tool with reasoning capabilities to allow agents to manage user memories. 1. Run: `pip install openai agno lancedb tantivy sqlalchemy` to install the dependencies 2. Export your OPENAI_API_KEY 3. Run: `python cookbook/reasoning/tools/knowledge_tools.py` to run the agent """ import asyncio from agno.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/09_memory/07_share_memory_and_history_between_agents.py
cookbook/09_memory/07_share_memory_and_history_between_agents.py
from uuid import uuid4 from agno.agent import Agent from agno.db.sqlite import SqliteDb from agno.models.openai.chat import OpenAIChat db = SqliteDb(db_file="tmp/agent_sessions.db") session_id = str(uuid4()) user_id = "john_doe@example.com" agent_1 = Agent( model=OpenAIChat(id="gpt-4o-mini"), instructions="...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/09_memory/03_agents_share_memory.py
cookbook/09_memory/03_agents_share_memory.py
""" In this example, we have two agents that share the same memory. """ from agno.agent.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai import OpenAIChat from agno.tools.duckduckgo import DuckDuckGoTools from rich.pretty import pprint db_url = "postgresql+psycopg://ai:ai@localhost: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/09_memory/05_multi_user_multi_session_chat.py
cookbook/09_memory/05_multi_user_multi_session_chat.py
""" This example demonstrates how to run a multi-user, multi-session chat. In this example, we have 3 users and 4 sessions. User 1 has 2 sessions. User 2 has 1 session. User 3 has 1 session. """ import asyncio from agno.agent.agent import Agent from agno.db.postgres import PostgresDb from agno.models.openai 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/09_memory/02_agentic_memory.py
cookbook/09_memory/02_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.models.openai 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/09_memory/__init__.py
cookbook/09_memory/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false