Skip to main content
To build effective agents, start simple: a model, tools, and instructions. Once that works, layer in more functionality as needed. For example, here’s the simplest possible agent with access to HackerNews:
hackernews_agent.py

Run your Agent

Use Agent.print_response() for development. It prints the response in a readable format in your terminal. For production, use Agent.run() or Agent.arun():

Callable Factories

Pass a function for tools or knowledge when they should be resolved at run start.
callable_factories.py
Factories can declare run_context, session_state, or agent. Agno injects matching arguments by name.

Callable caching

Factory results are cached by default. The cache key is resolved in this order: custom key function, user_id, then session_id. If none are available, caching is skipped and the factory runs on every call. Set cache_callables=False when the factory depends on changing session_state and should re-evaluate on every run.

Next Steps

After getting familiar with the basics, add functionality as needed: