LlamaIndex Advanced Agents (Python)
LlamaIndex Advanced Agents (Python)
Section titled “LlamaIndex Advanced Agents (Python)”Last verified: 2025-11 • Source: https://github.com/run-llama/llama_index
Patterns
Section titled “Patterns”- Tool-augmented agents with query engines and retrievers
- Specialized agents per domain (RAG, web, code) with a router
- HITL escalation on low confidence
Router Skeleton
Section titled “Router Skeleton”def route(task: str) -> str: if "docs" in task.lower(): return "rag_agent" if "web" in task.lower(): return "web_agent" return "general_agent"Observability
Section titled “Observability”- Track query latency, token usage, retriever stats; export OTEL
Recovery
Section titled “Recovery”- Retry transient retriever/LLM errors; dead-letter on repeated failure