Code
cookbook/agent_concepts/async/basic.py
Usage
1
Create a virtual environment
Open the
Terminal and create a python virtual environment.2
Install libraries
3
Run Agent
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
import asyncio
from agno.agent import Agent
from agno.models.openai import OpenAIChat
agent = Agent(
model=OpenAIChat(id="gpt-4o"),
description="You help people with their health and fitness goals.",
instructions=["Recipes should be under 5 ingredients"],
markdown=True,
)
# -*- Print a response to the cli
asyncio.run(agent.aprint_response("Share a breakfast recipe.", stream=True))
Create a virtual environment
Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
python3 -m venv .venv
.venv/scripts/activate
Install libraries
pip install -U openai agno
Run Agent
python cookbook/agent_concepts/async/basic.py
python cookbook/agent_concepts/async/basic.py
Was this page helpful?