Networked LLM Agents: Toward Autonomous LLMs for Querying Heterogeneous Databases
摘要
Recent advancements in large language models (LLMs) have enabled the rise of LLM agents. These agents can act autonomously, make decisions, and perform tasks with minimal human input. However, one of the most pressing challenges is enabling these agents to interact with open-book data stored in real-world database environments to respond to user queries. In real-world settings, within a given organization data is not stored in a single, uniform system but is spread across multiple databases with different formats and structures. To interact with this open-book data, LLM agents must adapt to different schemas, process complex queries, and integrate information from multiple sources into a coherent response. Existing agentic frameworks are too generic and struggle to meet these demands. To address this, we propose a networked agent framework. In our approach, we consider a set of distributed specialized LLM agents, each dedicated to a specific database. These agents are orchestrated by a central router agent LLM. The router agent decomposes queries using chain-of-thought reasoning, delegates retrieval tasks to relevant agents, and integrates their structured responses into a coherent final answer. To validate our approach, we implemented a prototype across several widely used databases. Our experimental results demonstrate the effectiveness of our approach in accurately responding to complex queries in real-world data environments. These findings suggest that a networked LLM agent approach is a promising path forward for enabling interaction with complex data ecosystems.