A flexible framework for building LLM-powered flows and mcp services
Project description
FlowLLM: A Flexible Framework for Building LLM-Powered Flows
Flow with Intelligence, Build with Simplicity.
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:
- Create an Op - Write a Python class implementing your business logic
- Configure in YAML - Define workflow and service endpoints
- 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
- Separation of Concerns - Ops (business logic), Flows (orchestration), Services (protocol handling)
- Configuration over Code - Ops in Python, Flows in YAML, Services auto-generated
- Dependency Injection - ServiceContext manages shared resources (LLM, VectorStore, etc.)
- 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
crawl4aifor 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
- Installation Guide - Setup and environment configuration
- Quick Start Guide - Build your first service
- Specialized Guides in
doc/:
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
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 flowllm-0.1.11.1.tar.gz.
File metadata
- Download URL: flowllm-0.1.11.1.tar.gz
- Upload date:
- Size: 170.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93e3d2cff6a080dfbd115251df1a98a0450a44e83b3937eb1b6b60a1cd09e45d
|
|
| MD5 |
323045fdedcc4d3093298db65efd07cd
|
|
| BLAKE2b-256 |
e74fdb3adc76fcc46458bb88180a3fcc5c57fcc3e80a9c7a7bca0277b2b9dd21
|
File details
Details for the file flowllm-0.1.11.1-py3-none-any.whl.
File metadata
- Download URL: flowllm-0.1.11.1-py3-none-any.whl
- Upload date:
- Size: 214.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37f37757f259948b3a27fecf68075f07e649dc11fc6a7bdc547c799e59f77b15
|
|
| MD5 |
f74f0e3c542afa358407a39a0c94ec58
|
|
| BLAKE2b-256 |
a8d873d4c141c7352ec43e0e7fb424452758f5b7f3e31f399305c23b6253c548
|