Skip to content

Tutorials

Step-by-step guides for building real agents with AgentFlow. Start with Beginner if you're new, or jump into any section once you have the basics.


Prerequisites

Before starting tutorials, make sure you've completed Getting Started:

  • AgentFlow installed (pip install 10xscale-agentflow)
  • An LLM provider library installed (google-genai or openai)
  • API key configured in .env

Beginner Path

Work through these in order for the smoothest learning curve:

Tutorial What You Build Key Skills
1. Your First Agent A weather assistant with personality System prompts, Agent class, basic workflow
2. Adding Tools An agent that calls Python functions ToolNode, conditional routing, tool execution
3. Chat with Memory A persistent multi-turn chatbot Checkpointers, thread IDs, conversation state

Total time: ~60 minutes


Building Agents

Deepen your Agent class knowledge and learn production patterns:

Tutorial Focus
Agent Class Deep Dive Configuration, tool filtering, context trimming, streaming
Tool Decorator & Filtering Organize tools with metadata and tags
Multi-Agent Handoff Delegate tasks between specialized agents
Input Validation Sanitize inputs and protect against prompt injection

ReAct Pattern (Reasoning + Acting)

The ReAct pattern powers most production agents — reason, act with tools, observe results, repeat:

Tutorial Focus
ReAct with Agent Class Simplest setup — ReAct in under 30 lines
Custom ReAct (Advanced) Build ReAct from scratch with custom async functions
Dependency Injection Inject services and config into nodes with InjectQ
MCP Integration Connect to Model Context Protocol servers
Streaming Stream tokens in real-time to clients
Unit Testing Test agents without real LLM API calls

Memory & Storage

Persist agent state and enable long-term memory:

Tutorial Focus
Long-Term Memory Persist memories across sessions using the Store API
Mem0 Store Managed semantic memory with Mem0
Qdrant Vector Store Vector database integration for similarity search
Embedding Store Work with vector embeddings in agent workflows

Retrieval & Reasoning

Ground agents in external knowledge and complex multi-step reasoning:

Tutorial Focus
RAG (Retrieval-Augmented Generation) Ground agents in external documents with semantic search
Plan-Act-Reflect Pattern Agents that plan, execute, and self-evaluate their work

Reference Docs

For API details on any class or method, see the Reference section:


Start here: Tutorial 1 — Your First Agent →