2121FlowLLM is a configuration-driven LLM application framework that organizes workflows, service entrypoints, and
2222long-lived components with ** Service, Job, Step, and Component** .
2323
24+ ## 🧠 FlowLLM Development Skill
25+
26+ FlowLLM ships with a development Skill for coding agents. It explains the framework conventions, repository map,
27+ extension points, testing workflow, and review checklist for building or extending FlowLLM applications.
28+
29+ Start here when changing the codebase: [ FlowLLM Development Skill] ( skills/flowllm_dev/SKILL.md ) .
30+
2431## ✨ Core Features
2532
2633- ** Configuration-driven** : Starts from ` flowllm/config/default.yaml ` , with config files and dot-notation overrides.
@@ -33,37 +40,24 @@ long-lived components with **Service, Job, Step, and Component**.
3340 <img src =" docs/figure/flowllm-architecture.svg " alt =" FlowLLM Architecture " width =" 92% " >
3441</p >
3542
36- ## 🆕 Minimal CLI Flow
37-
38- FlowLLM also includes ` flowllm.lite ` , a tiny local CLI flow runner for scripts that do not need the full service
39- framework.
40- It maps ` fl --action --field value ` to a Pydantic config and a small ordered ` BaseFlow ` .
41- See [ FlowLLM Lite] ( flowllm/lite/README.md ) for the full minimal CLI flow design.
42-
4343## 🚀 Quick Start
4444
4545### Installation
4646
4747FlowLLM requires Python 3.11+.
4848
49- Install development dependencies from source :
49+ Install from pip :
5050
5151``` bash
52- git clone https://github.com/flowllm-ai/flowllm.git
53- cd flowllm
54- pip install -e " .[dev]"
55- ```
56-
57- Install the optional Claude Code wrapper when needed:
58-
59- ``` bash
60- pip install -e " .[claude-code]"
52+ pip install flowllm
6153```
6254
63- Install all optional dependencies :
55+ Install from source :
6456
6557``` bash
66- pip install -e " .[full]"
58+ git clone https://github.com/flowllm-ai/flowllm.git
59+ cd flowllm
60+ pip install -e .
6761```
6862
6963### Start the Service
@@ -72,16 +66,8 @@ pip install -e ".[full]"
7266flowllm start
7367```
7468
75- The default service address is ` 127.0.0.1:2333 ` , and the default workspace is ` .flowllm/ ` . Startup automatically
76- creates:
77-
78- ``` text
79- .flowllm/
80- ├── metadata/
81- └── session/
82- ```
83-
84- You can override configuration from the command line:
69+ The default service address is ` 127.0.0.1:2333 ` , and the default workspace is ` .flowllm/ ` .
70+ Override configuration with dot notation:
8571
8672``` bash
8773flowllm start service.port=8181 enable_logo=false
@@ -90,9 +76,7 @@ flowllm start workspace_dir=/tmp/flowllm-demo service.host=127.0.0.1 service.por
9076
9177See the [ Quick Start] ( docs/en/quick_start.md ) for more startup and invocation examples.
9278
93- ## 🧩 Calling Jobs
94-
95- After the service starts, CLI commands other than ` start ` call server-side Jobs with the same name through the client:
79+ ## 🧩 Use FlowLLM
9680
9781``` bash
9882flowllm version
@@ -102,144 +86,43 @@ flowllm demo query="Hello FlowLLM" min_score=0.8
10286flowllm add a=1 b=2
10387```
10488
105- The HTTP entry point is ` POST /<job_name> ` :
89+ CLI commands other than ` start ` call server-side Jobs with the same name. HTTP uses ` POST /<job_name> ` :
10690
10791``` bash
10892curl -s http://127.0.0.1:2333/add \
10993 -H ' Content-Type: application/json' \
11094 -d ' {"a":1,"b":2}'
11195```
11296
113- Streaming Jobs return SSE:
114-
115- ``` bash
116- flowllm stream_demo query=" Hi" repeat=3 interval=0.05
117-
118- curl -N http://127.0.0.1:2333/stream_demo \
119- -H ' Content-Type: application/json' \
120- -d ' {"query":"Hi","repeat":3,"interval":0.05}'
121- ```
122-
123- Built-in Jobs:
124-
125- | Job | Backend | Description |
126- | ----------------| ----------| ------------------------------------------------|
127- | ` version ` | ` base ` | Returns the FlowLLM package version. |
128- | ` health_check ` | ` base ` | Returns a component health-check summary. |
129- | ` help ` | ` base ` | Lists registered Jobs and their metadata. |
130- | ` demo ` | ` base ` | Two-step echo example. |
131- | ` add ` | ` base ` | Adds two numbers. |
132- | ` stream_demo ` | ` stream ` | Streams the input text character by character. |
133-
134- ## ⚙️ Configuration
135-
136- The default configuration is located at ` flowllm/config/default.yaml ` . Root configuration sections include application
137- parameters, service, Jobs, and Components:
138-
139- ``` yaml
140- service :
141- backend : http
142-
143- jobs :
144- add :
145- backend : base
146- description : " add two numbers"
147- steps :
148- - backend : add_step
149- ` ` `
150-
151- You can override model and embedding variables through ` .env`:
152-
153- ` ` ` bash
154- cat > .env <<'EOF'
155- LLM_BACKEND=openai
156- LLM_MODEL_NAME=qwen3.7-plus
157- LLM_API_KEY=your_api_key
158- LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
159-
160- EMBEDDING_BACKEND=openai
161- EMBEDDING_MODEL_NAME=text-embedding-v4
162- EMBEDDING_API_KEY=your_api_key
163- EMBEDDING_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
164- EOF
165- ` ` `
166-
167- You can also specify a YAML or JSON configuration file :
168-
169- ` ` ` bash
170- flowllm start config=/path/to/app.yaml
171- ` ` `
172-
173- Configuration parsing supports `${VAR}`, `${VAR:-default}`, booleans, numbers, JSON lists and dictionaries, and
174- automatic `null` conversion.
175-
176- # # 🏗️ Code Framework
177-
178- FlowLLM's core layering is :
179-
180- ` ` ` text
181- CLI / Client -> Service -> Application -> Job -> Step -> Component
182- ` ` `
183-
184- | Layer | Role |
185- |---------------|---------------------------------------------------------------------------------------------------------------------------------|
186- | `Application` | Loads configuration, creates the workspace, assembles Service, Components, and Jobs, and starts lifecycles in dependency order. |
187- | `Service` | Exposes servable Jobs as HTTP routes or MCP tools. |
188- | `Job` | Orchestrates externally callable capabilities or background processes by executing Steps in order. |
189- | `Step` | Atomic workflow operation that reads and writes `RuntimeContext`, `Response`, and streaming queues. |
190- | `Component` | Long-lived infrastructure such as LLMs, Embeddings, Embedding Stores, and Agent Wrappers. |
191- | `Registry` | Global registry `R`, which looks up implementations by `(component_type, backend_name)`. |
97+ See [ Quick Start] ( docs/en/quick_start.md ) for service, CLI, HTTP, and streaming examples.
19298
193- Minimal example for adding a Step :
99+ ## ⚙️ Build Applications
194100
195- ` ` ` python
196- from flowllm.components import R
197- from flowllm.steps import BaseStep
198-
199-
200- @R.register("reverse_step")
201- class ReverseStep(BaseStep):
202- async def execute(self):
203- text = self.context.get("text", "")
204- self.context.response.answer = text[::-1]
205- return self.context.response
206- ` ` `
207-
208- Then declare the Job in configuration :
101+ FlowLLM applications are configured from ` flowllm/config/default.yaml ` or your own YAML/JSON config. Add a capability by
102+ registering a Step or Component, then exposing it as a Job:
209103
210104``` yaml
211105jobs :
212106 reverse :
213107 backend : base
214108 description : " reverse text"
215- parameters:
216- type: object
217- properties:
218- text:
219- type: string
220- required:
221- - text
222109 steps :
223110 - backend : reverse_step
224111` ` `
225112
226- After adding an implementation, make sure the module is imported in the package `__init__.py`; otherwise, the
227- registration decorator will not run. See the [code framework](docs/en/framework.md) for details.
113+ Configuration supports ` .env`, `${VAR}`, `${VAR:-default}`, dot-notation overrides, and direct config files:
228114
229- # # 🔌 MCP Service
115+ ` ` ` bash
116+ flowllm start config=/path/to/app.yaml
117+ ` ` `
230118
231- When the service backend is set to `mcp`, FlowLLM exposes non-streaming Jobs with `enable_serve : true` as MCP tools.
232- ` StreamJob ` is not exposed by MCP Service .
119+ For implementation rules and examples, use the [ FlowLLM Development Skill](skills/flowllm_dev/SKILL.md). For the compact
120+ architecture reference, see [Code Framework](docs/en/framework.md) .
233121
234- ` ` ` yaml
235- service:
236- backend: mcp
237- transport: sse
238- host: 127.0.0.1
239- port: 2333
240- ` ` `
122+ # # 🆕 Minimal CLI Flow
241123
242- MCP transport supports `stdio`, `sse`, and `streamable-http`.
124+ For scripts that do not need the full service framework, `flowllm.lite` maps `fl --action --field value` to a Pydantic
125+ config and a small ordered `BaseFlow`. See [FlowLLM Lite](flowllm/lite/README.md).
243126
244127# # 📚 Documentation
245128
@@ -251,7 +134,15 @@ MCP transport supports `stdio`, `sse`, and `streamable-http`.
251134# # 🤝 Open Source and Contributing
252135
253136FlowLLM is licensed under Apache 2.0. Before contributing, read the [contribution guide](docs/en/contributing.md)
254- and [development skill](skills/flowllm_dev/SKILL.md), then run :
137+ and [development skill](skills/flowllm_dev/SKILL.md).
138+
139+ Install development dependencies from source :
140+
141+ ` ` ` bash
142+ pip install -e ".[dev]"
143+ ` ` `
144+
145+ Before submitting changes, run :
255146
256147` ` ` bash
257148pre-commit run --all-files
0 commit comments