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.")
Set up your virtual environment
uv venv --python 3.12 source .venv/bin/activate
Install Ollama
ollama pull phi4
Install dependencies
uv pip install -U ollama agno
Run Agent
python cookbook/11_models/ollama/demo_phi4.py
Was this page helpful?