Skip to main content
While you can do a lot with AI agents, it’s better to start simple — just a model, tools, and basic instructions. Once that works, you can layer in more functionality as needed. It’s best to begin with well-defined tasks like classification, summarization, data extraction, knowledge search, or document processing. These early wins help you identify what works, validate user needs, and set the stage for advanced systems. For example, here’s a simple agent to generate reports about given topics:
hackernews_agent.py
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.hackernews import HackerNewsTools

agent = Agent(
    model=Claude(id="claude-sonnet-4-5"),
    tools=[HackerNewsTools()],
    instructions="Write a report on the topic. Output only the report.",
    markdown=True,
)
agent.print_response("Trending startups and products.", stream=True)

Run your Agent

When developing your agent, run it using the Agent.print_response() method. This will print the agent’s response in your terminal, in a friendly format. This is only for development purposes and not recommended for production use. In production, use the Agent.run() or Agent.arun() methods. For example:
from typing import Iterator
from agno.agent import Agent, RunOutput, RunOutputEvent, RunEvent
from agno.models.anthropic import Claude
from agno.tools.hackernews import HackerNewsTools
from agno.utils.pprint import pprint_run_response

agent = Agent(
    model=Claude(id="claude-sonnet-4-5"),
    tools=[HackerNewsTools()],
    instructions="Write a report on the topic. Output only the report.",
    markdown=True,
)

# Run the agent and print the response
agent.print_response("Trending startups and products.")

################ STREAM RESPONSE #################
stream: Iterator[RunOutputEvent] = agent.run("Trending products", stream=True)
for chunk in stream:
    if chunk.event == RunEvent.run_content:
        print(chunk.content)

################ STREAM AND PRETTY PRINT #################
stream: Iterator[RunOutputEvent] = agent.run("Trending products", stream=True)
pprint_run_response(stream, markdown=True)

Next Steps

After getting familiarized with the basics, you can continue building your agent by adding functionality as needed. Some common questions you might face:
  • How do I run my agent? -> See the running agents documentation.
  • How do I debug my agent? -> See the debugging agents documentation.
  • How do I manage sessions? -> See the agent sessions documentation.
  • How do I manage input and capture output? -> See the input and output documentation.
  • How do I add tools? -> See the tools documentation.
  • How do I give the agent context? -> See the context engineering documentation.
  • How do I add knowledge? -> See the knowledge documentation.
  • How do I handle images, audio, video, and files? -> See the multimodal documentation.
  • How do I add guardrails? -> See the guardrails documentation.
  • How do I cache model responses during development? -> See the response caching documentation.