Skip to main content

LiteMultiAgent

Please note that the LiteMultiAgent repository is in development mode. We have open-sourced the repository to foster collaboration between contributors.

repo owner: Danni (Danqing) Zhang (danqing.zhang.personal@gmail.com)

main contributors: Balaji Rama (balajirw10@gmail.com), Shiying He (sy.he0303@gmail.com) and Jingyi Ni (jingyi.ni.personal@gmail.com)

In our exploration of building multi-agent systems, we have investigated AutoGen, CrewAI, LangGraph, and MetaGPT, but failed to find a multi-agent system that intuitively makes multi-agent systems more efficient. We have found that most examples provided by these frameworks could be accomplished with just one agent. We reimplemented the multi-agent examples using only one agent with a set of self-defined tools. However, we then realized that this system is not scalable when we have more and more tools. But if we can categorize the agents with different sets of tools into categories, then we are building a hierarchy of agents, where we could accomplish more types of tasks. At the same time, because of this design, the execution of sub-agents is naturally parallelized by parallel function calling, since agents use sub-agents as tools.

📰 News

  • [2024-10-02] Major framework refactoring introduces new agent classes: Function Calling, React, and High-Level Planning. It also defines Atomic agents using function tools and Composite agents employing both functions and sub-agents, enhancing overall system flexibility.
  • [2024-10-01] Integrate LiteWebAgent into LiteMultiAgent repo to enable hierarchical multi-agent framework with web browsing capacities.
  • [2024-09-28] LiteMultiAgent was refactored into a flexible hierarchical multi-agent framework, adding ToolRegistry, AgentFactory, and AgentManager, allowing users to register their own base tools and create custom agent hierarchies.
  • [2024-08-06] the initial version of LiteMultiAgent was released, showcasing a hierarchical multi-agent system capable of accomplishing a wide range of tasks.

✈️ 1. Getting Started

(1) Installation

From PyPI: https://pypi.org/project/litemultiagent/

pip install litemultiagent 

Set up locally First set up virtual environment, and allow your code to be able to see 'litemultiagent'

python3 -m venv venv
. venv/bin/activate
pip install -e .

Then please create a .env file, and update your API keys:

cp .env.example .env

(Optional) Supabase Database Set Up

If you want to save log to Supabase. Set up a Supabase project and retrieve the database URL from: https://supabase.com/dashboard/project/[PROJECT_NAME]/settings/database.

The DATABASE_URL follows: postgresql://:@:/. You can get this from Project Settings -> Database -> Connection string.

Save this URL in the .env file as SUPABASE_DATABASE_URL. Then, run:

python supabase_db_setup.py

This will create the multiagent table in your database

(2) Quickstart

After setting up your API keys, you can explore the examples in the examples folder:

  • The atomic agent uses functions as its tools.
  • The composite agent can utilize sub-agents as tools while also leveraging functions.
python examples/atomic/IOAgent.py   
python examples/composite/MasterAgent.py

🚀 2. Contributions

For how to contribute, see CONTRIBUTE. If you would like to contribute to the codebase, issues or pull requests are always welcome!

📄 3. Citing LiteMultiAgent

@misc{zhang2024litemultiagent,
  title={LiteMultiAgent},
  author={Zhang, Danqing and Rama, Balaji and He, Shiying and Ni, Jingyi},
  journal={https://danqingz.github.io/blog/2024/07/27/LiteMultiAgent.html},
  year={2024}
}

Metadata

Release files for litemultiagent 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litemultiagent 0.1.5
File Size Uploaded
litemultiagent-0.1.5.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for litemultiagent 0.1.5
File Interpreter ABI Platform
litemultiagent-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / litemultiagent-0.1.5.tar.gz

Download URL litemultiagent-0.1.5.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
72795ba42adf7dfaf3fbc4021f4cee036803dbf88778ac0479d1a9431d7814b8
BLAKE2b-256 checksum
How to use checksums
25dff000b0c8b273c2de020c4531eabf957b8871d752d1338b5e38e72197b9ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / litemultiagent-0.1.5-py3-none-any.whl

Download URL litemultiagent-0.1.5-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
860965d6ec3d8282976214e7d0ad2b67bf7ab2fc425dabab41742086be0aa45d
BLAKE2b-256 checksum
How to use checksums
97fbfd28cefcc3ceeccc87c66f009998f037dd60a83deb4860063c1d8ede0b3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page