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/requesty/structured_output.py
cookbook/11_models/requesty/structured_output.py
from typing import List from agno.agent import Agent from agno.models.requesty import Requesty from pydantic import BaseModel, Field class MovieScript(BaseModel): setting: str = Field( ..., description="Provide a nice setting for a blockbuster movie." ) ending: str = Field( ..., 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/11_models/requesty/async_basic.py
cookbook/11_models/requesty/async_basic.py
import asyncio from agno.agent import Agent, RunOutput # noqa from agno.models.requesty import Requesty agent = Agent(model=Requesty(id="openai/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 ...
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/ibm/retry.py
cookbook/11_models/ibm/retry.py
"""Example demonstrating how to set up retries with IBM WatsonX.""" from agno.agent import Agent from agno.models.ibm import WatsonX # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "watsonx-wrong-id" agent = Agent( model=WatsonX( 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/ibm/__init__.py
cookbook/11_models/ibm/__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/ibm/watsonx/image_agent_bytes.py
cookbook/11_models/ibm/watsonx/image_agent_bytes.py
from pathlib import Path from agno.agent import Agent from agno.media import Image from agno.models.ibm import WatsonX agent = Agent( model=WatsonX(id="meta-llama/llama-3-2-11b-vision-instruct"), markdown=True, ) image_path = Path(__file__).parent.joinpath("sample.jpg") # Read the image file content as byte...
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/ibm/watsonx/db.py
cookbook/11_models/ibm/watsonx/db.py
"""Run `pip install ddgs sqlalchemy ibm-watsonx-ai` to install dependencies.""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.ibm import WatsonX from agno.tools.duckduckgo import DuckDuckGoTools # Setup the database db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = 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/ibm/watsonx/async_tool_use.py
cookbook/11_models/ibm/watsonx/async_tool_use.py
""" Async example using Claude with tool calls. """ import asyncio from agno.agent import Agent from agno.models.ibm import WatsonX from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=WatsonX(id="mistralai/mistral-small-3-1-24b-instruct-2503"), 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/ibm/watsonx/basic_stream.py
cookbook/11_models/ibm/watsonx/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.ibm import WatsonX agent = Agent( model=WatsonX(id="mistralai/mistral-small-3-1-24b-instruct-2503"), markdown=True ) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Shar...
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/ibm/watsonx/knowledge.py
cookbook/11_models/ibm/watsonx/knowledge.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf openai ibm-watsonx-ai` to install dependencies.""" from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.ibm import WatsonX from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" kno...
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/ibm/watsonx/tool_use.py
cookbook/11_models/ibm/watsonx/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.ibm import WatsonX from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=WatsonX(id="mistralai/mistral-small-3-1-24b-instruct-2503"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print...
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/ibm/watsonx/basic.py
cookbook/11_models/ibm/watsonx/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.ibm import WatsonX agent = Agent( model=WatsonX(id="mistralai/mistral-small-3-1-24b-instruct-2503"), markdown=True ) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the 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/ibm/watsonx/async_basic_stream.py
cookbook/11_models/ibm/watsonx/async_basic_stream.py
import asyncio from agno.agent import Agent, RunOutputEvent # noqa from agno.models.ibm import WatsonX agent = Agent( model=WatsonX(id="mistralai/mistral-small-3-1-24b-instruct-2503"), debug_mode=True, markdown=True, ) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run...
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/ibm/watsonx/__init__.py
cookbook/11_models/ibm/watsonx/__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/ibm/watsonx/structured_output.py
cookbook/11_models/ibm/watsonx/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.ibm import WatsonX 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/ibm/watsonx/async_basic.py
cookbook/11_models/ibm/watsonx/async_basic.py
import asyncio from agno.agent import Agent, RunOutput # noqa from agno.models.ibm import WatsonX agent = Agent( model=WatsonX(id="mistralai/mistral-small-3-1-24b-instruct-2503"), markdown=True ) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content...
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/together/image_agent.py
cookbook/11_models/together/image_agent.py
from agno.agent import Agent from agno.media import Image from agno.models.together import Together agent = Agent( model=Together(id="meta-llama/Llama-Vision-Free"), markdown=True, ) agent.print_response( "Tell me about this image", images=[ Image( url="https://upload.wikimedia.org...
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/together/image_agent_bytes.py
cookbook/11_models/together/image_agent_bytes.py
from pathlib import Path from agno.agent import Agent from agno.media import Image from agno.models.together import Together agent = Agent( model=Together(id="meta-llama/Llama-Vision-Free"), markdown=True, ) image_path = Path(__file__).parent.joinpath("sample.jpg") # Read the image file content as bytes ima...
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/together/tool_use_stream.py
cookbook/11_models/together/tool_use_stream.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.together import Together from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), tools=[DuckDuckGoTools()], markdown=True, ) 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/together/async_tool_use.py
cookbook/11_models/together/async_tool_use.py
"""Run `pip install ddgs` to install dependencies.""" import asyncio from agno.agent import Agent from agno.models.together import Together from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), tools=[DuckDuckGoTools()], markdow...
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/together/basic_stream.py
cookbook/11_models/together/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.together import Together agent = Agent( model=Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), markdown=True ) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run(...
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/together/image_agent_with_memory.py
cookbook/11_models/together/image_agent_with_memory.py
from agno.agent import Agent from agno.media import Image from agno.models.together import Together agent = Agent( model=Together(id="meta-llama/Llama-Vision-Free"), markdown=True, add_history_to_context=True, num_history_runs=3, ) agent.print_response( "Tell me about this image", images=[ ...
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/together/reasoning_agent.py
cookbook/11_models/together/reasoning_agent.py
from agno.agent import Agent from agno.models.together import Together agent = Agent( model=Together( id="Qwen/Qwen3-235B-A22B-Thinking-2507", ), reasoning=True, ) agent.print_response("How many r are in the word 'strawberry'?", show_reasoning=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/together/tool_use.py
cookbook/11_models/together/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.together import Together from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), tools=[DuckDuckGoTools()], markdown=True, ) 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/together/basic.py
cookbook/11_models/together/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.together import Together agent = Agent( model=Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), markdown=True ) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print ...
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/together/async_basic_stream.py
cookbook/11_models/together/async_basic_stream.py
import asyncio from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.together import Together agent = Agent( model=Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), markdown=True ) # Get the response in a variable # run_response: Iterator[RunOutputEve...
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/together/retry.py
cookbook/11_models/together/retry.py
"""Example demonstrating how to set up retries with Together.""" from agno.agent import Agent from agno.models.together import Together # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "together-wrong-id" agent = Agent( model=Together( 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/together/__init__.py
cookbook/11_models/together/__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/together/structured_output.py
cookbook/11_models/together/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.together import Together 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 mov...
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/together/async_basic.py
cookbook/11_models/together/async_basic.py
import asyncio from agno.agent import Agent, RunOutput # noqa from agno.models.together import Together agent = Agent( model=Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), markdown=True ) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.co...
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/groq/image_agent.py
cookbook/11_models/groq/image_agent.py
from agno.agent import Agent from agno.media import Image from agno.models.groq import Groq agent = Agent(model=Groq(id="meta-llama/llama-4-scout-17b-16e-instruct")) agent.print_response( "Tell me about this image", images=[ Image(url="https://upload.wikimedia.org/wikipedia/commons/f/f2/LPU-v1-die.jpg...
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/groq/metrics.py
cookbook/11_models/groq/metrics.py
from agno.agent import Agent, RunOutput from agno.models.groq import Groq from agno.tools.yfinance import YFinanceTools from agno.utils.pprint import pprint_run_response from rich.pretty import pprint agent = Agent( model=Groq(id="llama-3.3-70b-versatile"), tools=[YFinanceTools()], markdown=True, ) run_ou...
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/groq/db.py
cookbook/11_models/groq/db.py
"""Run `pip install ddgs sqlalchemy groq` to install dependencies.""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.groq import Groq from agno.tools.duckduckgo import DuckDuckGoTools # Setup the database db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" db = PostgresDb(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/11_models/groq/async_tool_use.py
cookbook/11_models/groq/async_tool_use.py
"""Please install dependencies using: pip install openai ddgs newspaper4k lxml_html_clean agno """ import asyncio from agno.agent import Agent from agno.models.groq import Groq from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.newspaper4k import Newspaper4kTools agent = Agent( model=Groq(id="llam...
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/groq/browser_search.py
cookbook/11_models/groq/browser_search.py
from agno.agent import Agent from agno.models.groq import Groq agent = Agent( model=Groq(id="openai/gpt-oss-20b"), tools=[{"type": "browser_search"}], ) agent.print_response("Is the Going-to-the-sun road open for public?")
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/groq/basic_stream.py
cookbook/11_models/groq/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.groq import Groq agent = Agent(model=Groq(id="llama-3.3-70b-versatile"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence horror story", 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/groq/knowledge.py
cookbook/11_models/groq/knowledge.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf openai groq` to install dependencies.""" from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.groq import Groq from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowledge = Kno...
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/groq/reasoning_agent.py
cookbook/11_models/groq/reasoning_agent.py
from agno.agent import Agent from agno.models.groq import Groq # Create a reasoning agent that uses: # - `deepseek-r1-distill-llama-70b` as the reasoning model # - `llama-3.3-70b-versatile` to generate the final response reasoning_agent = Agent( model=Groq(id="llama-3.3-70b-versatile"), reasoning_model=Groq( ...
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/groq/tool_use.py
cookbook/11_models/groq/tool_use.py
"""Please install dependencies using: pip install openai ddgs newspaper4k lxml_html_clean agno """ from agno.agent import Agent from agno.models.groq import Groq from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.newspaper4k import Newspaper4kTools agent = Agent( model=Groq(id="llama-3.3-70b-versat...
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/groq/basic.py
cookbook/11_models/groq/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.groq import Groq agent = Agent(model=Groq(id="llama-3.3-70b-versatile"), markdown=True) # Get the response in a variable # run: RunOutput = agent.run("Share a 2 sentence horror story") # print(run.content) # Print the response on the terminal 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/11_models/groq/deep_knowledge.py
cookbook/11_models/groq/deep_knowledge.py
"""🤔 DeepKnowledge - An AI Agent that iteratively searches a knowledge base to answer questions This agent performs iterative searches through its knowledge base, breaking down complex queries into sub-questions, and synthesizing comprehensive answers. It's designed to explore topics deeply and thoroughly by followin...
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/groq/async_basic_stream.py
cookbook/11_models/groq/async_basic_stream.py
import asyncio from agno.agent import Agent from agno.models.groq import Groq agent = Agent( model=Groq(id="llama-3.3-70b-versatile"), description="You help people with their health and fitness goals.", instructions=["Recipes should be under 5 ingredients"], ) # -*- Print a response to the terminal asynci...
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/groq/retry.py
cookbook/11_models/groq/retry.py
"""Example demonstrating how to set up retries with Groq.""" from agno.agent import Agent from agno.models.groq import Groq # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "groq-wrong-id" agent = Agent( model=Groq( id=wrong_model_id, retries=3, # Number of times...
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/groq/__init__.py
cookbook/11_models/groq/__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/groq/transcription_agent.py
cookbook/11_models/groq/transcription_agent.py
"""Run `pip install groq` to install dependencies.""" from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.tools.models.groq import GroqTools url = "https://agno-public.s3.amazonaws.com/demo_data/sample_conversation.wav" agent = Agent( name="Groq Transcription Agent", model=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/11_models/groq/structured_output.py
cookbook/11_models/groq/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.groq import Groq 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/groq/translation_agent.py
cookbook/11_models/groq/translation_agent.py
import base64 from pathlib import Path from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.tools.models.groq import GroqTools from agno.utils.media import save_base64_data path = "tmp/sample-fr.mp3" agent = Agent( name="Groq Translation Agent", model=OpenAIChat(id="gpt-4o-mini"),...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/groq/agent_team.py
cookbook/11_models/groq/agent_team.py
from agno.agent import Agent from agno.models.groq import Groq from agno.team.team import Team from agno.tools.duckduckgo import DuckDuckGoTools from agno.tools.yfinance import YFinanceTools web_agent = Agent( name="Web Agent", role="Search the web for information", model=Groq(id="llama-3.3-70b-versatile")...
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/groq/async_basic.py
cookbook/11_models/groq/async_basic.py
import asyncio from agno.agent import Agent from agno.models.groq import Groq agent = Agent( model=Groq(id="llama-3.3-70b-versatile"), description="You help people with their health and fitness goals.", instructions=["Recipes should be under 5 ingredients"], ) # -*- Print a response to the cli asyncio.run...
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/groq/research_agent_exa.py
cookbook/11_models/groq/research_agent_exa.py
"""Run `pip install groq exa-py` to install dependencies.""" from datetime import datetime from pathlib import Path from textwrap import dedent from agno.agent import Agent from agno.models.groq import Groq from agno.tools.exa import ExaTools cwd = Path(__file__).parent.resolve() tmp = cwd.joinpath("tmp") if not 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/11_models/groq/reasoning/demo_qwen_2_5_32B.py
cookbook/11_models/groq/reasoning/demo_qwen_2_5_32B.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf openai groq` to install dependencies.""" from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.models.groq import Groq from agno.vectordb.pgvector import PgVector db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai" knowledge = Kno...
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/groq/reasoning/finance_agent.py
cookbook/11_models/groq/reasoning/finance_agent.py
from agno.agent import Agent from agno.models.groq import Groq from agno.tools.yfinance import YFinanceTools # Create an Agent with Groq and YFinanceTools finance_agent = Agent( model=Groq(id="deepseek-r1-distill-llama-70b-specdec"), tools=[YFinanceTools()], description="You are an investment analyst with ...
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/groq/reasoning/basic_stream.py
cookbook/11_models/groq/reasoning/basic_stream.py
from agno.agent import Agent from agno.models.groq import Groq agent = Agent(model=Groq(id="deepseek-r1-distill-llama-70b-specdec"), markdown=True) # Print the response on the terminal agent.print_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/groq/reasoning/basic.py
cookbook/11_models/groq/reasoning/basic.py
from agno.agent import Agent from agno.models.groq import Groq agent = Agent(model=Groq(id="deepseek-r1-distill-llama-70b-specdec"), markdown=True) # Print the response on the terminal agent.print_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/groq/reasoning/__init__.py
cookbook/11_models/groq/reasoning/__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/groq/reasoning/demo_deepseek_qwen.py
cookbook/11_models/groq/reasoning/demo_deepseek_qwen.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf openai groq` to install dependencies.""" from agno.agent import Agent from agno.models.groq import Groq agent_with_reasoning = Agent( model=Groq(id="Qwen-2.5-32b"), reasoning=True, reasoning_model=Groq( id="Deepseek-r1-distill-qwen-32b", temperatu...
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/ollama/image_agent.py
cookbook/11_models/ollama/image_agent.py
from pathlib import Path from agno.agent import Agent from agno.media import Image from agno.models.ollama import Ollama agent = Agent( model=Ollama(id="llama3.2-vision"), markdown=True, ) image_path = Path(__file__).parent.joinpath("super-agents.png") agent.print_response( "Write a 3 sentence fiction 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/ollama/tool_use_stream.py
cookbook/11_models/ollama/tool_use_stream.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.ollama import Ollama from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Ollama(id="llama3.2:latest"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats happening in...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/ollama/demo_qwen.py
cookbook/11_models/ollama/demo_qwen.py
from agno.agent import Agent from agno.models.ollama import Ollama from agno.tools.yfinance import YFinanceTools agent = Agent( model=Ollama(id="qwen3:8b"), tools=[ YFinanceTools(), ], instructions="Use tables to display data.", ) agent.print_response("Write a report on NVDA", stream=True, 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/ollama/demo_gemma.py
cookbook/11_models/ollama/demo_gemma.py
from pathlib import Path from agno.agent import Agent from agno.media import Image from agno.models.ollama import Ollama agent = Agent(model=Ollama(id="gemma3:12b"), markdown=True) image_path = Path(__file__).parent.joinpath("super-agents.png") agent.print_response( "Write a 3 sentence fiction story about the 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/11_models/ollama/memory.py
cookbook/11_models/ollama/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/ollama/memory.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/ollama/db.py
cookbook/11_models/ollama/db.py
"""Run `pip install ddgs sqlalchemy ollama` to install dependencies.""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.ollama import Ollama 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/ollama/basic_stream.py
cookbook/11_models/ollama/basic_stream.py
from typing import Iterator # noqa from agno.agent import Agent, RunOutputEvent # noqa from agno.models.ollama import Ollama agent = Agent(model=Ollama(id="llama3.1:8b"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence horror story", stream=Tr...
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/ollama/knowledge.py
cookbook/11_models/ollama/knowledge.py
"""Run `pip install ddgs sqlalchemy pgvector pypdf openai ollama` to install dependencies.""" from agno.agent import Agent from agno.knowledge.embedder.ollama import OllamaEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.ollama import Ollama from agno.vectordb.pgvector import PgVector 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/11_models/ollama/demo_phi4.py
cookbook/11_models/ollama/demo_phi4.py
from agno.agent import Agent, RunOutput # noqa from agno.models.ollama import Ollama agent = Agent(model=Ollama(id="phi4"), markdown=True) # Print the response in the terminal agent.print_response("Tell me a scary story in exactly 10 words.")
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/ollama/reasoning_agent.py
cookbook/11_models/ollama/reasoning_agent.py
from agno.agent import Agent from agno.models.ollama import Ollama reasoning_agent = Agent( model=Ollama(id="gpt-oss:120b"), reasoning=True, debug_mode=True, ) reasoning_agent.print_response( "How many r are in the word 'strawberry'?", show_reasoning=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/ollama/tool_use.py
cookbook/11_models/ollama/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.ollama import Ollama from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Ollama(id="llama3.2:latest"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats happening in...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/ollama/basic.py
cookbook/11_models/ollama/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.ollama import Ollama agent = Agent(model=Ollama(id="llama3.1:8b"), 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_res...
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/ollama/async_basic_stream.py
cookbook/11_models/ollama/async_basic_stream.py
import asyncio from typing import Iterator # noqa from agno.agent import Agent, RunOutput # noqa from agno.models.ollama import Ollama agent = Agent(model=Ollama(id="llama3.1:8b"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("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/ollama/set_temperature.py
cookbook/11_models/ollama/set_temperature.py
from agno.agent import Agent, RunOutput # noqa from agno.models.ollama import Ollama agent = Agent(model=Ollama(id="llama3.2", options={"temperature": 0.5}), 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 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/ollama/set_client.py
cookbook/11_models/ollama/set_client.py
"""Run `pip install yfinance` to install dependencies.""" from agno.agent import Agent, RunOutput # noqa from agno.models.ollama import Ollama from ollama import Client as OllamaClient agent = Agent( model=Ollama(id="llama3.1:8b", client=OllamaClient()), markdown=True, ) # 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/ollama/retry.py
cookbook/11_models/ollama/retry.py
"""Example demonstrating how to set up retries with Ollama.""" from agno.agent import Agent from agno.models.ollama import Ollama # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "ollama-wrong-id" agent = Agent( model=Ollama( 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/ollama/__init__.py
cookbook/11_models/ollama/__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/ollama/demo_deepseek_r1.py
cookbook/11_models/ollama/demo_deepseek_r1.py
from agno.agent import Agent, RunOutput # noqa from agno.models.ollama import Ollama agent = Agent(model=Ollama(id="deepseek-r1:14b"), markdown=True) # Print the response in the terminal agent.print_response( "Write me python code to solve quadratic equations. Explain your reasoning." )
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/ollama/structured_output.py
cookbook/11_models/ollama/structured_output.py
from typing import List from agno.agent import Agent, RunOutput # noqa from agno.models.ollama import Ollama from pydantic import BaseModel, Field from rich.pretty import pprint # noqa class MovieScript(BaseModel): name: str = Field(..., description="Give a name to this movie") setting: str = Field( ...
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/ollama/ollama_cloud.py
cookbook/11_models/ollama/ollama_cloud.py
"""To use Ollama Cloud, you need to set the OLLAMA_API_KEY environment variable. Host is set to https://ollama.com by default.""" from agno.agent import Agent from agno.models.ollama import Ollama agent = Agent( model=Ollama(id="gpt-oss:120b-cloud"), ) agent.print_response("What is the capital of France?", strea...
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/ollama/async_basic.py
cookbook/11_models/ollama/async_basic.py
import asyncio from agno.agent import Agent from agno.models.ollama import Ollama agent = Agent( model=Ollama(id="llama3.1:8b"), description="You help people with their health and fitness goals.", instructions=["Recipes should be under 5 ingredients"], ) # -*- Print a response to the cli asyncio.run(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/litellm_openai/basic_stream.py
cookbook/11_models/litellm_openai/basic_stream.py
from agno.agent import Agent, RunOutput # noqa from agno.models.litellm import LiteLLMOpenAI agent = Agent(model=LiteLLMOpenAI(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...
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/litellm_openai/audio_input_agent.py
cookbook/11_models/litellm_openai/audio_input_agent.py
""" Please first install litellm[proxy] by running: pip install 'litellm[proxy]' Before running this script, you need to start the LiteLLM server: litellm --model gpt-4o-audio-preview --host 127.0.0.1 --port 4000 """ import requests from agno.agent import Agent, RunResponse # noqa from agno.media import Audio 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/11_models/litellm_openai/tool_use.py
cookbook/11_models/litellm_openai/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.litellm import LiteLLMOpenAI from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=LiteLLMOpenAI(id="gpt-4o"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("Whats happen...
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/litellm_openai/basic.py
cookbook/11_models/litellm_openai/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.litellm import LiteLLMOpenAI agent = Agent(model=LiteLLMOpenAI(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...
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/litellm_openai/__init__.py
cookbook/11_models/litellm_openai/__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/vllm/tool_use_stream.py
cookbook/11_models/vllm/tool_use_stream.py
"""Build a Web Search Agent using xAI.""" from agno.agent import Agent from agno.models.vllm import VLLM from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=VLLM( id="NousResearch/Nous-Hermes-2-Mistral-7B-DPO", top_k=20, enable_thinking=False ), tools=[DuckDuckGoTools()], ma...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vllm/memory.py
cookbook/11_models/vllm/memory.py
""" Personalized memory and session summaries with vLLM. Prerequisites: 1. Start a Postgres + pgvector container (helper script is provided): ./cookbook/scripts/run_pgvector.sh 2. Install dependencies: pip install sqlalchemy 'psycopg[binary]' pgvector 3. Run a vLLM server (any open model). Example with 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/vllm/db.py
cookbook/11_models/vllm/db.py
"""Run `pip install sqlalchemy` and ensure Postgres is running (`./cookbook/scripts/run_pgvector.sh`).""" from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.vllm import VLLM from agno.tools.duckduckgo import DuckDuckGoTools # Setup the database db_url = "postgresql+psycopg://ai:ai@l...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vllm/async_tool_use.py
cookbook/11_models/vllm/async_tool_use.py
"""Run `pip install ddgs` to install dependencies.""" import asyncio from agno.agent import Agent from agno.models.vllm import VLLM from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=VLLM(id="Qwen/Qwen2.5-7B-Instruct", top_k=20, enable_thinking=False), tools=[DuckDuckGoTools()], markd...
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/vllm/basic_stream.py
cookbook/11_models/vllm/basic_stream.py
from agno.agent import Agent from agno.models.vllm import VLLM agent = Agent( model=VLLM(id="Qwen/Qwen2.5-7B-Instruct", top_k=20, enable_thinking=False), markdown=True, ) agent.print_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/vllm/code_generation.py
cookbook/11_models/vllm/code_generation.py
"""Code generation example with DeepSeek-Coder. Run vLLM model: vllm serve deepseek-ai/deepseek-coder-6.7b-instruct \ --dtype float32 \ --tool-call-parser pythonic """ from agno.agent import Agent from agno.models.vllm import VLLM agent = Agent( model=VLLM(id="deepseek-ai/deepseek-coder-6.7b-instr...
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/vllm/tool_use.py
cookbook/11_models/vllm/tool_use.py
"""Build a Web Search Agent using xAI.""" from agno.agent import Agent from agno.models.vllm import VLLM from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=VLLM( id="NousResearch/Nous-Hermes-2-Mistral-7B-DPO", top_k=20, enable_thinking=False ), tools=[DuckDuckGoTools()], ma...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/cookbook/11_models/vllm/basic.py
cookbook/11_models/vllm/basic.py
from agno.agent import Agent from agno.models.vllm import VLLM agent = Agent( model=VLLM(id="Qwen/Qwen2.5-7B-Instruct", top_k=20, enable_thinking=False), markdown=True, ) agent.print_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/vllm/async_basic_stream.py
cookbook/11_models/vllm/async_basic_stream.py
import asyncio from agno.agent import Agent from agno.models.vllm import VLLM agent = Agent(model=VLLM(id="Qwen/Qwen2.5-7B-Instruct"), 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/vllm/retry.py
cookbook/11_models/vllm/retry.py
"""Example demonstrating how to set up retries with vLLM.""" from agno.agent import Agent from agno.models.vllm import vLLM # We will use a deliberately wrong model ID, to trigger retries. wrong_model_id = "vllm-wrong-id" agent = Agent( model=vLLM( id=wrong_model_id, retries=3, # Number of times...
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/vllm/__init__.py
cookbook/11_models/vllm/__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/vllm/structured_output.py
cookbook/11_models/vllm/structured_output.py
from typing import List from agno.agent import Agent from agno.models.vllm import VLLM from pydantic import BaseModel, Field class MovieScript(BaseModel): name: str = Field(..., description="Give a name to this movie") setting: str = Field( ..., description="Provide a nice setting for a blockbuster m...
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/vllm/async_basic.py
cookbook/11_models/vllm/async_basic.py
import asyncio from agno.agent import Agent from agno.models.vllm import VLLM agent = Agent(model=VLLM(id="Qwen/Qwen2.5-7B-Instruct"), 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/nexus/tool_use_stream.py
cookbook/11_models/nexus/tool_use_stream.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.nexus import Nexus from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nexus(id="anthropic/claude-sonnet-4-20250514"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("W...
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/nexus/async_tool_use.py
cookbook/11_models/nexus/async_tool_use.py
""" Async example using Nexus with tool calls """ import asyncio from agno.agent import Agent from agno.models.nexus import Nexus from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nexus(id="anthropic/claude-sonnet-4-20250514"), tools=[DuckDuckGoTools()], markdown=True, ) asyncio.run...
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/nexus/basic_stream.py
cookbook/11_models/nexus/basic_stream.py
from agno.agent import Agent, RunOutputEvent # noqa from agno.models.nvidia import Nvidia agent = Agent(model=Nvidia(id="meta/llama-3.3-70b-instruct"), markdown=True) # Get the response in a variable # run_response: Iterator[RunOutputEvent] = agent.run("Share a 2 sentence horror story", stream=True) # for chunk in 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/nexus/async_tool_use_stream.py
cookbook/11_models/nexus/async_tool_use_stream.py
""" Async example using Nexus with tool call streaming. """ import asyncio from agno.agent import Agent from agno.models.nexus import Nexus from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nexus(id="anthropic/claude-sonnet-4-20250514"), tools=[DuckDuckGoTools()], markdown=True, ) 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/11_models/nexus/tool_use.py
cookbook/11_models/nexus/tool_use.py
"""Run `pip install ddgs` to install dependencies.""" from agno.agent import Agent from agno.models.nexus import Nexus from agno.tools.duckduckgo import DuckDuckGoTools agent = Agent( model=Nexus(id="anthropic/claude-sonnet-4-20250514"), tools=[DuckDuckGoTools()], markdown=True, ) agent.print_response("W...
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/nexus/basic.py
cookbook/11_models/nexus/basic.py
from agno.agent import Agent, RunOutput # noqa from agno.models.nexus import Nexus agent = Agent(model=Nexus(id="anthropic/claude-sonnet-4-20250514"), 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 term...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false