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)
| Provider | Model | Context | Strengths | Best For |
|---|---|---|---|---|
| Anthropic | Claude Opus 4 | 200K | Deep reasoning, safety, tool use, computer use | Complex agents, high-stakes decisions |
| Anthropic | Claude Sonnet 4 | 200K | Fast reasoning, tool use, cost-effective | Most agent workloads |
| Anthropic | Claude Haiku 4.5 | 200K | Speed, low cost | Simple decisions, classification, routing |
| OpenAI | GPT-4o | 128K | Multimodal, fast, broad knowledge | General-purpose agents |
| OpenAI | GPT-4o-mini | 128K | Very fast, very cheap | High-volume simple tasks |
| Gemini 2.0 Pro | 1M+ | Massive context, multimodal | Long-document analysis | |
| Gemini 2.0 Flash | 1M+ | Speed, cost, large context | High-throughput agents | |
| Meta | Llama 4 (open) | 128K | Open-source, customizable | Self-hosted, fine-tuned agents |
| Mistral | Mistral Large | 128K | European, strong multilingual | EU 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
| Framework | Type | Best For | Avoid When |
|---|---|---|---|
| Raw API | None | Learning, simple agents, max control | Complex multi-agent, production RAG |
| Anthropic SDK | Low-level | Claude agents, computer use, tool runner | Multi-model systems |
| OpenAI SDK | Low-level | GPT agents, Assistants API | Complex custom logic |
| LangChain | High-level | Production RAG, many integrations | Simple agents, learning |
| LangGraph | Workflow | Complex stateful agents, human-in-the-loop | Simple linear agents |
| CrewAI | Multi-agent | Quick multi-agent prototypes | Production systems |
| AutoGen | Multi-agent | Agent conversations, debate | Simple single-agent |
| Agno | Lightweight | Quick prototypes, RAG agents | Complex orchestration |
| LlamaIndex | Data | Complex RAG pipelines | Non-RAG tasks |
| Smolagents | Minimal | Open-source model agents | Production reliability |
| DSPy | Prompt optimization | Optimizing prompts programmatically | Simple 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
| Database | Type | Best For | Notes |
|---|---|---|---|
| ChromaDB | Embedded | Development, small projects | Zero config, Python-native |
| Pinecone | Managed cloud | Production, scale | Fully managed, expensive at scale |
| Weaviate | Self-hosted/Cloud | Hybrid search | Built-in BM25 + vector |
| Qdrant | Self-hosted/Cloud | Filtered search | Fast, great filtering |
| pgvector | PostgreSQL extension | When you already use Postgres | No extra infrastructure |
| Milvus | Self-hosted/Cloud | Large-scale (billions of vectors) | Complex to operate |
| LanceDB | Embedded | Multimodal, columnar | Serverless, fast |
A.4 Memory and State
| Tool | Type | Use Case |
|---|---|---|
| Redis | In-memory KV | Session state, rate limiting, caching |
| PostgreSQL | Relational | Persistent agent state, user data |
| SQLite | Embedded relational | Local development, single-user agents |
| Mem0 | Agent memory layer | Automatic memory extraction and retrieval |
| Zep | Agent memory service | Managed memory with summarization |
| LangChain Memory | Library | Conversation buffer, summary memory |
A.5 Observability and Evaluation
| Tool | Type | Best For |
|---|---|---|
| LangFuse | Open-source tracing | Full observability, self-hosted option |
| LangSmith | Cloud tracing | LangChain/LangGraph ecosystem |
| Arize Phoenix | Open-source | LLM observability, span-level tracing |
| Braintrust | Eval platform | Datasets, experiments, CI integration |
| Weights & Biases | ML platform | Experiment tracking, prompt versioning |
| Galileo | Observability | Production monitoring, guardrails |
| Helicone | API proxy | Cost tracking, rate limiting, caching |
A.6 Safety and Guardrails
| Tool | Type | Use Case |
|---|---|---|
| Guardrails AI | Library | Structured output validation, PII detection |
| NVIDIA NeMo Guardrails | Library | Content filtering, topic boundaries |
| LLM Guard | Library | Input/output sanitization |
| OpenAI Moderation API | API | Toxicity, harmful content detection |
| Anthropic Safety Filters | Built-in | Automatic refusal of harmful requests |
| Presidio | Library | PII detection and anonymization |
A.7 Sandboxing and Code Execution
| Tool | Type | Best For |
|---|---|---|
| Docker | Container | General-purpose sandboxing |
| E2B | Code sandbox | Purpose-built for AI agents |
| Code Interpreter SDK | OpenAI sandbox | GPT code execution |
| Firecracker | MicroVM | High-security isolation (AWS Lambda) |
| gVisor | Sandbox kernel | Container-level security |
| Pyodide | Browser Python | Client-side execution |
A.8 Web Search and Data Tools
| Tool | Type | Notes |
|---|---|---|
| Brave Search API | Web search | Privacy-focused, good free tier |
| Tavily | AI-optimized search | Built for agents, extracts relevant content |
| SerpAPI | Web search | Google, Bing, and other search engines |
| Exa | Semantic search | Embedding-based web search |
| Firecrawl | Web scraping | Turns websites into LLM-ready markdown |
| Jina AI Reader | Web extraction | Clean content extraction from any URL |
| Apify | Web automation | Pre-built scrapers for hundreds of sites |
A.9 Embedding Models
| Model | Provider | Dimensions | Max Input | Notes |
|---|---|---|---|---|
| text-embedding-3-small | OpenAI | 512/1536 | 8191 | Cheap, good enough |
| text-embedding-3-large | OpenAI | 256/1024/3072 | 8191 | Best quality |
| embed-english-v3 | Cohere | 1024 | 512 | Good for search |
| voyage-2 | Voyage AI | 1024 | 4000 | Good for long docs |
| voyage-code-2 | Voyage AI | 1536 | 16000 | Code embeddings |
| BGE-large-en | BAAI (OSS) | 1024 | 512 | Best open-source |
| E5-mistral-7b | Microsoft (OSS) | 4096 | 32768 | Very 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
| Pattern | When to Use | Key Implementation |
|---|---|---|
| Simple Loop | Single-task agents | while not done: think(); act() |
| ReAct | Agents needing external info | Interleave reasoning and tool calls |
| Plan-and-Solve | Complex multi-step tasks | Plan first, execute step by step |
| Debate | High-stakes decisions | Multiple agents critique each other |
| Hierarchical | Complex task decomposition | Manager delegates to specialists |
| Swarm | Parallel independent work | Many agents, aggregated results |
| Human-in-the-Loop | Sensitive operations | Interrupt for approval before acting |
| Router | Cost optimization | Cheap model classifies, expensive model acts |
A.12 Quick Reference: Common Pitfalls
| Pitfall | Symptom | Fix |
|---|---|---|
| Over-engineering | 10 agents for a 1-agent task | Start with 1 agent. Add more only when proven necessary. |
| Context overflow | Agent forgets early instructions | Summarize, use sliding windows, be selective. |
| Tool confusion | Agent calls wrong tools | Better tool descriptions. Fewer tools. Router pattern. |
| Infinite loops | Agent never stops | Max iterations. Stuck detector. Timeout. |
| Hallucination | Confident wrong answers | RAG. Source citation. Fact-checking reviewer. |
| Cost explosion | $5 per agent run | Model routing. Caching. Token optimization. |
| Prompt injection | Agent follows user "instructions" | Delimiters. Instruction hierarchy. Input filtering. |
| Framework lock-in | Can't change frameworks | Start 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.