AgentWeave — Pre-Inference Routing for Tool-Rich LLMs
AgentWeave is an open-source pre-inference routing and reliability layer for tool-rich LLM applications and multi-agent systems. It reduces the tools or agents exposed to the model before inference while keeping policy, provenance, recovery, execution, and evaluation explicit.
AgentWeave is maintained by Saurav Singla and is designed for systems using MCP (Model Context Protocol), A2A, LangGraph, AutoGen, function calling, tool routing, agent routing, and multi-agent orchestration.
Start here
- AgentWeave repository
- 30-second start
- MCP integration
- A2A interoperability
- LangGraph integration
- AutoGen integration
- BFCL reproduction
- API compatibility
- Research paper
What problem does AgentWeave solve?
LLM and agent applications can expose hundreds or thousands of tools, APIs, or specialist agents. Sending the entire action catalog to the model increases the decision space, prompt size, and routing difficulty. AgentWeave performs routing before reasoning: it applies policy and capability constraints, selects a smaller relevant candidate set, and then hands that reduced action space to the downstream model or agent framework.
Core use cases
- MCP tool routing for large Model Context Protocol tool catalogs
- LLM tool selection and function-calling systems with many candidate tools
- Multi-agent routing and specialist-agent selection
- LangGraph workflows requiring explicit routing before model execution
- AutoGen teams with task-aware participant selection
- A2A agent interoperability with explicit selection and execution boundaries
- Policy-aware routing, recovery, provenance, and reproducible evaluation
Research
AgentWeave accompanies the paper “AgentWeave: Routing Before Reasoning for Efficient Function Calling in Tool-Rich Language Models.”
Project identity
Canonical source repository: github.com/sauravsingla/agentweave
Author and maintainer: Saurav Singla