# maniartech/conductor architecture

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

- Interactive diagram: https://gitdiagram.com/maniartech/conductor
- Repository: https://github.com/maniartech/conductor

## Overview

This is a Go goroutine-orchestration library. The principal workflow is a caller composing a task or nested sequential, concurrent, and conditional orchestration, passing it to Setup, and awaiting a workflow result. Workflow execution invokes the orchestration tree; builders execute tasks or child orchestrations and return results. Configuration, context, error handling, status/progress, and path-based lookup support that runtime. Some internal links are omitted where the excerpts show imports but not calls.

Main entry points: [`orchestrator.go`](https://github.com/maniartech/conductor/blob/master/orchestrator.go) (Public API), [`pkg/types/orchestration.go`](https://github.com/maniartech/conductor/blob/master/pkg/types/orchestration.go) (Orchestration contracts), [`internal/orchestration/base_builder.go`](https://github.com/maniartech/conductor/blob/master/internal/orchestration/base_builder.go) (Base builder), [`internal/orchestration/base_container_orchestration.go`](https://github.com/maniartech/conductor/blob/master/internal/orchestration/base_container_orchestration.go) (Child containers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_api["Public API<br/>[orchestrator.go]"]
  node_workflow["Workflow runner<br/>[workflow.go]"]
end

subgraph group_builders["Orchestration builders"]
  node_task["Task builder<br/>[builder.go]"]
  node_sequential["Sequential builder<br/>[builder.go]"]
  node_concurrent["Concurrent builder<br/>[concurrent.go]"]
  node_conditional["Conditional builder<br/>[conditional.go]"]
end

subgraph group_runtime["Execution runtime"]
  node_orchestration_types["Orchestration contracts<br/>[orchestration.go]"]
  node_base_builder["Base builder<br/>[base_builder.go]"]
  node_container["Child containers"]
  node_path_base["Path resolver base"]
  node_path_resolver["Path resolver<br/>[path_resolver.go]"]
end

subgraph group_support["Runtime support"]
  node_config_builder["Config builder<br/>[builder.go]"]
  node_config["Configuration<br/>[config.go]"]
  node_context_impl["Orchestration context<br/>[context_impl.go]"]
  node_context_factory["Context factory<br/>[context_factory.go]"]
  node_errors["Error handling<br/>[boundary.go]"]
  node_result["Execution results<br/>[result.go]"]
  node_status["Status manager<br/>[manager.go]"]
  node_atomic["Atomic primitives<br/>[atomic.go]"]
end

node_caller(("Library caller"))

node_caller -->|"composes"| node_api
node_api -->|"constructs"| node_task
node_api -->|"constructs"| node_sequential
node_api -->|"constructs"| node_concurrent
node_api -->|"constructs"| node_conditional
node_caller -->|"sets up"| node_workflow
node_workflow -->|"executes"| node_orchestration_types
node_task -->|"creates or uses"| node_context_impl
node_concurrent -->|"executes children"| node_orchestration_types
node_conditional -.->|"selects branch"| node_orchestration_types
node_sequential -.->|"runs in order"| node_orchestration_types
node_api -->|"exposes contract"| node_orchestration_types
node_base_builder -->|"uses settings"| node_config
node_base_builder -->|"uses errors"| node_errors
node_base_builder -->|"implements contract"| node_orchestration_types
node_container -->|"embeds"| node_base_builder
node_container -.->|"returns query results"| node_result
node_container -->|"creates resolver"| node_path_base
node_path_resolver -->|"uses base"| node_path_base
node_config_builder -->|"builds settings"| node_config
node_context_factory -->|"creates context"| node_context_impl
node_context_impl -->|"stores settings"| node_config
node_errors -.->|"records errors"| node_result

click node_api "https://github.com/maniartech/conductor/blob/master/orchestrator.go"
click node_workflow "https://github.com/maniartech/conductor/blob/master/workflow.go"
click node_task "https://github.com/maniartech/conductor/blob/master/pkg/builders/task/builder.go"
click node_sequential "https://github.com/maniartech/conductor/blob/master/pkg/builders/sequential/builder.go"
click node_concurrent "https://github.com/maniartech/conductor/blob/master/pkg/builders/concurrent/concurrent.go"
click node_conditional "https://github.com/maniartech/conductor/blob/master/pkg/builders/conditional/conditional.go"
click node_orchestration_types "https://github.com/maniartech/conductor/blob/master/pkg/types/orchestration.go"
click node_base_builder "https://github.com/maniartech/conductor/blob/master/internal/orchestration/base_builder.go"
click node_container "https://github.com/maniartech/conductor/blob/master/internal/orchestration/base_container_orchestration.go"
click node_path_base "https://github.com/maniartech/conductor/blob/master/internal/orchestration/path_resolver_base.go"
click node_path_resolver "https://github.com/maniartech/conductor/blob/master/internal/orchestration/path_resolver.go"
click node_config_builder "https://github.com/maniartech/conductor/blob/master/pkg/config/builder.go"
click node_config "https://github.com/maniartech/conductor/blob/master/pkg/config/config.go"
click node_context_impl "https://github.com/maniartech/conductor/blob/master/pkg/context/context_impl.go"
click node_context_factory "https://github.com/maniartech/conductor/blob/master/pkg/context/context_factory.go"
click node_errors "https://github.com/maniartech/conductor/blob/master/pkg/errors/boundary.go"
click node_result "https://github.com/maniartech/conductor/blob/master/pkg/result/result.go"
click node_status "https://github.com/maniartech/conductor/blob/master/internal/status/manager.go"
click node_atomic "https://github.com/maniartech/conductor/blob/master/internal/atomic/atomic.go"

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_api,node_workflow toneBlue
class node_task,node_sequential,node_concurrent,node_conditional toneAmber
class node_orchestration_types,node_base_builder,node_container,node_path_base,node_path_resolver toneMint
class node_config_builder,node_config,node_context_impl,node_context_factory,node_errors,node_result,node_status,node_atomic toneRose
class node_caller toneIndigo
```

## Components

### Public API

- [Public API](https://github.com/maniartech/conductor/blob/master/orchestrator.go): `orchestrator.go`
- [Workflow runner](https://github.com/maniartech/conductor/blob/master/workflow.go): `workflow.go`

### Orchestration builders

- [Task builder](https://github.com/maniartech/conductor/blob/master/pkg/builders/task/builder.go): `pkg/builders/task/builder.go`
- [Sequential builder](https://github.com/maniartech/conductor/blob/master/pkg/builders/sequential/builder.go): `pkg/builders/sequential/builder.go`
- [Concurrent builder](https://github.com/maniartech/conductor/blob/master/pkg/builders/concurrent/concurrent.go): `pkg/builders/concurrent/concurrent.go`
- [Conditional builder](https://github.com/maniartech/conductor/blob/master/pkg/builders/conditional/conditional.go): `pkg/builders/conditional/conditional.go`

### Execution runtime

- [Orchestration contracts](https://github.com/maniartech/conductor/blob/master/pkg/types/orchestration.go): `pkg/types/orchestration.go`
- [Base builder](https://github.com/maniartech/conductor/blob/master/internal/orchestration/base_builder.go): `internal/orchestration/base_builder.go`
- [Child containers](https://github.com/maniartech/conductor/blob/master/internal/orchestration/base_container_orchestration.go): `internal/orchestration/base_container_orchestration.go`
- [Path resolver base](https://github.com/maniartech/conductor/blob/master/internal/orchestration/path_resolver_base.go): `internal/orchestration/path_resolver_base.go`
- [Path resolver](https://github.com/maniartech/conductor/blob/master/internal/orchestration/path_resolver.go): `internal/orchestration/path_resolver.go`

### Runtime support

- [Config builder](https://github.com/maniartech/conductor/blob/master/pkg/config/builder.go): `pkg/config/builder.go`
- [Configuration](https://github.com/maniartech/conductor/blob/master/pkg/config/config.go): `pkg/config/config.go`
- [Orchestration context](https://github.com/maniartech/conductor/blob/master/pkg/context/context_impl.go): `pkg/context/context_impl.go`
- [Context factory](https://github.com/maniartech/conductor/blob/master/pkg/context/context_factory.go): `pkg/context/context_factory.go`
- [Error handling](https://github.com/maniartech/conductor/blob/master/pkg/errors/boundary.go): `pkg/errors/boundary.go`
- [Execution results](https://github.com/maniartech/conductor/blob/master/pkg/result/result.go): `pkg/result/result.go`
- [Status manager](https://github.com/maniartech/conductor/blob/master/internal/status/manager.go): `internal/status/manager.go`
- [Atomic primitives](https://github.com/maniartech/conductor/blob/master/internal/atomic/atomic.go): `internal/atomic/atomic.go`

### Other components

- **Library caller**

## Connections

- Library caller → Public API: composes (evidence: `README.md`)
- Public API → Task builder: constructs (evidence: `orchestrator.go`)
- Public API → Sequential builder: constructs (evidence: `README.md`)
- Public API → Concurrent builder: constructs (evidence: `orchestrator.go`)
- Public API → Conditional builder: constructs (evidence: `orchestrator.go`)
- Library caller → Workflow runner: sets up (evidence: `README.md`)
- Workflow runner → Orchestration contracts: executes (evidence: `workflow.go`)
- Task builder → Orchestration context: creates or uses (evidence: `pkg/builders/task/builder.go`)
- Concurrent builder → Orchestration contracts: executes children (evidence: `pkg/builders/concurrent/concurrent.go`)
- Conditional builder → Orchestration contracts: selects branch
- Sequential builder → Orchestration contracts: runs in order (evidence: `README.md`)
- Public API → Orchestration contracts: exposes contract (evidence: `orchestrator.go`)
- Base builder → Configuration: uses settings (evidence: `internal/orchestration/base_builder.go`)
- Base builder → Error handling: uses errors (evidence: `internal/orchestration/base_builder.go`)
- Base builder → Orchestration contracts: implements contract (evidence: `internal/orchestration/base_builder.go`)
- Child containers → Base builder: embeds (evidence: `internal/orchestration/base_container_orchestration.go`)
- Child containers → Execution results: returns query results
- Child containers → Path resolver base: creates resolver (evidence: `internal/orchestration/base_container_orchestration.go`)
- Path resolver → Path resolver base: uses base (evidence: `internal/orchestration/path_resolver.go`)
- Config builder → Configuration: builds settings (evidence: `pkg/config/builder.go`)
- Context factory → Orchestration context: creates context (evidence: `pkg/context/context_factory.go`)
- Orchestration context → Configuration: stores settings (evidence: `pkg/context/context_impl.go`)
- Error handling → Execution results: records errors
