This agent takes a text input and responds with a text output, it will obviously hallucinate the output.

simple_agent.py
from agno.agent import Agent
from agno.models.openai import OpenAIChat

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    description="You are an enthusiastic news reporter with a flair for storytelling!",
    markdown=True,
)

if __name__ == "__main__":
    agent.print_response("1 sentence news story from New York", stream=True)

Usage

1

Install libraries

pip install -U agno openai
2

Export API keys

export OPENAI_API_KEY=***
3

Run the agent

python simple_agent.py