Source-linked AI summary
AgentLite: A Lightweight Library for Building and Advancing Task-Oriented LLM Agent System
Zhiwei Liu, Weiran Yao, Jianguo Zhang, Liangwei Yang, Zuxin Liu, Juntao Tan, Prafulla K. Choubey, Tian Lan, Jason Wu, Huan Wang, Shelby Heinecke, Caiming Xiong, Silvio Savarese
TL;DR
LLM-agent research needs easier ways to test reasoning strategies and architectures, but existing frameworks can be difficult to refactor. AgentLite addresses this with a lightweight, task-oriented library for customizable individual and multi-agent systems, and demonstrates applications across several settings. Its scope includes backend-hosted LLM assumptions and reported application evaluations.
Problem
Existing libraries make implementing new reasoning strategies and agent architectures complex because of overhead, hard-coded reasoning types, or fixed architectures.
Source: §1 · p. 2Method
AgentLite provides a lightweight, task-oriented library with customizable agent components and manager-based orchestration of multi-agent systems.
Source: §1 · p. 2Results
AgentLite achieves comprehensive LLM-agent capabilities with less than 1k lines of code and supports benchmark reproduction, application prototyping, and new-strategy evaluation.
Source: §1 · p. 3, §6 · p. 11Takeaways & Limitations
AgentLite offers a flexible platform for developing and evaluating customized LLM-agent reasoning strategies, architectures, and applications.
Source: §1 · p. 3, §6 · p. 11The evaluated LLMs are assumed to run in the backend.
Source: §4.1 · p. 7
Abstract
from arXiv · showhide
The booming success of LLMs initiates rapid development in LLM agents. Though the foundation of an LLM agent is the generative model, it is critical to devise the optimal reasoning strategies and agent architectures. Accordingly, LLM agent research advances from the simple chain-of-thought prompting to more complex ReAct and Reflection reasoning strategy; agent architecture also evolves from single agent generation to multi-agent conversation, as well as multi-LLM multi-agent group chat. However, with the existing intricate frameworks and libraries, creating and evaluating new reasoning strategies and agent architectures has become a complex challenge, which hinders research investigation into LLM agents. Thus, we open-source a new AI agent library, AgentLite, which simplifies this process by offering a lightweight, user-friendly platform for innovating LLM agent reasoning, architectures, and applications with ease. AgentLite is a task-oriented framework designed to enhance the ability of agents to break down tasks and facilitate the development of multi-agent systems. Furthermore, we introduce multiple practical applications developed with AgentLite to demonstrate its convenience and flexibility. Get started now at: \url{https://github.com/SalesforceAIResearch/AgentLite}.
1 Introduction
AgentLite addresses the difficulty of researching new LLM-agent reasoning strategies and architectures by providing a lightweight, task-oriented library for customizable agents and multi-agent systems.
- Existing libraries can be difficult to refactor because they impose complex agent creation overhead, hard-coded reasoning types, or fixed architectures.LangChain is described as over-complicated for new reasoning types and architectures, while AutoGen fixes multi-agent conversation and code execution.Source: §1 · p. 2
- AgentLite provides a lightweight code architecture with minimal dependencies and customizable prompts, memory, action sequences, and LLMs.Source: §1 · p. 2
- Its task-oriented design assigns agents specific tasks and supports communication and collaboration in complex multi-agent systems.Source: §1 · p. 2
- AgentLite supports hierarchical multi-agent orchestration by using manager agents to coordinate teams of individual agents.The manager-agent arrangement is described as supporting broader task objectives through coordinated team-agent actions.Source: §1 · pp. 2–3
- The library is intended for both benchmark evaluation and deployment in real-world applications, demonstrating practical implementation potential.Source: §1 · p. 3
- AgentLite achieves comprehensive LLM-agent capabilities with less than 1k lines of code, compared with existing libraries including AutoGen, LangChain, Camel, and CrewAI.Source: §1 · p. 3
2 AgentLite Framework
AgentLite builds agents from modular individual-agent components and extends them with manager agents that decompose tasks and coordinate sequential execution.
2 AgentLite Framework
- The framework combines a base Individual Agent with a Manager Agent for constructing multi-agent systems.Source: §2 · p. 3, Figure 1 · p. 3
2.1 Individual Agent
- An Individual Agent uses PromptGen, LLM, Actions, and Memory to generate executable actions, receive observations, and retain action-observation history.Source: Figure 1 · p. 3, §2.1 · pp. 3–4
- PromptGen assembles role, instruction, constraint, action, and example components, while developers can customize prompts for action generation.Source: §2.1 · p. 3
- Developers extend BaseAction with executable functions and parameter documentation; adding actions such as Think enables reasoning strategies such as ReAct.Source: §2.1 · pp. 3–4
2.2 Manager Agent
- ManagerAgent decomposes a task into sub-tasks and delegates them to individual agents, which can themselves be organized into deeper hierarchies.Source: §2.2 · pp. 4–5
- TaskPackages communicate instructions and results between managers and subordinate agents, with later packages generated sequentially from earlier execution feedback.Source: §2.2 · p. 5
3 Agent Development
AgentLite supports lightweight development of new LLM-agent reasoning types and architectures through customizable actions, agents, and multi-agent configurations.
3.1 New Reasoning Type
- AgentLite unifies reasoning and executable tool use as Action modules, making new reasoning types such as ReAct easy to add.Developers can also create analogous Plan and Reflect actions by changing action prompts and parameters.Source: §3.1 · pp. 5–6
3.2 New Agent Architecture
- New agent architectures can be configured in a few lines of Python, including systems with human agents and multiple LLM backbones.AgentLite supports arbitrary numbers of agents, human-in-the-loop orchestration, and distinct LLM configurations for different agents.Source: §3.2 · pp. 6–7
- A Copilot Agent receives human instructions through a HumanInput action added to a BaseAgent alongside other actions.The HumanInput action inherits from BaseAction and returns the instruction collected from a human.Source: §3.2 · p. 6
- Copilot Multi-Agent systems add a HumanAgent to a manager-controlled team so human instructions guide other agents' task completion.The HumanAgent subclasses ABCAgent and collects instructions through interactive input.Source: §3.2 · pp. 6–7
- Multi-LLM Multi-Agent systems assign configurable LLM backbones to different agents and assemble them under a manager agent.The manager's own LLM is also configurable through LLMConfig.Source: §3.2 · p. 7
4 Benchmark
AgentLite is evaluated on HotPotQA and WebShop, using task-specific action spaces and benchmark settings to compare multiple language models.
4 Benchmark
- The benchmark section evaluates AgentLite implementations across different agent benchmarks to assess performance with multiple language models.The reported applications include HotPotQA retrieval-augmented question answering and WebShop browser decision making.Source: §4 · p. 7, §4.1 · p. 8, §4.2 · p. 8
4.1 Retrieval-Augmented Question Answering
- HotPotQA agents use WikipediaSearch, Think, and Finish actions to retrieve information, integrate it through reasoning, and produce a final answer.The benchmark evaluates multi-hop question answering across multiple documents.Source: §4.1 · pp. 7–8
- GPT-4 variants outperform GPT-3.5 across all HotPotQA difficulty levels, while GPT-4-32k performs best on the medium set and xLAM-v0.1 exceeds GPT-3.5.The HotPotQA evaluation uses F1-Score and Accuracy across easy, medium, and hard questions.Source: §4.1 · pp. 7–8
4.2 Web Browser Decision Making
- On WebShop, GPT-4-32k performs much better than other LLMs, especially on hard shopping tasks, while xLAM is comparable with GPT-3.5.The evaluation follows AgentBoard's setup with 251 instances: 182 easy and 69 hard tasks.Source: §4.2 · p. 8, Table 3 · p. 8
- WebShop agents require wrapping the environment's actions with BaseAction and inserting them into BaseAgent, then receive final shopping rewards.WebShop contains 1.18M real-world products and associates each instruction with one ground-truth product and attribute requirements.Source: §4.2 · p. 8
5 Applications
AgentLite supports applications ranging from online research and image interaction to math, chess, and multi-agent philosophical discussion. These examples illustrate task-oriented design, human-in-the-loop interaction, multimodality, and manager-coordinated collaboration.
5 Applications
- AgentLite applications span practical, human-in-the-loop, multimodal, and innovative settings, demonstrating varied uses of the framework.Source: §5 · p. 9
5.1 A1: Online Painter
- Online Painter coordinates manager, search, and painter agents to retrieve visual information and generate an image from object features.Search uses DuckDuckGo and Wikipedia, while the Painter Agent uses a DALLE action.Source: §5.1 · pp. 9–10
5.2 A2: Interactive Image Understanding
- Interactive Image Understanding combines image display, image querying, and human input for multi-round visual question answering.The ImageQuery action is backed by the gpt-4-vision-preview API.Source: §5.2 · p. 10
5.3 A3: Math Problem Solving
- Math Problem Solving uses a single agent with HumanInput and WolframAlphaSolver actions, showing that simple applications need not use a manager agent.The paper contrasts this with more complex multi-agent scenarios where a Manager Agent organizes the workflow.Source: §5.3 · p. 10
5.4 A4: Chess Game
- Chess Game pairs human keyboard input with a Chess Agent that views the board, finds legal moves, and moves pieces, while also supporting agent-agent play.The Chess Agent uses BoardView, LegalMoves, and BoardMove actions in addition to Think and Finish.Source: §5.4 · pp. 10–11
5.5 A5: Philosophers Chatting
- Philosophers Chatting uses a Manager Agent to ask Socrates, Confucius, and Aristotle agents for opinions and summarize their responses.The application combines a human questioner with philosopher agents grounded by their literary works.Source: §5.5 · p. 11
6 Conclusion and Future Work
AgentLite is presented as a lightweight codebase for reproducing benchmarks, prototyping applications, and evaluating new reasoning strategies and agent architectures. Future work will add communication methods and reasoning types.
- AgentLite supports benchmark reproduction, application prototyping, and integration and evaluation of new reasoning strategies and agent architectures.The paper also identifies additional inter-agent communication methods and reasoning types as future work.Source: §6 · p. 11
Related papers
This paper cites
- HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answering2018
- Generative Agents: Interactive Simulacra of Human Behavior2023
- ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs2023
- Gorilla: Large Language Model Connected with Massive APIs2023
- AgentTuning: Enabling Generalized Agent Abilities for LLMs2023