# alikon-art/determinflow architecture

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

- Interactive diagram: https://gitdiagram.com/alikon-art/determinflow
- Repository: https://github.com/alikon-art/determinflow

## Overview

DeterminFlow is a production AI workflow runtime with a web console. A user or API caller configures a versioned workflow, starts a task, and the runtime executes nodes with isolated agent sessions, validation, retries, and recovery while reporting state and usage. The README also documents chat, scheduled automation, extensions, skills/rules, memory, and marketplace/account capabilities, so these remain visible as distinct branches. Some subsystem connections are documented only at product level; edges use README evidence where source wiring was not sampled.

Main entry points: [`src/workflow/engine.py`](https://github.com/alikon-art/determinflow/blob/main/src/workflow/engine.py) (Execution Engine), [`src/agent/session_manager.py`](https://github.com/alikon-art/determinflow/blob/main/src/agent/session_manager.py) (Agent Sessions), [`src/workflow/manager.py`](https://github.com/alikon-art/determinflow/blob/main/src/workflow/manager.py) (Task Manager), [`src/web/workflow_routes.py`](https://github.com/alikon-art/determinflow/blob/main/src/web/workflow_routes.py) (Workflow API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Workflow Runtime"]
  node_workflow_model["Workflow Definition<br/>[definition.py]"]
  node_workflow_manager["Task Manager<br/>[manager.py]"]
  node_workflow_engine["Execution Engine<br/>[engine.py]"]
  node_node_types["Node Types"]
  node_validation["Output Validation"]
  node_task_state[("Task Checkpoints")]
  node_executor["Executor Processes"]
end

subgraph group_agent["Agent Runtime"]
  node_agent_sessions["Agent Sessions<br/>[session_manager.py]"]
  node_agent_policy["Agent Definitions<br/>[definition.py]"]
  node_llm_client["LLM Client<br/>[llm_client.py]"]
  node_model_config["Model Providers<br/>[model_manager.py]"]
  node_prompt_config["Prompt Manager<br/>[manager.py]"]
end

subgraph group_console["Console and Events"]
  node_workflow_ui["Workflow Editor<br/>[WorkflowCanvas.tsx]"]
  node_workflow_api["Workflow API<br/>[workflow_routes.py]"]
  node_web_api["REST API<br/>[api_routes.py]"]
  node_event_bus["WebSocket Events<br/>[event_bus.py]"]
end

subgraph group_resources["Extensions and Resources"]
  node_extension_host["Extension Host<br/>[manager.py]"]
  node_skills["Skills<br/>[manager.py]"]
  node_rules["Rules<br/>[manager.py]"]
  node_memory["Memory<br/>[service.py]"]
  node_marketplace["Skill Marketplace<br/>[routes.py]"]
end

subgraph group_delivery["Automation and Accounts"]
  node_cron["Cron Automation"]
  node_account["Unified Account<br/>[routes.py]"]
end

node_caller(("User / API"))

node_caller -->|"configures"| node_workflow_ui
node_workflow_ui -->|"submits workflow"| node_workflow_api
node_caller -->|"starts task"| node_workflow_api
node_workflow_api -->|"loads definition"| node_workflow_model
node_workflow_manager -->|"uses definition"| node_workflow_model
node_workflow_manager -->|"dispatches task"| node_workflow_engine
node_workflow_engine -->|"reads definition"| node_workflow_model
node_workflow_engine -->|"dispatches nodes"| node_node_types
node_workflow_engine -->|"runs agent nodes"| node_agent_sessions
node_workflow_engine -->|"validates output"| node_validation
node_workflow_engine -->|"saves checkpoints"| node_task_state
node_workflow_engine -->|"publishes status"| node_event_bus
node_agent_sessions -->|"applies permissions"| node_agent_policy
node_agent_sessions -->|"requests completions"| node_llm_client
node_llm_client -->|"resolves provider"| node_model_config
node_agent_sessions -->|"builds prompts"| node_prompt_config
node_caller -->|"uses console API"| node_web_api
node_web_api -->|"streams events"| node_event_bus
node_extension_host -->|"registers resources"| node_skills
node_extension_host -->|"registers resources"| node_rules
node_caller -->|"browses resources"| node_marketplace
node_marketplace -->|"uses account portal"| node_account
node_agent_sessions -->|"uses memory"| node_memory
node_caller -->|"schedules automation"| node_cron
node_workflow_manager -.->|"dispatches detached tasks"| node_executor

click node_workflow_ui "https://github.com/alikon-art/determinflow/blob/main/web/src/components/workflow/WorkflowCanvas.tsx"
click node_workflow_api "https://github.com/alikon-art/determinflow/blob/main/src/web/workflow_routes.py"
click node_workflow_model "https://github.com/alikon-art/determinflow/blob/main/src/workflow/definition.py"
click node_workflow_manager "https://github.com/alikon-art/determinflow/blob/main/src/workflow/manager.py"
click node_workflow_engine "https://github.com/alikon-art/determinflow/blob/main/src/workflow/engine.py"
click node_node_types "https://github.com/alikon-art/determinflow/tree/main/src/workflow/nodes"
click node_validation "https://github.com/alikon-art/determinflow/blob/main/src/workflow/output_validation.py"
click node_task_state "https://github.com/alikon-art/determinflow/blob/main/src/workflow/task_persistence.py"
click node_agent_sessions "https://github.com/alikon-art/determinflow/blob/main/src/agent/session_manager.py"
click node_agent_policy "https://github.com/alikon-art/determinflow/blob/main/src/agent/definition.py"
click node_llm_client "https://github.com/alikon-art/determinflow/blob/main/src/core/llm_client.py"
click node_model_config "https://github.com/alikon-art/determinflow/blob/main/src/core/model_manager.py"
click node_prompt_config "https://github.com/alikon-art/determinflow/blob/main/src/prompts/manager.py"
click node_web_api "https://github.com/alikon-art/determinflow/blob/main/src/web/api_routes.py"
click node_event_bus "https://github.com/alikon-art/determinflow/blob/main/src/web/event_bus.py"
click node_extension_host "https://github.com/alikon-art/determinflow/blob/main/src/extension_host/manager.py"
click node_skills "https://github.com/alikon-art/determinflow/blob/main/src/skills/manager.py"
click node_rules "https://github.com/alikon-art/determinflow/blob/main/src/rules/manager.py"
click node_memory "https://github.com/alikon-art/determinflow/blob/main/src/memory/service.py"
click node_marketplace "https://github.com/alikon-art/determinflow/blob/main/src/skill_marketplace/routes.py"
click node_cron "https://github.com/alikon-art/determinflow/tree/main/src/cron"
click node_account "https://github.com/alikon-art/determinflow/blob/main/src/account/routes.py"
click node_executor "https://github.com/alikon-art/determinflow/tree/main/src/workflow"

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_workflow_model,node_workflow_manager,node_workflow_engine,node_node_types,node_validation,node_task_state,node_executor,node_caller toneBlue
class node_agent_sessions,node_agent_policy,node_llm_client,node_model_config,node_prompt_config toneAmber
class node_workflow_ui,node_workflow_api,node_web_api,node_event_bus toneMint
class node_extension_host,node_skills,node_rules,node_memory,node_marketplace toneRose
class node_cron,node_account toneIndigo
```

## Components

### Workflow Runtime

- [Workflow Definition](https://github.com/alikon-art/determinflow/blob/main/src/workflow/definition.py): `src/workflow/definition.py`
- [Task Manager](https://github.com/alikon-art/determinflow/blob/main/src/workflow/manager.py): `src/workflow/manager.py`
- [Execution Engine](https://github.com/alikon-art/determinflow/blob/main/src/workflow/engine.py): `src/workflow/engine.py`
- [Node Types](https://github.com/alikon-art/determinflow/tree/main/src/workflow/nodes): `src/workflow/nodes`
- [Output Validation](https://github.com/alikon-art/determinflow/blob/main/src/workflow/output_validation.py): `src/workflow/output_validation.py`
- [Task Checkpoints](https://github.com/alikon-art/determinflow/blob/main/src/workflow/task_persistence.py): `src/workflow/task_persistence.py`
- [Executor Processes](https://github.com/alikon-art/determinflow/tree/main/src/workflow): `src/workflow`

### Agent Runtime

- [Agent Sessions](https://github.com/alikon-art/determinflow/blob/main/src/agent/session_manager.py): `src/agent/session_manager.py`
- [Agent Definitions](https://github.com/alikon-art/determinflow/blob/main/src/agent/definition.py): `src/agent/definition.py`
- [LLM Client](https://github.com/alikon-art/determinflow/blob/main/src/core/llm_client.py): `src/core/llm_client.py`
- [Model Providers](https://github.com/alikon-art/determinflow/blob/main/src/core/model_manager.py): `src/core/model_manager.py`
- [Prompt Manager](https://github.com/alikon-art/determinflow/blob/main/src/prompts/manager.py): `src/prompts/manager.py`

### Console and Events

- [Workflow Editor](https://github.com/alikon-art/determinflow/blob/main/web/src/components/workflow/WorkflowCanvas.tsx): `web/src/components/workflow/WorkflowCanvas.tsx`
- [Workflow API](https://github.com/alikon-art/determinflow/blob/main/src/web/workflow_routes.py): `src/web/workflow_routes.py`
- [REST API](https://github.com/alikon-art/determinflow/blob/main/src/web/api_routes.py): `src/web/api_routes.py`
- [WebSocket Events](https://github.com/alikon-art/determinflow/blob/main/src/web/event_bus.py): `src/web/event_bus.py`

### Extensions and Resources

- [Extension Host](https://github.com/alikon-art/determinflow/blob/main/src/extension_host/manager.py): `src/extension_host/manager.py`
- [Skills](https://github.com/alikon-art/determinflow/blob/main/src/skills/manager.py): `src/skills/manager.py`
- [Rules](https://github.com/alikon-art/determinflow/blob/main/src/rules/manager.py): `src/rules/manager.py`
- [Memory](https://github.com/alikon-art/determinflow/blob/main/src/memory/service.py): `src/memory/service.py`
- [Skill Marketplace](https://github.com/alikon-art/determinflow/blob/main/src/skill_marketplace/routes.py): `src/skill_marketplace/routes.py`

### Automation and Accounts

- [Cron Automation](https://github.com/alikon-art/determinflow/tree/main/src/cron): `src/cron`
- [Unified Account](https://github.com/alikon-art/determinflow/blob/main/src/account/routes.py): `src/account/routes.py`

### Other components

- **User / API**

## Connections

- User / API → Workflow Editor: configures
- Workflow Editor → Workflow API: submits workflow
- User / API → Workflow API: starts task
- Workflow API → Workflow Definition: loads definition (evidence: `src/web/workflow_routes.py`)
- Task Manager → Workflow Definition: uses definition (evidence: `src/workflow/manager.py`)
- Task Manager → Execution Engine: dispatches task (evidence: `src/workflow/manager.py`)
- Execution Engine → Workflow Definition: reads definition (evidence: `src/workflow/engine.py`)
- Execution Engine → Node Types: dispatches nodes (evidence: `src/workflow/engine.py`)
- Execution Engine → Agent Sessions: runs agent nodes (evidence: `src/workflow/engine.py`)
- Execution Engine → Output Validation: validates output
- Execution Engine → Task Checkpoints: saves checkpoints (evidence: `src/workflow/engine.py`)
- Execution Engine → WebSocket Events: publishes status (evidence: `src/workflow/engine.py`)
- Agent Sessions → Agent Definitions: applies permissions (evidence: `src/agent/session_manager.py`)
- Agent Sessions → LLM Client: requests completions (evidence: `src/agent/session_manager.py`)
- LLM Client → Model Providers: resolves provider (evidence: `src/core/llm_client.py`)
- Agent Sessions → Prompt Manager: builds prompts (evidence: `src/agent/session_manager.py`)
- User / API → REST API: uses console API
- REST API → WebSocket Events: streams events (evidence: `src/web/api_routes.py`)
- Extension Host → Skills: registers resources (evidence: `src/extension_host/manager.py`)
- Extension Host → Rules: registers resources (evidence: `src/extension_host/manager.py`)
- User / API → Skill Marketplace: browses resources
- Skill Marketplace → Unified Account: uses account portal (evidence: `src/skill_marketplace/routes.py`)
- Agent Sessions → Memory: uses memory
- User / API → Cron Automation: schedules automation
- Task Manager → Executor Processes: dispatches detached tasks (evidence: `src/workflow/manager.py`)
