Groq Image Agent
Describe an image from a URL using a vision model on Groq.
"""
Groq Image Agent
================
Cookbook example for `groq/image_agent.py`.
"""
from agno.agent import Agent
from agno.media import Image
from agno.models.groq import Groq
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# reasoning_effort="none" disables qwen's thinking tokens: over Groq they
# stream as raw <think> text and the answer can cut off before it appears.
agent = Agent(
model=Groq(id="qwen/qwen3.6-27b", request_params={"reasoning_effort": "none"})
)
agent.print_response(
"Tell me about this image",
images=[
Image(url="https://agno-public.s3.amazonaws.com/images/krakow_mariacki.jpg"),
],
stream=True,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
passRun the Example
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activateInstall dependencies
uv pip install -U agno groqExport your Groq API key
export GROQ_API_KEY="your_groq_api_key_here"Run the example
Save the code above as image_agent.py, then run:
python image_agent.pyFull source: cookbook/90_models/groq/image_agent.py