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.5.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.5-py3-none-any.whl (223.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flowllm-0.1.11.5.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.5.tar.gz
Algorithm Hash digest
SHA256 20cf36a4c266099222a23c60d39f12a478efde0170449db692c622883beaf298
MD5 6eff401fbb31fc93fb5b569c27348513
BLAKE2b-256 d4e08569f02eb09c5c2a2900a3d36ef220f46258597b2a10324dad42d3f3eae0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flowllm-0.1.11.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 299990257003567f0beb231ff14f67c3ab2fdd5257b99150b5245fbb9b652ebb
MD5 c372be06adc8b0c8912d79fc43a24acf
BLAKE2b-256 3795fd392d1dedeb3477902094f41b20fabe57883d2b083c66875a7e059f117a

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