This example demonstrates how to provide basic instructions to an agent to guide its response behavior and storytelling style.

Code

cookbook/agents/context_management/instructions.py
from agno.agent import Agent

agent = Agent(instructions="Share a 2 sentence story about")
agent.print_response("Love in the year 12000.")

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
2

Install libraries

pip install -U agno
3

Run Agent

python cookbook/agents/context_management/instructions.py