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/11_models/cohere/retry.py
cookbook/11_models/cohere/retry.py
"""Example demonstrating how to set up retries with Cohere.""" from agno.agent import Agent from agno.models.cohere import CohereChat # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "cohere-wrong-id" agent = Agent( model=CohereChat( id=wrong_model_id, retries=3, ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/cohere/__init__.py
cookbook/11_models/cohere/__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/11_models/cohere/image_agent_local_file.py
cookbook/11_models/cohere/image_agent_local_file.py
from pathlib import Path from agno.agent import Agent from agno.media import Image from agno.models.cohere.chat import Cohere from agno.utils.media import download_image agent = Agent( model=Cohere(id="c4ai-aya-vision-8b"), markdown=True, ) image_path = Path(__file__).parent.joinpath("sample.jpg") download_...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/cohere/structured_output.py
cookbook/11_models/cohere/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.cohere import Cohere from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster movie."...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/cohere/async_structured_output.py
cookbook/11_models/cohere/async_structured_output.py
import asyncio from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.cohere import Cohere from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a bloc...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/cohere/async_basic.py
cookbook/11_models/cohere/async_basic.py
""" Basic async example using Cohere. """ import asyncio from agno.agent import Agent from agno.models.cohere import Cohere agent = Agent( model=Cohere(id="command-a-03-2025"), markdown=True, ) asyncio.run(agent.aprint_response("Share a 2 sentence horror story"))
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/image_agent.py
cookbook/11_models/lmstudio/image_agent.py
import httpx from agno.agent import Agent from agno.media import Image from agno.models.lmstudio import LMStudio agent = Agent( model=LMStudio(id="llama3.2-vision"), markdown=True, ) response = httpx.get( "https://upload.wikimedia.org/wikipedia/commons/0/0c/GoldenGateBridge-001.jpg" ) agent.print_respons...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/tool_use_stream.py
cookbook/11_models/lmstudio/tool_use_stream.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.lmstudio import LMStudio from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=LMStudio(id="qwen2.5-7b-instruct-1m"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/memory.py
cookbook/11_models/lmstudio/memory.py
""" This recipe shows how to use personalized memories and summaries in an agent. Steps: 1. Run: `./cookbook/scripts/run_pgvector.sh` to start a postgres container with pgvector 2. Run: `pip install ollama sqlalchemy 'psycopg[binary]' pgvector` to install the dependencies 3. Run: `python cookbook/models/lmstudio/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/11_models/lmstudio/db.py
cookbook/11_models/lmstudio/db.py
"""Run `pip install ddgs sqlalchemy` to install dependencies.""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.lmstudio import LMStudio from agno.tools.duckduckgo import DuckDuckGoTools # Setup the database db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = PostgresDb...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/basic_stream.py
cookbook/11_models/lmstudio/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.lmstudio import LMStudio agent = Agent(model=LMStudio(id="qwen2.5-7b-instruct-1m"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence horror ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/knowledge.py
cookbook/11_models/lmstudio/knowledge.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf openai ollama` to install dependencies.""" from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.lmstudio import LMStudio from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowl...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/tool_use.py
cookbook/11_models/lmstudio/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.lmstudio import LMStudio from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=LMStudio(id="qwen2.5-7b-instruct-1m"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/basic.py
cookbook/11_models/lmstudio/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.lmstudio import LMStudio agent = Agent(model=LMStudio(id="qwen2.5-7b-instruct-1m"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response in the termina...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/retry.py
cookbook/11_models/lmstudio/retry.py
"""Example demonstrating how to set up retries with LM Studio.""" from agno.agent import Agent from agno.models.lmstudio import LMStudio # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "lmstudio-wrong-id" agent = Agent( model=LMStudio( id=wrong_model_id, retries=...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/lmstudio/__init__.py
cookbook/11_models/lmstudio/__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/11_models/lmstudio/structured_output.py
cookbook/11_models/lmstudio/structured_output.py
from typing import List from agno.agent import Agent from agno.models.lmstudio import LMStudio from agno.run.agent import RunOutput from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): name: str = Field(..., description="Give a name to this movie") settin...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/data_analyst.py
cookbook/11_models/langdb/data_analyst.py
"""Run `pip install duckdb` to install dependencies.""" from textwrap import dedent from agno.agent import Agent from agno.models.langdb import LangDB from agno.tools.duckdb import DuckDbTools duckdb_tools = DuckDbTools( create_tables=False, export_tables=False, summarize_tables=False ) duckdb_tools.create_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/11_models/langdb/finance_agent.py
cookbook/11_models/langdb/finance_agent.py
"""Run `pip install yfinance` to install dependencies.""" from agno.agent import Agent from agno.models.langdb import LangDB from agno.tools.yfinance import YFinanceTools agent = Agent( model=LangDB(id="llama3-1-70b-instruct-v1.0"), tools=[YFinanceTools()], description="You are an investment analyst that ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/web_search.py
cookbook/11_models/langdb/web_search.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.langdb import LangDB from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=LangDB(id="llama3-1-70b-instruct-v1.0"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats h...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/agent_stream.py
cookbook/11_models/langdb/agent_stream.py
"""Run `pip install yfinance` to install dependencies.""" from typing import Iterator # noqa from agno.agent import Agent, RunOutput # noqa from agno.models.langdb import LangDB from agno.tools.yfinance import YFinanceTools agent = Agent( model=LangDB(id="gemini-1.5-pro-latest"), tools=[YFinanceTools()], ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/basic_stream.py
cookbook/11_models/langdb/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutput # noqa from agno.models.langdb import LangDB agent = Agent( model=LangDB(id="llama3-1-70b-instruct-v1.0"), markdown=True, ) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence hor...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/basic.py
cookbook/11_models/langdb/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.langdb import LangDB agent = Agent(model=LangDB(id="llama3-1-70b-instruct-v1.0"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response in the terminal ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/retry.py
cookbook/11_models/langdb/retry.py
"""Example demonstrating how to set up retries with LangDB.""" from agno.agent import Agent from agno.models.langdb import LangDB # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "langdb-wrong-id" agent = Agent( model=LangDB( id=wrong_model_id, retries=3, # Numbe...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/__init__.py
cookbook/11_models/langdb/__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/11_models/langdb/agent.py
cookbook/11_models/langdb/agent.py
"""Run `pip install yfinance` to install dependencies.""" from agno.agent import Agent, RunOutput # noqa from agno.models.langdb import LangDB from agno.tools.yfinance import YFinanceTools agent = Agent( model=LangDB(id="gpt-4o"), tools=[YFinanceTools()], instructions=["Use tables where possible."], ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/langdb/structured_output.py
cookbook/11_models/langdb/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.langdb import LangDB from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster movie."...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/huggingface/tool_use_stream.py
cookbook/11_models/huggingface/tool_use_stream.py
from agno.agent import Agent from agno.models.huggingface import HuggingFace from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=HuggingFace(id="openai/gpt-oss-120b"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("What is the latest news on AI?", 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/11_models/huggingface/basic_stream.py
cookbook/11_models/huggingface/basic_stream.py
from agno.agent import Agent from agno.models.huggingface import HuggingFace agent = Agent( model=HuggingFace(id="openai/gpt-oss-120b", max_tokens=4096, temperature=0), ) agent.print_response( "What is meaning of life and then recommend 5 best books to read about it", 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/11_models/huggingface/tool_use.py
cookbook/11_models/huggingface/tool_use.py
from agno.agent import Agent from agno.models.huggingface import HuggingFace from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=HuggingFace(id="openai/gpt-oss-120b"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("What is the latest news on 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/11_models/huggingface/basic.py
cookbook/11_models/huggingface/basic.py
from agno.agent import Agent from agno.models.huggingface import HuggingFace agent = Agent( model=HuggingFace( id="mistralai/Mistral-7B-Instruct-v0.2", max_tokens=4096, temperature=0 ), ) agent.print_response( "What is meaning of life and then recommend 5 best books to read about it" )
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/huggingface/async_basic_stream.py
cookbook/11_models/huggingface/async_basic_stream.py
import asyncio from agno.agent import Agent from agno.models.huggingface import HuggingFace agent = Agent( model=HuggingFace(id="openai/gpt-oss-120b", max_tokens=4096, temperature=0), ) asyncio.run( agent.aprint_response( "What is meaning of life and then recommend 5 best books to read about it", ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/huggingface/retry.py
cookbook/11_models/huggingface/retry.py
"""Example demonstrating how to set up retries with Hugging Face.""" from agno.agent import Agent from agno.models.huggingface import HuggingFace # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "huggingface-wrong-id" agent = Agent( model=HuggingFace( id=wrong_model_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/11_models/huggingface/__init__.py
cookbook/11_models/huggingface/__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/11_models/huggingface/llama_essay_writer.py
cookbook/11_models/huggingface/llama_essay_writer.py
from agno.agent import Agent from agno.models.huggingface import HuggingFace agent = Agent( model=HuggingFace( id="openai/gpt-oss-120b", max_tokens=4096, ), description="You are an essay writer. Write a 300 words essay on topic that will be provided by user", ) agent.print_response("topic: ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/huggingface/async_basic.py
cookbook/11_models/huggingface/async_basic.py
import asyncio from agno.agent import Agent from agno.models.huggingface import HuggingFace agent = Agent( model=HuggingFace(id="openai/gpt-oss-120b", max_tokens=4096, temperature=0), ) asyncio.run( agent.aprint_response( "What is meaning of life and then recommend 5 best books to read about it" )...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/openrouter/async_tool_use.py
cookbook/11_models/openrouter/async_tool_use.py
"""Run `pip install ddgs` to install dependencies.""" import asyncio from agno.agent import Agent from agno.models.openrouter import OpenRouter from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=OpenRouter(id="openai/gpt-4o"), tools=[DuckDuckGoTools()], markdown=True, ) asyncio.run(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/11_models/openrouter/basic_stream.py
cookbook/11_models/openrouter/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.openrouter import OpenRouter agent = Agent(model=OpenRouter(id="gpt-4o"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence horror story", st...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/openrouter/tool_use.py
cookbook/11_models/openrouter/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.openrouter import OpenRouter from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=OpenRouter(id="gpt-4o"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats happening...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/openrouter/basic.py
cookbook/11_models/openrouter/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.openrouter import OpenRouter agent = Agent(model=OpenRouter(id="gpt-4o"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response in the terminal agent.pr...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/openrouter/async_basic_stream.py
cookbook/11_models/openrouter/async_basic_stream.py
import asyncio from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.openrouter import OpenRouter agent = Agent(model=OpenRouter(id="gpt-4o"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence h...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/openrouter/dynamic_model_router.py
cookbook/11_models/openrouter/dynamic_model_router.py
""" This example demonstrates how to use dynamic model router with OpenRouter. Dynamic models provide automatic failover when the primary model encounters: - Rate limits - Timeouts - Unavailability - Model overload OpenRouter will automatically try the models defined in order until one succeeds. """ from agno.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/11_models/openrouter/retry.py
cookbook/11_models/openrouter/retry.py
"""Example demonstrating how to set up retries with OpenRouter.""" from agno.agent import Agent from agno.models.openrouter import OpenRouter # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "openrouter-wrong-id" agent = Agent( model=OpenRouter( id=wrong_model_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/11_models/openrouter/__init__.py
cookbook/11_models/openrouter/__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/11_models/openrouter/structured_output.py
cookbook/11_models/openrouter/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.openrouter import OpenRouter from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/openrouter/async_basic.py
cookbook/11_models/openrouter/async_basic.py
import asyncio from agno.agent import Agent, RunOutput # noqa from agno.models.openrouter import OpenRouter agent = Agent(model=OpenRouter(id="gpt-4o"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response in the 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/11_models/siliconflow/basic_stream.py
cookbook/11_models/siliconflow/basic_stream.py
from agno.agent import Agent, RunOutputEvent # noqa from agno.models.siliconflow import Siliconflow agent = Agent(model=Siliconflow(id="openai/gpt-oss-120b"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Explain quantum computing in simple terms", 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/11_models/siliconflow/tool_use.py
cookbook/11_models/siliconflow/tool_use.py
"""Run `pip install duckduckgo-search` to install dependencies.""" from agno.agent import Agent from agno.models.siliconflow import Siliconflow from agno.tools.duckduckgo import DuckDuckGoTools """ The current version of the siliconflow-chat model's Function Calling capability is stable and supports tool integration ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/siliconflow/async_basic_streaming.py
cookbook/11_models/siliconflow/async_basic_streaming.py
""" Basic streaming async example using siliconflow. """ import asyncio from agno.agent import Agent from agno.models.siliconflow import Siliconflow agent = Agent( model=Siliconflow(id="openai/gpt-oss-120b"), markdown=True, ) asyncio.run(agent.aprint_response("Share a 2 sentence horror story", 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/11_models/siliconflow/basic.py
cookbook/11_models/siliconflow/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.siliconflow import Siliconflow agent = Agent(model=Siliconflow(id="openai/gpt-oss-120b"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Explain quantum computing in simple terms") # print(run.content) # Print the respons...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/siliconflow/retry.py
cookbook/11_models/siliconflow/retry.py
"""Example demonstrating how to set up retries with SiliconFlow.""" from agno.agent import Agent from agno.models.siliconflow import SiliconFlow # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "siliconflow-wrong-id" agent = Agent( model=SiliconFlow( id=wrong_model_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/11_models/siliconflow/__init__.py
cookbook/11_models/siliconflow/__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/11_models/siliconflow/structured_output.py
cookbook/11_models/siliconflow/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.siliconflow import Siliconflow from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbust...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/retry.py
cookbook/11_models/aws/retry.py
"""Example demonstrating how to set up retries with AWS Bedrock.""" from agno.agent import Agent from agno.models.aws import AwsBedrock # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "aws-bedrock-wrong-id" agent = Agent( model=AwsBedrock( id=wrong_model_id, retr...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/__init__.py
cookbook/11_models/aws/__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/11_models/aws/claude/image_agent.py
cookbook/11_models/aws/claude/image_agent.py
from agno.agent import Agent from agno.media import Image from agno.models.aws import Claude from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response( "Tell me ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/claude/tool_use_stream.py
cookbook/11_models/aws/claude/tool_use_stream.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.aws import Claude from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), tools=[DuckDuckGoTools()], markdown=True, ) agent.prin...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/claude/db.py
cookbook/11_models/aws/claude/db.py
"""Run `pip install ddgs sqlalchemy anthropic` to install dependencies.""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.aws import Claude from agno.tools.duckduckgo import DuckDuckGoTools # Setup the database db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" 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/11_models/aws/claude/async_tool_use.py
cookbook/11_models/aws/claude/async_tool_use.py
""" Async example using Claude with tool calls. """ import asyncio from agno.agent import Agent from agno.models.aws import Claude from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), tools=[DuckDuckGoTools()], markdown=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/11_models/aws/claude/basic_stream.py
cookbook/11_models/aws/claude/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.aws import Claude agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), markdown=True ) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Sha...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/claude/knowledge.py
cookbook/11_models/aws/claude/knowledge.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf openai anthropic` to install dependencies.""" from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.aws import Claude from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowledge...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/claude/tool_use.py
cookbook/11_models/aws/claude/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.aws import Claude from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), tools=[DuckDuckGoTools()], markdown=True, ) agent.prin...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/claude/basic.py
cookbook/11_models/aws/claude/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.aws import Claude agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), markdown=True ) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print 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/11_models/aws/claude/async_basic_stream.py
cookbook/11_models/aws/claude/async_basic_stream.py
import asyncio from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.aws import Claude agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), markdown=True ) # Get the response in a variable # run_response: Iterator[RunOutputEvent] ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/claude/__init__.py
cookbook/11_models/aws/claude/__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/11_models/aws/claude/structured_output.py
cookbook/11_models/aws/claude/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.aws import Claude from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster movie." ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/claude/async_basic.py
cookbook/11_models/aws/claude/async_basic.py
import asyncio from agno.agent import Agent, RunOutput # noqa from agno.models.aws import Claude agent = Agent( model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"), markdown=True ) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.conten...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/bedrock/image_agent_bytes.py
cookbook/11_models/aws/bedrock/image_agent_bytes.py
from pathlib import Path from agno.agent import Agent from agno.media import Image from agno.models.aws import AwsBedrock from agno.tools.duckduckgo import DuckDuckGoTools from agno.utils.media import download_image agent = Agent( model=AwsBedrock(id="amazon.nova-pro-v1:0"), tools=[DuckDuckGoTools()], mar...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/bedrock/tool_use_stream.py
cookbook/11_models/aws/bedrock/tool_use_stream.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.aws import AwsBedrock from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=AwsBedrock(id="amazon.nova-lite-v1:0"), tools=[DuckDuckGoTools()], instructions="You are a helpful assistant that...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/bedrock/basic_stream.py
cookbook/11_models/aws/bedrock/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.aws import AwsBedrock agent = Agent(model=AwsBedrock(id="mistral.mistral-small-2402-v1:0"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/bedrock/async_tool_use_stream.py
cookbook/11_models/aws/bedrock/async_tool_use_stream.py
"""Run `pip install ddgs` to install dependencies.""" import asyncio from agno.agent import Agent from agno.models.aws import AwsBedrock from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=AwsBedrock(id="amazon.nova-lite-v1:0"), tools=[DuckDuckGoTools()], instructions="You are a helpfu...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/bedrock/tool_use.py
cookbook/11_models/aws/bedrock/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.aws import AwsBedrock from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=AwsBedrock(id="mistral.mistral-large-2402-v1:0"), tools=[DuckDuckGoTools()], instructions="You are a helpful assi...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/bedrock/basic.py
cookbook/11_models/aws/bedrock/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.aws import AwsBedrock agent = Agent(model=AwsBedrock(id="mistral.mistral-small-2402-v1:0"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response in 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/11_models/aws/bedrock/async_basic_stream.py
cookbook/11_models/aws/bedrock/async_basic_stream.py
import asyncio from agno.agent import Agent from agno.models.aws import AwsBedrock agent = Agent(model=AwsBedrock(id="mistral.mistral-small-2402-v1:0"), markdown=True) # Print the response in the terminal asyncio.run(agent.aprint_response("Share a 2 sentence horror story", 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/11_models/aws/bedrock/pdf_agent_bytes.py
cookbook/11_models/aws/bedrock/pdf_agent_bytes.py
from pathlib import Path from agno.agent import Agent from agno.media import File from agno.models.aws import AwsBedrock from agno.utils.media import download_file pdf_path = Path(__file__).parent.joinpath("ThaiRecipes.pdf") download_file( "https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf", str(pdf_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/11_models/aws/bedrock/__init__.py
cookbook/11_models/aws/bedrock/__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/11_models/aws/bedrock/structured_output.py
cookbook/11_models/aws/bedrock/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.aws import AwsBedrock from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster movie....
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/aws/bedrock/async_basic.py
cookbook/11_models/aws/bedrock/async_basic.py
import asyncio from agno.agent import Agent, RunOutput # noqa from agno.models.aws import AwsBedrock agent = Agent(model=AwsBedrock(id="mistral.mistral-small-2402-v1:0"), markdown=True) # Print the response in the terminal asyncio.run(agent.aprint_response("Share a 2 sentence horror story"))
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vercel/image_agent.py
cookbook/11_models/vercel/image_agent.py
from agno.agent import Agent from agno.media import Image from agno.models.vercel import V0 from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=V0(id="v0-1.0-md"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response( "Tell me about this image and give me the latest news...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vercel/async_tool_use.py
cookbook/11_models/vercel/async_tool_use.py
"""Run `pip install ddgs` to install dependencies.""" import asyncio from agno.agent import Agent from agno.models.vercel import V0 from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=V0(id="v0-1.0-md"), tools=[DuckDuckGoTools()], markdown=True, ) asyncio.run(agent.aprint_response("Wha...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vercel/basic_stream.py
cookbook/11_models/vercel/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutput # noqa from agno.models.vercel import V0 agent = Agent(model=V0(id="v0-1.0-md"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence horror story", stream=True) # for chunk...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vercel/knowledge.py
cookbook/11_models/vercel/knowledge.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.vercel import V0 from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowledge = Knowledge( vector_db=PgVector(table_n...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vercel/tool_use.py
cookbook/11_models/vercel/tool_use.py
"""Build a Web Search Agent using xAI.""" from agno.agent import Agent from agno.models.vercel import V0 from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=V0(id="v0-1.0-md"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats happening in France?", 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/11_models/vercel/basic.py
cookbook/11_models/vercel/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.vercel import V0 agent = Agent(model=V0(id="v0-1.0-md"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response in the terminal agent.print_response("Sha...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vercel/async_basic_stream.py
cookbook/11_models/vercel/async_basic_stream.py
import asyncio from typing import Iterator # noqa from agno.agent import Agent, RunOutput # noqa from agno.models.vercel import V0 agent = Agent(model=V0(id="v0-1.0-md"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence horror story", stream=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/11_models/vercel/retry.py
cookbook/11_models/vercel/retry.py
"""Example demonstrating how to set up retries with Vercel AI.""" from agno.agent import Agent from agno.models.vercel import v0 # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "vercel-wrong-id" agent = Agent( model=v0( id=wrong_model_id, retries=3, # Number of ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vercel/__init__.py
cookbook/11_models/vercel/__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/11_models/vercel/async_basic.py
cookbook/11_models/vercel/async_basic.py
import asyncio from agno.agent import Agent, RunOutput # noqa from agno.models.vercel import V0 agent = Agent(model=V0(id="v0-1.0-md"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response in the terminal asyncio.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/11_models/nebius/tool_use_stream.py
cookbook/11_models/nebius/tool_use_stream.py
from agno.agent import Agent from agno.models.nebius import Nebius from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nebius(id="Qwen/Qwen3-30B-A3B"), tools=[DuckDuckGoTools()], markdown=True, ) # Print the response in the terminal agent.print_response("Whats happening in France?", str...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/nebius/db.py
cookbook/11_models/nebius/db.py
"""Run `pip install ddgs sqlalchemy cerebras_cloud_sdk` to install dependencies.""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.nebius import Nebius from agno.tools.duckduckgo import DuckDuckGoTools # Setup the database db_url = "postgresql+psycopg://ai:ai@localhost:5532/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/11_models/nebius/async_tool_use.py
cookbook/11_models/nebius/async_tool_use.py
import asyncio from agno.agent import Agent from agno.models.nebius import Nebius from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nebius(id="Qwen/Qwen3-30B-A3B"), tools=[DuckDuckGoTools()], markdown=True, ) asyncio.run(agent.aprint_response("Whats happening in France?"))
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/nebius/basic_stream.py
cookbook/11_models/nebius/basic_stream.py
from agno.agent import Agent from agno.models.nebius import Nebius agent = Agent( model=Nebius(), markdown=True, ) # Print the response in the terminal agent.print_response("write a two sentence horror story", 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/11_models/nebius/knowledge.py
cookbook/11_models/nebius/knowledge.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf cerebras_cloud_sdk` to install dependencies.""" from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.nebius import Nebius from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" know...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/nebius/async_tool_use_stream.py
cookbook/11_models/nebius/async_tool_use_stream.py
import asyncio from agno.agent import Agent from agno.models.nebius import Nebius from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nebius(id="Qwen/Qwen3-30B-A3B"), tools=[DuckDuckGoTools()], markdown=True, ) asyncio.run(agent.aprint_response("Whats happening in France?", 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/11_models/nebius/tool_use.py
cookbook/11_models/nebius/tool_use.py
from agno.agent import Agent from agno.models.nebius import Nebius from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nebius(id="Qwen/Qwen3-30B-A3B"), tools=[DuckDuckGoTools()], markdown=True, ) # Print the response in the terminal agent.print_response("Whats happening in France?")
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/nebius/basic.py
cookbook/11_models/nebius/basic.py
from agno.agent import Agent from agno.models.nebius import Nebius agent = Agent( model=Nebius(), markdown=True, ) # Print the response in the terminal agent.print_response("write a two sentence horror story")
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/nebius/async_basic_stream.py
cookbook/11_models/nebius/async_basic_stream.py
import asyncio from agno.agent import Agent from agno.models.nebius import Nebius agent = Agent( model=Nebius(), markdown=True, ) # Print the response in the terminal asyncio.run(agent.aprint_response("write a two sentence horror story", 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/11_models/nebius/retry.py
cookbook/11_models/nebius/retry.py
"""Example demonstrating how to set up retries with Nebius.""" from agno.agent import Agent from agno.models.nebius import Nebius # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "nebius-wrong-id" agent = Agent( model=Nebius( id=wrong_model_id, retries=3, # Numbe...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/nebius/__init__.py
cookbook/11_models/nebius/__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/11_models/nebius/structured_output.py
cookbook/11_models/nebius/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.nebius import Nebius from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster movie."...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false