Code
cookbook/reasoning/models/ollama/reasoning_model_deepseek.py
Usage
Install Ollama
Follow the installation guide and run:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
from agno.agent import Agent
from agno.models.ollama.chat import Ollama
agent = Agent(
model=Ollama(id="llama3.2:latest"),
reasoning_model=Ollama(id="deepseek-r1:14b", max_tokens=4096),
)
agent.print_response(
"Solve the trolley problem. Evaluate multiple ethical frameworks. "
"Include an ASCII diagram of your solution.",
stream=True,
)
Create a virtual environment
Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Install Ollama
ollama pull llama3.2:latest
Was this page helpful?