A multi-agent asynchronous framework for swarm communication and task execution.
Project description
AgentEx

AgentEx is an autonomous multi-agent, multi-swarm framework designed to showcase how agents and swarms of agents can coordinate, communicate, and complete tasks in an asynchronous, event-driven environment.
AgentEx has the potential to power a wide range of AI systems and workflows. Community support and feedback are essential as we continue to refine and expand this framework!
We’re starting with Retrieval-Augmented Generation (RAG) integrations, making AgentEx seamlessly compatible with large language models and vector databases—empowering agents to retrieve and leverage external knowledge for complex tasks. But RAG is just the beginning! Our long-term vision is for AgentEx to become a flexible, ever-growing platform capable of supporting advanced workflows in AI, research, automation, and beyond.
Table of Contents
- Key Features
- Project Vision
- Getting Started
- Example Flow
- Contributing
- License
- Contact and Future Discussion
Key Features
Multi-Agent Swarms
- Swarm Composition: Each Swarm can contain multiple Agents, potentially grouped by roles or specialties (e.g.,
analytics,main, etc.). - Automatic Registration: Agents register themselves automatically in the swarm’s group dictionary.
Async Task Execution
- Task Types: Tasks can be either synchronous or asynchronous (
AsyncAgentTask). - Concurrent Processing: Each Agent runs tasks concurrently via
asyncio, ensuring the system handles multiple ongoing processes gracefully.
Communication Model
- Cross-Swarm Messaging: Agents or entire swarms can send messages to agents or groups in other swarms using a central hub (
CentralHub). - Intra-Swarm Messaging: Agents in the same swarm broadcast or target specific groups/agents.
- Broadcast Fallback: If a specified group doesn’t exist, the system can default to broadcasting messages to the entire swarm.
Sender and Recipient Metadata
- Detailed Information: Agents see details like:
from_groups: The group(s) of the sender (if the sender is also an Agent).to_group: Whether the message was intended for a specific group, a single agent, or broadcast to all.
Flexible Group Management
- Agent-Defined Groups: Agents define their own group memberships.
- Automatic Routing: Swarms automatically note which groups an agent belongs to and can route messages accordingly.
Swarm Autonomy
- Internal Task Queue: Each swarm has an internal queue of tasks.
- Automatic Distribution: Agents become “available” upon completing a task, and the swarm distributes queued tasks automatically.
Integration-Ready
- LLM Integration: The code is structured to plug in retrieval or summarization steps from LLMs to help Agents make “intelligent” decisions about tasks and data.
- Scalable Extensions: A stepping stone to more advanced or domain-specific expansions (e.g., financial analysis, e-commerce, data engineering, etc.).
Project Vision
RAG Integration
AgentEx aims to incorporate advanced LLM-driven retrieval. Future capabilities include:
- Semantic Searching: Agents query a vector store for relevant text chunks or knowledge graphs.
- Self-Healing Agents: If an agent encounters missing data, it can retrieve or generate the missing pieces through a knowledge API.
- LLM-Assisted Task Analysis: Agents use an LLM to interpret tasks, break them down, and spawn subtasks or sub-agents automatically.
Autonomous Learning
- Adaptive Agents: Over time, Agents can refine their strategies based on logs, successes, or errors.
- Self-Updating: The swarm or an “architect agent” might retrain or finetune certain models based on new data or tasks.
Expanded Communication Protocols
- From-Group Identification: Swarms themselves can have “swarm groups” (like an internal special role) to further contextualize messages.
- Federated Swarms: Multiple hubs in a distributed network exchanging tasks or knowledge.
Domain-Specific Skins
- Financial Swarms: For automated stock analysis & trading, hooking into real-time data.
- Enterprise Data Processing: Agents that unify logs, monitor data ingestion, run analytics pipelines, and share results.
- Creative Content Generation: Agents that co-write stories, design images, or produce marketing copy in synergy.
Enhanced Task Workflow
- Chained Tasks: Each result feeding into the next step or next agent automatically.
- Dynamic Task Prioritization: Agents negotiate who takes which tasks based on their group skills or load.
Getting Started
Clone the Repository
git clone https://github.com/onedavidwilliams/AgentEx.git
cd AgentEx
Set Up a Virtual Environment (Recommended)
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Install Dependencies
pip install -r requirements.txt
Run the Example
python AgentEx.py
This will spin up swarms, create agents, queue tasks, and show them exchanging messages.
Example Flow
- Swarm1 has
Agent1andAgent2. - Swarm2 has
Agent3andAgent4, each belonging to ananalyticsgroup. - Agents can perform tasks like:
- Fetching data (
DataFetchTask) - Processing data (
DataProcessingTask) - Analyzing results (
AnalysisTask)
- Fetching data (
- Cross-Swarm Message: “Hello, Swarm2 team” is broadcast to all agents in Swarm2, or specifically to
analyticsif that group is recognized.
Logs will indicate how messages are routed, whether tasks are asynchronous, and how agents handle them. Agents can see which group the message was sent to and which group(s) the sender belongs to.
Contributing
We welcome contributions, bug fixes, and ideas! To contribute:
-
Fork the Repository
-
Create a Feature Branch
git checkout -b feature/YourFeature
-
Commit Your Changes
git commit -m "Add some feature"
-
Push to the Branch
git push origin feature/YourFeature
Open a Pull Request
Potential Areas for Contribution
- RAG Integration: Hooking in a vector database or knowledge base.
- LLM-Based Advanced Agent Logic.
- Agent Introspection: More robust logging.
- GUI Development: Monitoring swarms, tasks, and agent communications in real-time.
License
This project is licensed under the GNU General Public License v3.0.
Contact and Future Discussion
If you have ideas for advanced swarm architectures or want to see:
- Custom Domain Expansions: (e.g., finance, e-commerce, DevOps)
- LLM-Driven Retrieval: For adaptive agent knowledge.
- Distributed Swarm Networks: Multi-hub or federated swarms.
Then please open an issue or pull request. Let’s evolve AgentEx into a powerful multi-agent + LLM synergy framework!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentex-0.0.5.tar.gz.
File metadata
- Download URL: agentex-0.0.5.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d211706308682f9f8c65960da617f83bf0688e2a76e26d6f833324d74acf4ed
|
|
| MD5 |
3e38020ec3c3fbf01dc86c9cef148ccd
|
|
| BLAKE2b-256 |
266219babf0cfe3fe970a7baa9fa613d4c492351a4b95e1e1a2cabf7c92db341
|
File details
Details for the file agentex-0.0.5-py3-none-any.whl.
File metadata
- Download URL: agentex-0.0.5-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bf3ebe81aebb661e2f32ee159d8e918b812324289357d10a932e645dcf9f53e
|
|
| MD5 |
e1151481cb43a57713db31ecb70c6600
|
|
| BLAKE2b-256 |
b56fffaf6db0d5bae56dd0719e194ff952312b0930111149cd4ea84aa88f66e1
|