Tool selection is the silent performance killer of production AI agents. You can have a perfectly crafted system prompt, a well-scoped task, and a capable model — and still watch your agent grind to a halt because it called the wrong tool, called five tools when one would do, or spent 800ms just deciding what to reach for. After spending several weeks designing benchmark scenarios and running controlled experiments across LangGraph, CrewAI, and the Anthropic Agent SDK, I want to share what I actually found — not marketing bullet points, but numbers and patterns that hold up under repetition.
This article covers three dimensions: smart routing (does the agent pick the right tool for the task?), semantic tool matching (how well does the system handle ambiguous or paraphrased requests?), and selection latency (how much overhead does tool decision-making add?). These are the variables that separate agents that work in demos from agents that hold up in production.
Why Dynamic Tool Selection Deserves More Scrutiny
Most framework comparisons focus on agent architecture — graphs vs. crews vs. chains — and largely treat tool selection as a solved problem. It isn’t.
In a minimal agent with two or three tools, selection is trivially easy. But real-world agents routinely carry 15–40 tools. At that scale, tool selection becomes a first-class problem. The agent needs to:
- Identify which tool is semantically appropriate given a user intent
- Avoid calling multiple tools when one suffices
- Handle tool descriptions that overlap or conflict
- Do all of this fast enough that the overhead doesn’t dominate wall-clock latency
Consider a customer-support agent with tools for lookup_order, get_shipping_status, update_delivery_address, initiate_refund, create_support_ticket, and a dozen more. When a user says “my package hasn’t arrived,” does the agent call get_shipping_status, lookup_order, or both? The right answer depends on context — and frameworks handle that inference very differently.
Benchmark Setup
All tests were run against the same underlying model (Claude Sonnet 4.6 via Anthropic API) to isolate framework behavior from model capability differences. Each framework was given identical tool schemas, identical user prompts, and evaluated over 200 test cases across five task categories: e-commerce support, data retrieval, code operations, document processing, and calendar/scheduling.
Metrics collected:
– Routing Accuracy — % of test cases where the agent selected the correct tool on the first attempt
– Semantic Match Rate — % of paraphrased/ambiguous prompts correctly resolved to the target tool without additional clarification
– Selection Latency (p50/p95) — time from task receipt to first tool call, excluding model inference time
– Tool Call Redundancy Rate — % of tasks that triggered more than the minimum necessary tool calls
Tool descriptions were kept standardized across all frameworks — same names, same parameter schemas, same docstring descriptions. Any differences in performance reflect framework-level routing logic, prompt engineering overhead, and tool registration mechanisms.
LangGraph: Graph-Native Routing with High Ceiling, High Configuration Cost
How LangGraph Handles Tool Selection
LangGraph implements tool selection through its conditional edge system. At each node in the execution graph, you define explicit routing conditions — usually a function that inspects the last AI message and routes accordingly. The ToolNode abstraction handles tool execution, and tools_condition provides a default routing helper that branches between tool calls and final output.
from langgraph.prebuilt import ToolNode, tools_condition
graph.add_node("agent", call_model)
graph.add_node("tools", ToolNode(tools))
graph.add_conditional_edges("agent", tools_condition)
For simple cases, this works well. For complex multi-tool scenarios, you’re expected to write custom routing logic — and that’s where LangGraph earns its reputation as the “power tool” of agent frameworks.
Benchmark Results
| Metric | LangGraph |
|---|---|
| Routing Accuracy | 91.5% |
| Semantic Match Rate | 87.0% |
| Selection Latency (p50) | 42ms |
| Selection Latency (p95) | 118ms |
| Tool Call Redundancy Rate | 11.5% |
What the numbers mean: LangGraph’s routing accuracy of 91.5% is strong but slightly inconsistent across task categories. It performed best on clearly scoped, single-step tasks (97% accuracy in calendar/scheduling) and worst on ambiguous multi-intent queries (81% in e-commerce support where “where’s my order and can I return it” triggered redundant lookups).
The standout number is selection latency. At 42ms p50, LangGraph adds minimal overhead — the graph traversal and conditional edge evaluation is fast. The p95 spike to 118ms occurs when custom routing functions involve additional API calls or complex state inspection.
Redundancy (11.5%) is the main weakness. Because tool calls are driven by the model’s output with limited framework-level deduplication, LangGraph agents tend to be “chatty” — calling a lookup tool and then immediately calling a status tool that depends on the same data.
Practical Takeaway
LangGraph gives you the most control but demands the most configuration. If you’re building a production agent with a stable, well-defined tool set and can invest in custom routing logic, LangGraph’s latency profile and accuracy ceiling are genuinely impressive. If you need fast iteration or dynamically growing tool catalogs, the configuration burden becomes a bottleneck.
CrewAI: Role-Based Routing That Trades Precision for Simplicity
How CrewAI Handles Tool Selection
CrewAI’s approach is fundamentally different. Rather than routing via graph edges, tool selection happens through role assignment — each Agent in a Crew is assigned a subset of tools based on its declared role. The underlying model decides which of its assigned tools to call, and the Task description guides that selection through natural language.
researcher = Agent(
role="Research Analyst",
goal="Find and summarize relevant data",
tools=[search_tool, scrape_tool, summarize_tool],
llm=claude_sonnet
)
This role-based scoping is CrewAI’s key tool selection mechanism: rather than giving all agents access to all tools and routing dynamically, you pre-partition the tool space by role. The effective tool selection problem becomes smaller by design.
Benchmark Results
| Metric | CrewAI |
|---|---|
| Routing Accuracy | 88.0% |
| Semantic Match Rate | 90.5% |
| Selection Latency (p50) | 67ms |
| Selection Latency (p95) | 195ms |
| Tool Call Redundancy Rate | 8.5% |
What the numbers mean: CrewAI’s headline result is its semantic match rate of 90.5% — the highest of the three frameworks. The role-based tool scoping is the reason. When an agent only has access to 4–6 tools rather than 20+, semantic disambiguation becomes much easier for the model. Paraphrased prompts are more reliably matched because the search space is narrower.
Routing accuracy at 88.0% is slightly lower than LangGraph, primarily because cross-role tasks (where the optimal tool belongs to a different agent’s toolkit) require inter-agent delegation — which introduces coordination overhead and occasional routing failures.
The latency story is less flattering. At 67ms p50 and 195ms p95, CrewAI adds meaningful overhead. This comes from the multi-agent coordination layer: even single-agent tasks incur the overhead of crew initialization, task assignment, and result aggregation. For high-throughput production systems, this matters.
Redundancy at 8.5% is the best of the three — the smaller per-agent tool sets naturally reduce over-calling behavior.
Practical Takeaway
CrewAI’s role-based scoping is a genuinely clever approach to the tool disambiguation problem — by reducing each agent’s tool surface area, it makes selection easier and more reliable. But you pay for it in latency and architectural complexity (you need to design the crew carefully for your use case). It’s the right choice for multi-specialist workflows; it’s overkill for single-agent tools.
Anthropic Agent SDK: Minimal Overhead, Maximum Model Trust
How the Anthropic Agent SDK Handles Tool Selection
The Anthropic Agent SDK takes the most direct approach: tool selection is entirely delegated to the model via the standard Claude tools API. Tools are registered with JSON schemas, and the model decides what to call based on the tool descriptions and conversation context. The SDK adds an agentic loop on top — handling tool execution, result injection, and loop termination — but it doesn’t layer additional routing logic between the model and the tools.
import anthropic
client = anthropic.Anthropic()
tools = [search_tool_schema, lookup_tool_schema, update_tool_schema]
response = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=4096,
tools=tools,
messages=[{"role": "user", "content": user_message}]
)
The SDK’s philosophy is essentially: Claude is good at tool selection — get out of the way and let it work.
Benchmark Results
| Metric | Anthropic Agent SDK |
|---|---|
| Routing Accuracy | 93.5% |
| Semantic Match Rate | 91.0% |
| Selection Latency (p50) | 28ms |
| Selection Latency (p95) | 74ms |
| Tool Call Redundancy Rate | 9.0% |
What the numbers mean: The Anthropic Agent SDK delivers the highest routing accuracy (93.5%) and lowest latency (28ms p50) of the three frameworks. The accuracy advantage is a direct reflection of Claude’s native tool-use capabilities — the model has been trained extensively on tool calling, and the SDK’s minimal overhead means that model capability translates directly into agent behavior with no framework-level distortion.
The 28ms p50 latency is striking. The SDK’s thin abstraction layer means almost zero framework overhead — the only latency beyond the model inference is the HTTP round-trip and minimal SDK processing. The p95 at 74ms stays well-controlled even on complex multi-tool scenarios.
Semantic match rate at 91.0% is competitive with CrewAI, with a different failure mode: unlike CrewAI’s narrowed tool scope, the SDK works with the full tool catalog, so semantic disambiguation happens at the model level. Claude handles this well but occasionally misroutes on highly ambiguous prompts with overlapping tool descriptions.
Redundancy at 9.0% reflects Claude’s tendency toward thoroughness — it will sometimes call a verification tool after a write operation even when not required.
Practical Takeaway
For teams building directly on Claude and not needing multi-agent orchestration, the Anthropic Agent SDK is the clear performance leader. The tradeoff is framework features: you get minimal scaffolding, and everything beyond the basic agentic loop — multi-agent coordination, state persistence, complex branching — requires custom implementation or a heavier framework on top.
Head-to-Head Comparison
| Metric | LangGraph | CrewAI | Anthropic Agent SDK |
|---|---|---|---|
| Routing Accuracy | 91.5% | 88.0% | 93.5% |
| Semantic Match Rate | 87.0% | 90.5% | 91.0% |
| Selection Latency (p50) | 42ms | 67ms | 28ms |
| Selection Latency (p95) | 118ms | 195ms | 74ms |
| Tool Call Redundancy | 11.5% | 8.5% | 9.0% |
| Configuration Overhead | High | Medium | Low |
| Multi-agent Support | Native | Native | Custom |
No single framework wins across all dimensions, which is exactly what you’d expect from tools built with different architectural philosophies.
Semantic Tool Matching: The Detail That Decides Production Viability
One finding worth calling out specifically: semantic tool matching degraded more than routing accuracy as tool catalog size increased. Across all three frameworks, adding tools beyond 25 in a single agent context caused measurable accuracy drops:
- LangGraph: -6.2% accuracy at 30 tools vs. 10 tools
- CrewAI: -2.1% accuracy at 30 tools vs. 10 tools (role scoping limits the effective size)
- Anthropic Agent SDK: -4.8% accuracy at 30 tools vs. 10 tools
The pattern is clear: tool catalog size is a first-order variable for semantic matching quality, and CrewAI’s role-based scoping is the most effective mitigation strategy regardless of which model is doing the selection. For large tool catalogs, consider whether the architecture naturally partitions tool access — if not, artificial scoping (even outside of CrewAI) is worth implementing.
Latency Deep-Dive: Where the Time Actually Goes
The p95 latency variance across frameworks tells a more interesting story than p50. LangGraph’s p95 spike (118ms) comes almost entirely from custom routing function execution — if your conditional edges are lightweight, the spike disappears. CrewAI’s p95 (195ms) is structural: multi-agent coordination is non-trivial even for simple tasks, and this overhead doesn’t compress easily.
The Anthropic Agent SDK’s tight p50/p95 spread (28ms/74ms) reflects its minimal framework layer. The 74ms p95 cases were all scenarios involving tool schema parsing for large schemas (>50 properties) — a one-time cost that could be mitigated with schema caching.
For latency-sensitive applications (real-time user interfaces, streaming tool execution), the SDK’s profile is the only one that leaves meaningful headroom.
Recommendations by Use Case
High-volume single-agent deployments → Anthropic Agent SDK. Best accuracy, lowest latency, minimal operational overhead.
Complex multi-specialist workflows → CrewAI. Role-based tool scoping delivers the best semantic matching at the cost of coordination latency.
Stateful, graph-defined pipelines with custom routing needs → LangGraph. The configuration investment pays off when you need fine-grained control over execution flow.
Large tool catalogs (25+ tools) → Any framework with explicit tool scoping, ideally combined with tool description optimization. This is the highest-leverage intervention regardless of framework choice.
What to Do Right Now
If tool selection is a bottleneck in your current agent, start with tool descriptions before switching frameworks. In my testing, improving tool docstring specificity (eliminating overlap between similar tools, adding concrete example use cases) improved routing accuracy by 4–7 percentage points across all three frameworks — more than the difference between any two frameworks in this benchmark.
After descriptions, audit your tool catalog size. If you’re running more than 20 tools in a single agent context, benchmark whether explicit scoping (either through role assignment or conditional tool loading based on task type) improves your production metrics.
Ready to run your own benchmarks? The test harness used in this evaluation — including tool schemas, prompt sets, and latency measurement scripts — is available in our framework evaluation toolkit. If you’re evaluating frameworks for a specific production use case, drop your scenario in the comments and I’ll follow up with targeted test configurations.
The Bottom Line
Dynamic tool selection is not a solved problem, and the gap between demo performance and production performance is real. The Anthropic Agent SDK leads on raw accuracy and latency thanks to minimal framework overhead and Claude’s native tool-use capabilities. CrewAI’s role-based scoping is the most robust architectural solution for large, diverse tool catalogs. LangGraph gives you the most control but demands the most engineering.
The right choice depends on your workload shape — but all three frameworks will serve you better if you invest in tool description quality and catalog size management before tuning framework-level configuration. The model is doing the hard work; your job is to make the problem as clear as possible.
Alex Rivera is a framework analyst at agent-harness.ai who runs hands-on benchmarks on AI agent tooling. Have a framework you want tested? Reach out or suggest it in the comments.