# microsoft/power-fx architecture

> Architecture diagram of the GitHub repository microsoft/power-fx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/power-fx
- Repository: https://github.com/microsoft/power-fx

## Overview

Power Fx is a strongly typed formula language for expressing business logic. A typical host configures an engine, submits a formula for parsing and checking, then evaluates it and obtains a value; the interpreter adds mutable variables and formula recalculation. The repository also includes editor-protocol support and connectors for invoking external services and working with tabular data. The map follows the sampled engine, interpreter, connector, and language-server evidence; many domain capabilities are identified only by the file tree, so their internal links are omitted rather than inferred.

Main entry points: [`src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs`](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs) (Formula engine), [`src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngine.cs`](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngine.cs) (Recalculation engine), [`src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient.cs`](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient.cs) (Connector client), [`src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs`](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs) (HTTP invocation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_language["Language Core"]
  node_config["Engine configuration<br/>[PowerFxConfig.cs]"]
  node_engine["Formula engine<br/>[Engine.cs]"]
  node_parser["Formula parser<br/>[TexlParser.cs]"]
  node_types["Formula types<br/>[FormulaType.cs]"]
  node_builtin["Built-in functions<br/>[Text.cs]"]
  node_intellisense["Intellisense<br/>[Intellisense.cs]"]
end

subgraph group_runtime["Evaluation Runtime"]
  node_interpreter["Recalculation engine<br/>[RecalcEngine.cs]"]
  node_worker["Evaluation worker"]
  node_services["Runtime services"]
end

subgraph group_connectors["Data Connectors"]
  node_connector["Connector client"]
  node_connector2["Connector client API"]
  node_http["HTTP invocation"]
  node_serialization["Request serialization"]
  node_tabular["Tabular data services<br/>[CdpDataSource.cs]"]
end

subgraph group_editor["Editor Services"]
  node_lsp["Language server<br/>[LanguageServer.cs]"]
  node_handlers["Operation handlers"]
  node_operation["Operation context"]
  node_nl["Natural-language hooks<br/>[NLHandler.cs]"]
end

node_host(("Formula host"))
node_client(("Editor client"))

node_host -->|"configures"| node_config
node_host -.->|"submits formulas"| node_engine
node_engine -->|"uses config"| node_config
node_engine -.->|"parses formulas"| node_parser
node_engine -->|"builds types"| node_types
node_engine -->|"registers functions"| node_builtin
node_engine -->|"computes suggestions"| node_intellisense
node_interpreter -->|"extends"| node_engine
node_interpreter -->|"evaluates formulas"| node_worker
node_interpreter -.->|"uses services"| node_services
node_connector -->|"uses API"| node_connector2
node_connector -.->|"invokes functions"| node_http
node_http -.->|"serializes requests"| node_serialization
node_tabular -.->|"uses connector"| node_connector
node_client -.->|"sends requests"| node_lsp
node_lsp -->|"dispatches operations"| node_handlers
node_handlers -->|"uses context"| node_operation
node_operation -.->|"gets NL handler"| node_nl
node_nl -->|"receives engine"| node_engine

click node_config "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Config/PowerFxConfig.cs"
click node_engine "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs"
click node_parser "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Parser/TexlParser.cs"
click node_types "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Types/FormulaType.cs"
click node_builtin "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Texl/Builtins/Text.cs"
click node_intellisense "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Texl/Intellisense/Intellisense.cs"
click node_interpreter "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngine.cs"
click node_worker "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngineWorker.cs"
click node_services "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/Environment/BasicServiceProvider.cs"
click node_connector "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient.cs"
click node_connector2 "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient2.cs"
click node_http "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs"
click node_serialization "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/Execution/OpenApiJsonSerializer.cs"
click node_tabular "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/Tabular/Services/CdpDataSource.cs"
click node_lsp "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/LanguageServer/LanguageServer.cs"
click node_handlers "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/Completions/CompletionsLanguageServerOperationHandler.cs"
click node_operation "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/LanguageServerOperationContext.cs"
click node_nl "https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Public/NLHandler.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_engine,node_parser,node_types,node_builtin,node_intellisense,node_client toneBlue
class node_interpreter,node_worker,node_services toneAmber
class node_connector,node_connector2,node_http,node_serialization,node_tabular toneMint
class node_lsp,node_handlers,node_operation,node_nl toneRose
class node_host toneIndigo
```

## Components

### Language Core

- [Engine configuration](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Config/PowerFxConfig.cs): `src/libraries/Microsoft.PowerFx.Core/Public/Config/PowerFxConfig.cs`
- [Formula engine](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs): `src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs`
- [Formula parser](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Parser/TexlParser.cs): `src/libraries/Microsoft.PowerFx.Core/Parser/TexlParser.cs`
- [Formula types](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Types/FormulaType.cs): `src/libraries/Microsoft.PowerFx.Core/Public/Types/FormulaType.cs`
- [Built-in functions](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Texl/Builtins/Text.cs): `src/libraries/Microsoft.PowerFx.Core/Texl/Builtins/Text.cs`
- [Intellisense](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Texl/Intellisense/Intellisense.cs): `src/libraries/Microsoft.PowerFx.Core/Texl/Intellisense/Intellisense.cs`

### Evaluation Runtime

- [Recalculation engine](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngine.cs): `src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngine.cs`
- [Evaluation worker](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngineWorker.cs): `src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngineWorker.cs`
- [Runtime services](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/Environment/BasicServiceProvider.cs): `src/libraries/Microsoft.PowerFx.Interpreter/Environment/BasicServiceProvider.cs`

### Data Connectors

- [Connector client](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient.cs): `src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient.cs`
- [Connector client API](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient2.cs): `src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient2.cs`
- [HTTP invocation](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs): `src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs`
- [Request serialization](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/Execution/OpenApiJsonSerializer.cs): `src/libraries/Microsoft.PowerFx.Connectors/Execution/OpenApiJsonSerializer.cs`
- [Tabular data services](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.Connectors/Tabular/Services/CdpDataSource.cs): `src/libraries/Microsoft.PowerFx.Connectors/Tabular/Services/CdpDataSource.cs`

### Editor Services

- [Language server](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/LanguageServer/LanguageServer.cs): `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/LanguageServer/LanguageServer.cs`
- [Operation handlers](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/Completions/CompletionsLanguageServerOperationHandler.cs): `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/Completions/CompletionsLanguageServerOperationHandler.cs`
- [Operation context](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/LanguageServerOperationContext.cs): `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/LanguageServerOperationContext.cs`
- [Natural-language hooks](https://github.com/microsoft/power-fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Public/NLHandler.cs): `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Public/NLHandler.cs`

### Other components

- **Formula host**
- **Editor client**

## Connections

- Formula host → Engine configuration: configures
- Formula host → Formula engine: submits formulas
- Formula engine → Engine configuration: uses config (evidence: `src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs`)
- Formula engine → Formula parser: parses formulas
- Formula engine → Formula types: builds types (evidence: `src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs`)
- Formula engine → Built-in functions: registers functions (evidence: `src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs`)
- Formula engine → Intellisense: computes suggestions (evidence: `src/libraries/Microsoft.PowerFx.Core/Public/Engine.cs`)
- Recalculation engine → Formula engine: extends (evidence: `src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngine.cs`)
- Recalculation engine → Evaluation worker: evaluates formulas (evidence: `src/libraries/Microsoft.PowerFx.Interpreter/RecalcEngineWorker.cs`)
- Recalculation engine → Runtime services: uses services
- Connector client → Connector client API: uses API (evidence: `src/libraries/Microsoft.PowerFx.Connectors/PowerPlatformConnectorClient.cs`)
- Connector client → HTTP invocation: invokes functions
- HTTP invocation → Request serialization: serializes requests
- Tabular data services → Connector client: uses connector
- Editor client → Language server: sends requests
- Language server → Operation handlers: dispatches operations (evidence: `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/LanguageServer/LanguageServer.cs`)
- Operation handlers → Operation context: uses context (evidence: `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/Completions/CompletionsLanguageServerOperationHandler.cs`)
- Operation context → Natural-language hooks: gets NL handler (evidence: `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Handlers/LanguageServerOperationContext.cs`)
- Natural-language hooks → Formula engine: receives engine (evidence: `src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Public/NLHandler.cs`)
