Papers
Topics
Authors
Recent
Assistant
AI Research Assistant
Well-researched responses based on relevant abstracts and paper content.
Custom Instructions Pro
Preferences or requirements that you'd like Emergent Mind to consider when generating responses.
Gemini 2.5 Flash
Gemini 2.5 Flash 70 tok/s
Gemini 2.5 Pro 48 tok/s Pro
GPT-5 Medium 27 tok/s Pro
GPT-5 High 24 tok/s Pro
GPT-4o 75 tok/s Pro
Kimi K2 175 tok/s Pro
GPT OSS 120B 447 tok/s Pro
Claude Sonnet 4.5 Pro
2000 character limit reached

Dynamic ReAct: Scalable Tool Loading for AI Agents

Updated 26 September 2025
  • Dynamic ReAct is a framework that dynamically selects and loads only the subset of relevant tools per query in expansive MCP environments.
  • It employs multi-stage semantic retrieval, query decomposition, and hierarchical refinement to reduce computational overhead while boosting retrieval accuracy.
  • This approach enables scalable, efficient operation for general-purpose AI agents, significantly cutting tool loading by up to 50% per query.

Dynamic ReAct denotes a family of mechanisms and architectures enabling ReAct agents—typically LLM-driven planners that interleave reasoning traces (“Thought”) and tool actions (“Act”)—to operate efficiently and scalably in large Model Control Protocol (MCP) environments. In such contexts, the tool registry may comprise hundreds or thousands of callable APIs, plugins, or modules, presenting a challenge due to LLMs’ inherent contextual memory limitations. Rather than binding all tools at once, Dynamic ReAct frameworks dynamically select and load only the subset of relevant tools needed per user query, using meta-tools, semantic retrieval, and hierarchical refinement architectures to balance retrieval accuracy with low computational and memory overhead. This approach enables the deployment of general-purpose AI agents that remain performant and adaptive as their environments (and tool registries) scale.

1. Core Problem: Tool Selection at Scale in MCP Environments

The exponential growth of MCP tool registries creates a bottleneck for traditional ReAct agents. Loading the full set of tool schemas as context for the LLM is computationally prohibitive beyond a few dozen options. The challenge is to select, from among potentially thousands of available tools, those relevant to a given query or task, while operating within the LLM’s token limit. Attempts to increase the number of loaded tools via direct vector search or by always loading the same meta-tools fail to deliver both context efficiency and retrieval precision in large-scale environments (Gaurav et al., 22 Sep 2025).

Dynamic ReAct addresses this by formulating tool selection as a nested search, filtering, and loading process—delegated to dedicated meta-tools and guided by advanced retrieval strategies including semantic vector search, query decomposition, and (optionally) hierarchical application filtering.

2. Progression of Architectures: From Direct Search to Search-and-Load

The paper delineates five architectural strategies, progressively increasing tool selection intelligence and efficiency:

Approach Search/Selection Process Tool Loading Overhead
Baseline Direct Search User query → vector search over entire set High (often dozens to hundreds)
Meta-Tool: Query Building LLM rewrites query to atomic sub-queries, then vector search Moderate (still broad selection)
Search-and-Load Meta-tool executes multistage vector search and deduplication, LLM loads only final set Low (<5<5 per query)
Hierarchical Search First restricts by application, then tool Lower, extra application call
Fixed Tool Set Consistent meta-tool registry, always loaded Constant, but less efficient long term

The search-and-load mode is highlighted as the most computationally efficient: it operates by first executing semantic or augmented vector searches (fetching the top k1k_1 candidates for each atomic sub-query), deduplicating results, capping per-application tool count (k2k_2), and then issuing a targeted binding call that loads only the small, relevant set needed for the downstream task (Gaurav et al., 22 Sep 2025).

3. Semantic Retrieval, Query Decomposition, and Vector Search Optimization

Dynamic ReAct’s tool selection efficacy depends fundamentally on its embedding and retrieval strategies. The workflow proceeds as follows:

  • The user’s free-form request is (optionally) decomposed by the LLM into smaller atomic queries tailored for tool search (e.g., splitting “Analyze sales and send a summary via email” into “analyze sales” and “send email”).
  • A vector database (populated with tool descriptions and documentation) retrieves semantically closest tools for each query (using models such as OpenAI’s text-embedding-3-large or voyage-context-3, with or without additional context enrichment generated by models like Anthropic Sonnet 4).
  • Results are deduplicated and capped, and only this subset is loaded for the task.

Empirical comparison shows that with naïve embeddings, top-5 retrieval accuracy is approximately 40%, improving to ~60% with optimized embeddings and context enrichment. Table formatting from the source paper:

$\begin{tabular}{|l|c|c|} \hline Embedding Model & Top-5 (\%) & Top-10 (\%) \ \hline OpenAI (text-embedding-3-large) & 40 & 64 \ voyage-context-3 + Sonnet context enrichment & 60 & 68 \ voyage-context-3 + Sonnet context + BM25 & 56 & 72 \ \hline \end{tabular}$

For realistic scenarios such as “send email,” the approach consistently returns the relevant tools (e.g., outlook_send_mail, google_mail_send_email) within top-5 ranks when using context-enriched semantic search (Gaurav et al., 22 Sep 2025).

4. Experimental Findings: Efficiency and Task Success

The search-and-load architecture achieves a substantial reduction in loaded tools (up to 50% fewer per query) relative to conventional strategies that either bind all tools upfront or retrieve overly large tool lists. Crucially, this reduction does not sacrifice downstream task accuracy—agents maintain high completion rates. Improved retrieval accuracy from hybrid approaches—combining vector search, query enrichment, and lexical methods (BM25)—demonstrate the approach’s adaptability to evolving MCP tool corpora (Gaurav et al., 22 Sep 2025).

A key operational insight is that tool registry scalability is achieved without inflating LLM context size; only the “active” subset—typically 3–5 tools per user query, even in registries with thousands—are ever loaded and described in the LLM prompt. This efficient selection is essential for real-time, session-based ReAct agent workflows.

5. Implications for General-Purpose and Adaptive AI Agents

Dynamic ReAct enables general-purpose agents to operate flexibly in arbitrary, evolving MCP-controlled environments such as enterprise automation platforms, scientific workflow systems, and personal AI assistants. By loading and composing tools dynamically, agents can synthesize workflows spanning multiple domains (e.g., data processing, messaging, API orchestration) without requiring prior knowledge of the entire tool registry.

This design directly supports continuous learning and context adaptation. As new tools are registered (or deprecated), no retraining or global context refactoring is required; the agent’s search-and-load logic—possibly future-augmented by reinforcement learning based on tool use outcomes—can continually optimize selection (Gaurav et al., 22 Sep 2025).

A further implication is efficient resource allocation in production settings. By narrowing tool loading, both memory and runtime API call costs are minimized, ensuring robust, scalable performance even as the tool registry expands by orders of magnitude.

6. Limitations and Future Directions

While Dynamic ReAct architectures demonstrate significant gains in scaling and efficiency, the paper notes several open areas for future research:

  • Further improvements to embedding/model selection for even higher semantic retrieval fidelity.
  • Incorporation of hybrid methods (e.g., BM25 + vector search) to optimize for both recall and precision, especially on ambiguous or long-tail queries.
  • Online learning strategies—potentially leveraging execution signals (e.g., tool invocation success/failure)—to refine search parameters and tool ranking dynamically.
  • Exploration of hierarchical or multi-pass architectures that, for example, integrate application, domain, and tool-level constraints transparently.

A plausible implication is that, as registry sizes increase and user tasks grow more complex (e.g., requiring multi-hop, cross-application tool composition), Dynamic ReAct search-and-load strategies will become a core enabler for generalist, robust, LLM-driven digital agents (Gaurav et al., 22 Sep 2025).

7. Summary Table: Architectural Comparison

Architecture Key Mechanism Overhead Observed Benefits
Baseline Direct Search Single vector search High Simplicity, but low precision
LLM Query Decomposition Atomic query + search Moderate Increased focus
Search-and-Load Two-stage vector search + dedup. Low High task accuracy/efficiency
Hierarchical (App-aware) Application filter + search Low–Moderate Focused, may add redundancy
Fixed Meta-Tool Registry Constant schema Constant Ease of caching, less robust

This table encapsulates the progressive refinement from naïve approaches to the deliberate, efficient strategy underlying Dynamic ReAct (Gaurav et al., 22 Sep 2025).


Dynamic ReAct constitutes a foundational development for scalable, context-efficient orchestration of tools in the next generation of ReAct and LLM-agent systems, supporting robust, general-purpose automation across arbitrarily large and evolving MCP-controlled environments.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)
Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to Dynamic ReAct.