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 image", images=[Image(filepath=image_path)], stream=True, )
Create a virtual environment
Terminal
python3 -m venv .venv source .venv/bin/activate
Install Ollama
ollama pull gemma3:12b
Install libraries
pip install -U ollama agno
Run Agent
python cookbook/models/ollama/demo_gemma.py