Skip to main content

A flexible framework for building LLM-powered flows and mcp services

Project description

FlowLLM Logo

FlowLLM: A Flexible Framework for Building LLM-Powered Flows
Flow with Intelligence, Build with Simplicity.

Python Version PyPI Version License


FlowLLM is a configuration-driven framework for building LLM-powered applications. Write operations once, compose them via YAML configuration, and automatically get HTTP APIs and MCP toolsโ€”no boilerplate code needed.

๐Ÿ“– Table of Contents


๐Ÿ’ก Why FlowLLM?

The Problem: Building LLM services traditionally requires writing boilerplate routes, validation, documentation, and orchestration code for each endpoint.

The Solution: FlowLLM's configuration-driven approach lets you:

  • โœ… Write Operations Once - Focus on business logic in reusable Python ops
  • โœ… Configure, Don't Code - Compose workflows using YAML configuration
  • โœ… Auto-Generate Services - HTTP and MCP endpoints created automatically
  • โœ… Built-in Orchestration - Sequential (>>), parallel (|), and nested flows
  • โœ… Zero Boilerplate - No routes, validators, or service code needed
Feature Traditional Approach FlowLLM Approach
Service Creation Write FastAPI/Flask routes, handlers, validation Write YAML config - auto-registers HTTP + MCP
API Documentation Manually write OpenAPI specs Auto-generated from config
Workflow Changes Modify Python code, test, redeploy Update config, restart service
Orchestration Write custom coordination code Use expressions: >>, |, ()

Perfect For: Rapid prototyping, microservices, AI agent tools, data pipelines, enterprise AI applications.


๐Ÿš€ Getting Started

Installation

pip install flowllm

For detailed setup instructions, see the Installation Guide.

Quick Start

See the Quick Start Guide to build your first LLM service in 30 seconds.


๐ŸŽฏ Core Workflow

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Build Ops     โ”‚      โ”‚  Configure YAML  โ”‚      โ”‚    Auto-Register         โ”‚
โ”‚   (Python)      โ”‚  โ†’   โ”‚   (Workflows)    โ”‚  โ†’   โ”‚    Services              โ”‚
โ”‚                 โ”‚      โ”‚                  โ”‚      โ”‚                          โ”‚
โ”‚  โ€ข BaseOp       โ”‚      โ”‚  flow:           โ”‚      โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ€ข BaseAsyncOp  โ”‚      โ”‚    workflow:     โ”‚      โ”‚  โ”‚  HTTP Service      โ”‚  โ”‚
โ”‚  โ€ข BaseMcpOp    โ”‚      โ”‚      description โ”‚      โ”‚  โ”‚  POST /workflow    โ”‚  โ”‚
โ”‚  โ€ข BaseRayOp    โ”‚      โ”‚      flow_contentโ”‚      โ”‚  โ”‚  OpenAPI docs      โ”‚  โ”‚
โ”‚                 โ”‚      โ”‚      tool:       โ”‚      โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                 โ”‚      โ”‚        parametersโ”‚      โ”‚                          โ”‚
โ”‚                 โ”‚      โ”‚                  โ”‚      โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚                 โ”‚      โ”‚  backend: http   โ”‚      โ”‚  โ”‚  MCP Service       โ”‚  โ”‚
โ”‚                 โ”‚      โ”‚     or mcp       โ”‚      โ”‚  โ”‚  Tool: workflow    โ”‚  โ”‚
โ”‚                 โ”‚      โ”‚                  โ”‚      โ”‚  โ”‚  Auto-discovered   โ”‚  โ”‚
โ”‚                 โ”‚      โ”‚                  โ”‚      โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Three Simple Steps:

  1. Create an Op - Write a Python class implementing your business logic
  2. Configure in YAML - Define workflow and service endpoints
  3. Launch - Run one command to start your HTTP or MCP service

No manual routing, no endpoint definitions, no service code - just configuration!


โœจ Architecture

FlowLLM adopts a three-layer configuration-driven architecture:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Service Layer (ๅค–ๅฑ‚)                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚  โ”‚ HTTP Service โ”‚  โ”‚  MCP Service โ”‚  โ”‚  CMD Service โ”‚              โ”‚
โ”‚  โ”‚   FastAPI    โ”‚  โ”‚   FastMCP    โ”‚  โ”‚  Command Lineโ”‚              โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚                 Auto-Register from Configuration                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         Flow Layer (ไธญๅฑ‚)                            โ”‚
โ”‚  โ€ข Sequential: op1 >> op2 >> op3                                    โ”‚
โ”‚  โ€ข Parallel: (op1 | op2 | op3)                                      โ”‚
โ”‚  โ€ข Nested: op1 >> (op2 | op3) >> op4                                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Foundation Layer (ๅบ•ๅฑ‚)                           โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”‚
โ”‚  โ”‚ Op Lib   โ”‚  โ”‚ LLM Lib  โ”‚  โ”‚Embedding โ”‚  โ”‚ Storage  โ”‚            โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค            โ”‚
โ”‚  โ”‚ BaseOp   โ”‚  โ”‚ OpenAI   โ”‚  โ”‚ OpenAI   โ”‚  โ”‚ElasticS. โ”‚            โ”‚
โ”‚  โ”‚BaseAsync โ”‚  โ”‚ LiteLLM  โ”‚  โ”‚Compatibleโ”‚  โ”‚ChromaDB  โ”‚            โ”‚
โ”‚  โ”‚BaseTool  โ”‚  โ”‚DashScope โ”‚  โ”‚          โ”‚  โ”‚  Local   โ”‚            โ”‚
โ”‚  โ”‚BaseMcpOp โ”‚  โ”‚  Custom  โ”‚  โ”‚  Custom  โ”‚  โ”‚  Cache   โ”‚            โ”‚
โ”‚  โ”‚BaseRayOp โ”‚  โ”‚          โ”‚  โ”‚          โ”‚  โ”‚          โ”‚            โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Design Principles

  1. Separation of Concerns - Ops (business logic), Flows (orchestration), Services (protocol handling)
  2. Configuration over Code - Ops in Python, Flows in YAML, Services auto-generated
  3. Dependency Injection - ServiceContext manages shared resources (LLM, VectorStore, etc.)
  4. Registry Pattern - Dynamic loading and discovery based on configuration

Complete Data Flow

Request โ†’ Service Layer (HTTP/MCP)
       โ†“
Flow Layer (Parse expression โ†’ Build DAG)
       โ†“
Foundation Layer (Execute ops with context)
       โ†“
Response (JSON/MCP result)

๐ŸŽฏ Features

๐Ÿ“ฆ Pre-built Operations

Gallery Ops: SimpleLLMOp, ReactLLMOp, ExecuteCodeOp, TranslateCodeOp
Search Ops: TavilySearchOp, DashScopeSearchOp, McpSearchOp
Research Ops: DashScopeDeepResearchOp, LangChainDeepResearchOp
Data Ops: Various extraction and processing operations

๐Ÿ”ง Advanced Capabilities

  • Multi-LLM Support - OpenAI, LiteLLM (100+ providers), DashScope, custom providers
  • Vector Storage - Elasticsearch, ChromaDB, local file-based, in-memory
  • Async/Streaming - Full async support with SSE streaming responses
  • Distributed Computing - Ray integration for scaling operations
  • Caching - Intelligent caching with TTL and automatic serialization
  • Web Crawling - Integrated crawl4ai for content extraction

๐Ÿงช Workflow Patterns

  • Simple LLM Chat - Direct model interaction
  • Multi-Step Research - Sequential search, summarization, validation
  • Parallel Processing - Concurrent sentiment analysis, keyword extraction
  • Complex Pipelines - Nested sequential and parallel operations

๐Ÿ“š Resources

Documentation

Examples & Configuration

  • Examples: test/ directory for practical examples
  • Configuration: flowllm/config/ for sample configs

Latest Updates

  • [2025-10] FlowLLM v0.1.10 - Enhanced async support and stability
  • [2025-09] Financial data modules with 26+ pre-built flows
  • [2025-09] Deep research with multiple search backends
  • [2025-08] MCP (Model Context Protocol) support
  • [2025-06] Multi-backend vector storage

โš–๏ธ License

Apache License 2.0 - see LICENSE file for details.


๐ŸŒŸ Star History

If you find FlowLLM useful, please consider giving it a star!

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

flowllm-0.1.11.2.tar.gz (171.2 kB view details)

Uploaded Source

Built Distribution

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

flowllm-0.1.11.2-py3-none-any.whl (215.0 kB view details)

Uploaded Python 3

File details

Details for the file flowllm-0.1.11.2.tar.gz.

File metadata

  • Download URL: flowllm-0.1.11.2.tar.gz
  • Upload date:
  • Size: 171.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flowllm-0.1.11.2.tar.gz
Algorithm Hash digest
SHA256 4c026cd65b6bfee50440d26ea7ab108723ea829879726b3d48c285975235551a
MD5 bf311f7f5c11eb6ff8ccda0250870726
BLAKE2b-256 ba069632cea4f50bbda641843fa0f5b57b3964b3ff570dc59a7886681e1ac3e8

See more details on using hashes here.

File details

Details for the file flowllm-0.1.11.2-py3-none-any.whl.

File metadata

  • Download URL: flowllm-0.1.11.2-py3-none-any.whl
  • Upload date:
  • Size: 215.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flowllm-0.1.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b5b6d3a3bc3c1309fc46ddaf373992fad5b938e3e605e4995f8d41e0bfbfa100
MD5 ecf65e7f5c737a6798a6eae671275e84
BLAKE2b-256 6cbcadafbd9b6be88c145bcd2c0213cb924a1286c71350f05e139114592d6a0d

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