Back to Agno

Agno Agents Cookbook

cookbook/02_agents/README.md

2.6.42.1 KB
Original Source

Agno Agents Cookbook

Practical examples for building agents with Agno, organized by feature area.

Directories

#DirectoryDescriptionFiles
0101_quickstartStarter examples: basic agent, instructions, tools3
0202_input_outputInput formats, output schemas, streaming, structured output9
0303_context_managementInstructions, system messages, few-shot learning6
0404_toolsCallable factories, tool choice, tool call limits5
0505_state_and_sessionSession state, chat history, persistence12
0606_memory_and_learningMemory manager, learning machine2
0707_knowledgeRAG, custom retrievers, knowledge filters8
0808_guardrailsPII detection, prompt injection, custom guardrails5
0909_hooksPre/post hooks, tool hooks, stream hooks5
1010_human_in_the_loopConfirmation flows, user input, external execution7
1111_approvalsApproval workflows, audit trails11
1212_multimodalImage, audio, video processing10
1313_reasoningMulti-step reasoning, reasoning models2
1414_advancedCaching, compression, events, retries, concurrency, culture20
1515_dependenciesDependency injection in tools and context3
1616_skillsAgent skills with scripts and reference docs1

Total: 111 files across 16 directories

Prerequisites

  • Load environment variables with direnv allow (including OPENAI_API_KEY).
  • Create the demo environment with ./scripts/demo_setup.sh, then run cookbooks with .venvs/demo/bin/python.
  • Some examples require PostgreSQL with pgvector: ./cookbook/scripts/run_pgvector.sh

Run

bash
.venvs/demo/bin/python cookbook/02_agents/<directory>/<file>.py