Skip to main content

A Task-Level Distributed Agent Workflow Framework for building scalable, resource-efficient multi-agent systems

Project description

Maze: A Distributed Framework for LLM Agents

Website Documentation

🌟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


🚀Quick Start

1. Install

From PyPI (Recommended)

pip install maze-agent

From source

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

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)

🖥️ 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.

Builtin Task Workflow

Design Workflow Screenshot
Design Workflow Video

User Defined Task Workflow

Check Result Screenshot
Check Result Video

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maze_agent-1.0.2.tar.gz (65.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maze_agent-1.0.2-py3-none-any.whl (63.7 kB view details)

Uploaded Python 3

File details

Details for the file maze_agent-1.0.2.tar.gz.

File metadata

  • Download URL: maze_agent-1.0.2.tar.gz
  • Upload date:
  • Size: 65.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for maze_agent-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9e50c6b4a535e72d2ed21188f33cd5164d8dd8dfca825356483b36b54f66c2fb
MD5 ae49c37fe49f8b62119cc7785e591981
BLAKE2b-256 c4407223870131162af0750516c343c699232283b0a9156691833280b77f6f71

See more details on using hashes here.

File details

Details for the file maze_agent-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: maze_agent-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 63.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for maze_agent-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d588bb3250ea820377fa0abbf32de7d9f88e93be0d0ca5f5eaa61974cf378f7e
MD5 a8dbbac5f1f02eb196fcc781596c6207
BLAKE2b-256 27904d8f39f7253b936622fd2d13716e09f1addf02679e78d0f3ff27ecce4211

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page