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.4.tar.gz (176.9 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.4-py3-none-any.whl (223.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flowllm-0.1.11.4.tar.gz
  • Upload date:
  • Size: 176.9 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.4.tar.gz
Algorithm Hash digest
SHA256 045101bb96943e6efa50e02c39763b5144c973d8143f12fd1721de57672492df
MD5 73aea1e5f575ce535617a4b9d6c16017
BLAKE2b-256 85e58cfd44e663b5d58cf5277ac6222c3725cad4f88ac179dad2f3aa77064a1f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flowllm-0.1.11.4-py3-none-any.whl
  • Upload date:
  • Size: 223.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 221a34c4f9e8f4756a540e15ae571389ac9fce0162d596595c19edd966843733
MD5 f3fd325692690e8e603a39cd183d5751
BLAKE2b-256 0df8b137731606ad84af48f95473c1f840e8e37d1531879bb0a7a751cfa54a82

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