Skip to main content

Chapter A · The Complete Tool Ecosystem

Part of Appendix

"The landscape shifts every month. This appendix is your living map — every framework, model, tool, and resource worth knowing, organized so you can find what you need in 30 seconds."


A.1 LLM Providers and Models

Frontier Models (as of July 2026)

ProviderModelContextStrengthsBest For
AnthropicClaude Opus 4200KDeep reasoning, safety, tool use, computer useComplex agents, high-stakes decisions
AnthropicClaude Sonnet 4200KFast reasoning, tool use, cost-effectiveMost agent workloads
AnthropicClaude Haiku 4.5200KSpeed, low costSimple decisions, classification, routing
OpenAIGPT-4o128KMultimodal, fast, broad knowledgeGeneral-purpose agents
OpenAIGPT-4o-mini128KVery fast, very cheapHigh-volume simple tasks
GoogleGemini 2.0 Pro1M+Massive context, multimodalLong-document analysis
GoogleGemini 2.0 Flash1M+Speed, cost, large contextHigh-throughput agents
MetaLlama 4 (open)128KOpen-source, customizableSelf-hosted, fine-tuned agents
MistralMistral Large128KEuropean, strong multilingualEU compliance, multilingual

Model Selection Guide

Task complexity:
Simple (classification, routing) → Haiku, GPT-4o-mini, Gemini Flash
Medium (research, analysis) → Sonnet, GPT-4o, Gemini Pro
Complex (multi-step reasoning) → Opus, GPT-4o, Gemini Pro

Latency requirements:
< 1 second → Haiku, GPT-4o-mini, Gemini Flash
< 5 seconds → Sonnet, GPT-4o
< 30 seconds → Opus

Cost sensitivity:
High (1M+ calls/day) → Haiku, GPT-4o-mini, self-hosted Llama
Medium (10K calls/day) → Sonnet, GPT-4o
Low (< 1K calls/day) → Opus, GPT-4o

A.2 Agent Frameworks

FrameworkTypeBest ForAvoid When
Raw APINoneLearning, simple agents, max controlComplex multi-agent, production RAG
Anthropic SDKLow-levelClaude agents, computer use, tool runnerMulti-model systems
OpenAI SDKLow-levelGPT agents, Assistants APIComplex custom logic
LangChainHigh-levelProduction RAG, many integrationsSimple agents, learning
LangGraphWorkflowComplex stateful agents, human-in-the-loopSimple linear agents
CrewAIMulti-agentQuick multi-agent prototypesProduction systems
AutoGenMulti-agentAgent conversations, debateSimple single-agent
AgnoLightweightQuick prototypes, RAG agentsComplex orchestration
LlamaIndexDataComplex RAG pipelinesNon-RAG tasks
SmolagentsMinimalOpen-source model agentsProduction reliability
DSPyPrompt optimizationOptimizing prompts programmaticallySimple prompts

Decision Tree

1. Are you learning? → Raw API
2. Simple single-agent? → Anthropic SDK or OpenAI SDK
3. Complex RAG? → LlamaIndex + LangChain
4. Multi-agent? → CrewAI (prototype) → LangGraph (production)
5. Human-in-the-loop? → LangGraph
6. Computer use? → Anthropic SDK
7. Open-source models? → Smolagents or raw API + LiteLLM

A.3 Vector Databases

DatabaseTypeBest ForNotes
ChromaDBEmbeddedDevelopment, small projectsZero config, Python-native
PineconeManaged cloudProduction, scaleFully managed, expensive at scale
WeaviateSelf-hosted/CloudHybrid searchBuilt-in BM25 + vector
QdrantSelf-hosted/CloudFiltered searchFast, great filtering
pgvectorPostgreSQL extensionWhen you already use PostgresNo extra infrastructure
MilvusSelf-hosted/CloudLarge-scale (billions of vectors)Complex to operate
LanceDBEmbeddedMultimodal, columnarServerless, fast

A.4 Memory and State

ToolTypeUse Case
RedisIn-memory KVSession state, rate limiting, caching
PostgreSQLRelationalPersistent agent state, user data
SQLiteEmbedded relationalLocal development, single-user agents
Mem0Agent memory layerAutomatic memory extraction and retrieval
ZepAgent memory serviceManaged memory with summarization
LangChain MemoryLibraryConversation buffer, summary memory

A.5 Observability and Evaluation

ToolTypeBest For
LangFuseOpen-source tracingFull observability, self-hosted option
LangSmithCloud tracingLangChain/LangGraph ecosystem
Arize PhoenixOpen-sourceLLM observability, span-level tracing
BraintrustEval platformDatasets, experiments, CI integration
Weights & BiasesML platformExperiment tracking, prompt versioning
GalileoObservabilityProduction monitoring, guardrails
HeliconeAPI proxyCost tracking, rate limiting, caching

A.6 Safety and Guardrails

ToolTypeUse Case
Guardrails AILibraryStructured output validation, PII detection
NVIDIA NeMo GuardrailsLibraryContent filtering, topic boundaries
LLM GuardLibraryInput/output sanitization
OpenAI Moderation APIAPIToxicity, harmful content detection
Anthropic Safety FiltersBuilt-inAutomatic refusal of harmful requests
PresidioLibraryPII detection and anonymization

A.7 Sandboxing and Code Execution

ToolTypeBest For
DockerContainerGeneral-purpose sandboxing
E2BCode sandboxPurpose-built for AI agents
Code Interpreter SDKOpenAI sandboxGPT code execution
FirecrackerMicroVMHigh-security isolation (AWS Lambda)
gVisorSandbox kernelContainer-level security
PyodideBrowser PythonClient-side execution

A.8 Web Search and Data Tools

ToolTypeNotes
Brave Search APIWeb searchPrivacy-focused, good free tier
TavilyAI-optimized searchBuilt for agents, extracts relevant content
SerpAPIWeb searchGoogle, Bing, and other search engines
ExaSemantic searchEmbedding-based web search
FirecrawlWeb scrapingTurns websites into LLM-ready markdown
Jina AI ReaderWeb extractionClean content extraction from any URL
ApifyWeb automationPre-built scrapers for hundreds of sites

A.9 Embedding Models

ModelProviderDimensionsMax InputNotes
text-embedding-3-smallOpenAI512/15368191Cheap, good enough
text-embedding-3-largeOpenAI256/1024/30728191Best quality
embed-english-v3Cohere1024512Good for search
voyage-2Voyage AI10244000Good for long docs
voyage-code-2Voyage AI153616000Code embeddings
BGE-large-enBAAI (OSS)1024512Best open-source
E5-mistral-7bMicrosoft (OSS)409632768Very high quality

A.10 Learning Resources

Books

  • Building LLM Apps by Valentino Gagliardi — Practical RAG and agent patterns
  • Prompt Engineering Guide by DAIR.AI — Comprehensive prompt techniques
  • Designing Machine Learning Systems by Chip Huyen — Production ML patterns applicable to agents

Courses

  • Anthropic Cookbook — Official examples and patterns for Claude
  • LangChain Academy — Free course on LangChain and LangGraph
  • DeepLearning.AI — Short courses on agentic AI, RAG, and function calling
  • Hugging Face Agents Course — Open-source agent development

Communities

  • r/LocalLLaMA — Open-source model and agent discussion
  • LangChain Discord — Active community for LangChain/LangGraph
  • Anthropic Developer Discord — Claude-specific development
  • AI Engineer Summit — Conference and community for AI engineering

Benchmarks

  • SWE-bench — Software engineering tasks for coding agents
  • WebArena — Web navigation tasks for browser agents
  • OSWorld — Computer use benchmarks
  • GAIA — General AI assistant benchmark
  • AgentBench — Multi-dimensional agent evaluation

A.11 Quick Reference: Agent Architecture Patterns

PatternWhen to UseKey Implementation
Simple LoopSingle-task agentswhile not done: think(); act()
ReActAgents needing external infoInterleave reasoning and tool calls
Plan-and-SolveComplex multi-step tasksPlan first, execute step by step
DebateHigh-stakes decisionsMultiple agents critique each other
HierarchicalComplex task decompositionManager delegates to specialists
SwarmParallel independent workMany agents, aggregated results
Human-in-the-LoopSensitive operationsInterrupt for approval before acting
RouterCost optimizationCheap model classifies, expensive model acts

A.12 Quick Reference: Common Pitfalls

PitfallSymptomFix
Over-engineering10 agents for a 1-agent taskStart with 1 agent. Add more only when proven necessary.
Context overflowAgent forgets early instructionsSummarize, use sliding windows, be selective.
Tool confusionAgent calls wrong toolsBetter tool descriptions. Fewer tools. Router pattern.
Infinite loopsAgent never stopsMax iterations. Stuck detector. Timeout.
HallucinationConfident wrong answersRAG. Source citation. Fact-checking reviewer.
Cost explosion$5 per agent runModel routing. Caching. Token optimization.
Prompt injectionAgent follows user "instructions"Delimiters. Instruction hierarchy. Input filtering.
Framework lock-inCan't change frameworksStart framework-free. Abstract the LLM interface.

This appendix is a snapshot of the ecosystem as of July 2026. The tools and models will change. The patterns and principles in this book will not.