How microsoft/promptflow works
Prompt flow is a toolkit for authoring, executing, evaluating, and deploying LLM application flows. The documented developer path is to create a flow, configure model connections, run and debug it, evaluate quality at scale, then serve or deploy it; Azure adds cloud run and collaboration operations. The graph combines those documented capabilities with the sampled runtime and storage code. Some capability paths are represented by enclosing source directories because their specific implementations were not sampled.
Main entry points: flow_executor.py Flow executor · entry.py Developer CLI · _connection.py Connections · _batch_engine.py Batch execution
Components 16
Flow development
- Developer CLI
src/promptflow-devkit/promptflow/_cli/_pf/entry.py - Flow authoring
src/promptflow-core/promptflow/core/_flow.py - Connections
src/promptflow-core/promptflow/core/_connection.py
Execution runtime
- Tool loading
src/promptflow-core/promptflow/_core/tools_manager.py - Flow executor
src/promptflow-core/promptflow/executor/flow_executor.py - Process manager
src/promptflow-core/promptflow/executor/_process_manager.py - Batch execution
src/promptflow-devkit/promptflow/batch/_batch_engine.py - Local run records
src/promptflow-devkit/promptflow/_sdk/operations/_local_storage_operations.py - Run storage
src/promptflow-core/promptflow/storage/_run_storage.py
Quality and observability
- Tracing
src/promptflow-tracing/promptflow/tracing - Evaluation
src/promptflow-evals/promptflow/evals
Serving and Azure
- Flow serving
src/promptflow-core/promptflow/core/_serving/app.py - Azure operations
src/promptflow-azure/promptflow/azure/operations
Other components
- Flow developer
- Azure services
- LLM providers
Connections 16
- Flow developer → Developer CLI: runs commands
- Developer CLI → Flow authoring: creates flows
- Developer CLI → Connections: sets credentials
- Developer CLI → Flow executor: invokes runs
- Flow executor → Tool loading: loads tools
- Flow executor → Connections: resolves credentials
- Flow executor → LLM providers: calls models
- Batch execution → Flow executor: dispatches lines
- Batch execution → Run storage: persists run data
- Run storage → Local run records: stores records
- Flow executor → Process manager: runs workers
- Flow executor → Tracing: emits traces
- Evaluation → Flow executor: evaluates flow
- Flow serving → Flow executor: invokes flow
- Azure operations → Azure services: manages cloud runs
- Azure operations → Connections: manages connections