# LazyLLM

> Low-code data flows for assembling multi-agent LLM applications

- Category: App Orchestration / App Frameworks
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/LazyAGI/LazyLLM
- Website: https://docs.lazyllm.ai/
- Canonical page: https://ai-tldr.dev/tools/lazyllm/

## In short

LazyLLM is a low-code Python framework for assembling multi-agent large-language-model applications. It sits in the App Frameworks category of the App Orchestration tools and is open-source, written in Python and licensed Apache-2.0. To get started: install the base package.

## Overview

LazyLLM is a low-code Python framework for assembling multi-agent large-language-model applications. Applications are built by composing a small set of control flows — pipeline, parallel, diverter, if, switch and loop — over ordinary functions and modules, which the project compares to snapping Lego bricks together. The design target is the whole loop the team describes as prototype building → data feedback → iterative optimization: stand a prototype up quickly, analyse bad cases with scenario-specific data, then iterate algorithms and fine-tune models at the points that matter.

Deployment is the part it tries hardest to remove from the developer's plate. A single call deploys every module in an assembled application; during proof-of-concept a lightweight gateway mechanism handles starting each sub-service (LLM, embedding and so on) and wiring the URLs between them, and at release time it packages images in one step so Kubernetes gateways, load balancing and fault tolerance can take over. The same application is meant to move between bare metal, development machines, Slurm clusters and public clouds without code changes.

It also unifies the experience across the substitutable pieces of an LLM stack. Online services and locally deployed models are driven through the same interface, as are the mainstream inference frameworks, fine-tuning frameworks, relational databases, vector databases and document stores. Locally it supports collie and peft for fine-tuning and lightllm and vLLM for inference, and can pick the framework and parameters — micro-batch size, tensor parallelism, ZeRO stage — automatically from the scenario; online it covers fine-tuning and inference services from OpenAI, SenseNova, Kimi, Zhipu and Tongyi Qianwen, plus embedding services from several of the same providers.

RAG is a first-class part of the framework rather than a separate library: Document, Parser, Retriever and Reranker components ship in the box, along with basic web front-ends such as a chat interface and a document-management interface. LazyLLM is Apache-2.0 and documented at docs.lazyllm.ai in both English and Chinese.

## What it does

- Control flows — pipeline, parallel, diverter, if, switch, loop — for composing agents out of plain functions and modules
- One-click deployment of every module in an application, with a lightweight gateway that wires sub-service URLs during prototyping
- One-step image packaging for release, so Kubernetes handles gateway, load balancing and fault tolerance
- Platform independence: the same code runs on bare metal, dev machines, Slurm and public clouds
- A single interface over local and online models, inference frameworks, fine-tuning frameworks and vector / document / relational stores
- Automatic selection of fine-tuning framework and model-splitting parameters from the scenario
- Built-in RAG components (Document, Parser, Retriever, Reranker) and ready-made chat and document-management web UIs

## Getting started

LazyLLM installs from PyPI. The base package pulls only the necessary dependencies; a second command adds the full optional stack.

1. Install the base package

   This installs lazyllm and its required dependencies only.

```bash
pip3 install lazyllm
```

2. Install the full dependency set

   The bundled installer pulls in the optional inference, fine-tuning and storage integrations.

```bash
pip3 install lazyllm
lazyllm install full
```

3. Or install from source

   Clone the repository and install the pinned requirements. Windows and macOS have their own setup notes in the documentation.

```bash
git clone git@github.com:LazyAGI/LazyLLM.git
cd LazyLLM
pip install -r requirements.txt
```

4. Read the cookbook

   The documentation site carries the flow reference and worked applications in English and Chinese; start there for a first pipeline.

```text
https://docs.lazyllm.ai/
```

## When to use it

- Reach for it when a multi-agent application has to move from a prototype to a deployed service without a rewrite
- Reach for it when the same application must run on a laptop, a Slurm cluster and a public cloud unchanged
- Reach for it to swap between hosted model APIs and locally served models behind one interface while experimenting
- Reach for it when fine-tuning is part of the iteration loop and you would rather not hand-pick frameworks and parallelism settings
