Metadata-Version: 2.4
Name: maze-agent
Version: 1.0.2
Summary: A Task-Level Distributed Agent Workflow Framework for building scalable, resource-efficient multi-agent systems
Author-email: Maze Development Team <your-email@example.com>
Maintainer-email: Maze Development Team <your-email@example.com>
License: MIT
Project-URL: Homepage, https://github.com/QinbinLi/Maze
Project-URL: Documentation, https://maze-doc-new.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/QinbinLi/Maze
Project-URL: Bug Tracker, https://github.com/QinbinLi/Maze/issues
Keywords: agent,workflow,distributed,multi-agent,task-scheduling,ray,langgraph,ai-agent,resource-management
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi==0.119.1
Requires-Dist: ray==2.50.1
Requires-Dist: uvicorn[standard]
Requires-Dist: zmq==0.0.0
Requires-Dist: networkx==3.4.2
Requires-Dist: websocket-client==1.9.0
Requires-Dist: cloudpickle==3.1.1
Requires-Dist: requests>=2.31.0
Requires-Dist: PyPDF2>=3.0.0
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: python-docx>=0.8.11
Requires-Dist: mutagen>=1.46.0
Requires-Dist: Pillow>=9.0.0
Requires-Dist: opencv-python>=4.8.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Dynamic: license-file

<h2 align="center"><img src="./assets/imgs/image.png" style="height:1em; width:auto; vertical-align:middle"/> Maze: A Distributed Framework for LLM Agents</h2>

<p align="center">
    <a href="https://mazeagent.net/">
        <img src="https://img.shields.io/badge/Website-mazeagent.net-blue?style=for-the-badge&logo=google-chrome&logoColor=white" alt="Website">
    </a>
    <a href="https://maze-doc-new.readthedocs.io/en/latest/">
        <img src="https://img.shields.io/badge/Docs-ReadTheDocs-black?style=for-the-badge&logo=readthedocs&logoColor=white" alt="Documentation">
    </a>
</p>

## 🌟Why  Maze？
- **Task-level**

  Maze enables fine-grained, task-level management, enhancing system flexibility and composability while supporting task parallelism to significantly improve the end-to-end performance of agent workflows.

- **Resource Management**

  Maze supports resource allocation for workflow tasks, effectively preventing resource contention both among parallel tasks within a single workflow and across multiple concurrently executing workflows.

- **Distributed Deployment**

  Maze supports not only standalone but also distributed deployment, allowing you to build highly available and scalable Maze clusters to meet the demands of large-scale concurrency and high-performance computing.

- **Multi-Agent Support**

  Maze can serve as a runtime backend for other agent frameworks.For example, it allows LangGraph to be seamlessly migrated to Maze and automatically gain task-level parallelism without modifying original logic. [**Example**](https://github.com/QinbinLi/Maze/tree/develop/examples/financial_risk_workflow)

<br>


## 🚀Quick Start

## 1. Install

**From PyPI (Recommended)**

   ```bash
   pip install maze-agent
   ```

**From source**

   ```bash
   git clone https://github.com/QinbinLi/Maze.git
   cd Maze
   pip install -e .
   ```
## 2. Launch Maze
   Launch Maze Head as maze server. The maze server can receive the workflow of the agent.

   ```
   maze start --head --port HEAD_PORT
   ```
   If there are multiple machines, you can connect other machines as maze workers to the maze head.
   ```
   maze start --worker --addr HEAD_IP:HEAD_PORT
   ```
## 3. Example

```python
from typing import Any
from maze import MaClient,task

#1.Define your task functions using the @task decorator
@task(
    inputs=["text"],
    outputs=["result"],
)
def my_task(params):
    text: Any = params.get("text")
    return {"result": f"Hello {text}"}

#2.Create the maze client
client = MaClient("http://localhost:8000")


#3.Create the workflow
workflow = client.create_workflow()
task1 = workflow.add_task(
    my_task,
    inputs={"text": "Maze"}
)

#4.Submit the workflow and get results
run_id = workflow.run()
workflow.show_results(run_id)
```
<br>



## 🖥️ Maze Playground
We support building workflows through a drag-and-drop interface on the Maze Playground.You can start the playground with the following command option.
```
maze start --worker --addr HEAD_IP:HEAD_PORT --playground 
```
Here are two vedios which show the process of using builtin tasks and uploading user-defined taks in maze playground. For detailed usage instructions, please refer to the [**Maze Playground**](https://maze-doc-new.readthedocs.io/en/latest/playground.html).


### Builtin Task Workflow
![Design Workflow Screenshot](https://meeting-agent1.oss-cn-beijing.aliyuncs.com/builtin_task.png)  
[Design Workflow Video](https://meeting-agent1.oss-cn-beijing.aliyuncs.com/builtin_task.mp4)

### User Defined Task Workflow
![Check Result Screenshot](https://meeting-agent1.oss-cn-beijing.aliyuncs.com/userdef_task.png)  
[Check Result Video](https://meeting-agent1.oss-cn-beijing.aliyuncs.com/userdef_task.mp4)


