# manikantasai1724/agentflow architecture

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

- Interactive diagram: https://gitdiagram.com/manikantasai1724/agentflow
- Repository: https://github.com/manikantasai1724/agentflow

## Overview

AgentFlow is a web application for designing, generating, and running automation workflows. An operator signs in, builds or generates a workflow, saves it, and starts an execution; the server queues the run and its orchestrator plans, executes, validates, and recovers workflow steps. The client also exposes dashboard and execution views, account connections, and notifications. The graph follows only relationships visible in excerpts or the source index; several UI capabilities and backend subsystems are represented at their known directory or module level where implementation details were not sampled.

Main entry points: [`server/src/agents/orchestrator.js`](https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/orchestrator.js) (Agent Orchestrator), [`client/src/utils/api.ts`](https://github.com/manikantasai1724/agentflow/blob/main/client/src/utils/api.ts) (API Client), [`server/src/routes/workflowRoutes.js`](https://github.com/manikantasai1724/agentflow/blob/main/server/src/routes/workflowRoutes.js) (Workflow Routes), [`server/src/controllers/executionController.js`](https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/executionController.js) (Execution API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Workflow Client"]
  node_workflow_page["Workflow Editor<br/>[&#91;id&#93;.js]"]
  node_workflow_ui["Canvas and Palette"]
  node_workflow_store["Workflow Store<br/>[workflowStore.ts]"]
  node_auth_store["Auth Store<br/>[authStore.ts]"]
  node_api_client["API Client<br/>[api.ts]"]
  node_dashboard["Dashboard and Metrics<br/>[dashboard.js]"]
  node_executions_page["Execution Views<br/>[executions.js]"]
end

subgraph group_api["API and Accounts"]
  node_app_server["HTTP App and Routes<br/>[app.js]"]
  node_auth["Authentication<br/>[authController.js]"]
  node_auth_guard["JWT Guard<br/>[auth.js]"]
  node_connections["Account Connections"]
  node_notifications["Notifications"]
end

subgraph group_workflow["Workflow Management"]
  node_workflow_routes["Workflow Routes<br/>[workflowRoutes.js]"]
  node_workflow_controller["Workflow Service"]
  node_ai_service["AI Generation<br/>[aiService.js]"]
end

subgraph group_runtime["Execution Runtime"]
  node_execution_controller["Execution API"]
  node_queue["Execution Queue<br/>[queueService.js]"]
  node_orchestrator["Agent Orchestrator<br/>[orchestrator.js]"]
  node_planner["Workflow Planner<br/>[planner.js]"]
  node_node_runner["Node Execution<br/>[execution.js]"]
  node_validation["Output Validation<br/>[validation.js]"]
  node_recovery["Failure Recovery<br/>[recovery.js]"]
end

subgraph group_state["Persistent State"]
  node_workflow_model[("Workflow Records<br/>[Workflow.js]")]
  node_execution_model[("Execution Records<br/>[Execution.js]")]
  node_execution_logs[("Execution Logs<br/>[ExecutionLog.js]")]
  node_agent_memory[("Agent Memory<br/>[AgentMemory.js]")]
end

node_operator(("Operator"))

node_operator -->|"designs workflow"| node_workflow_page
node_workflow_page -->|"renders editor"| node_workflow_ui
node_workflow_page -->|"uses state"| node_workflow_store
node_workflow_store -->|"calls API"| node_api_client
node_auth_store -->|"calls API"| node_api_client
node_operator -.->|"signs in"| node_auth_store
node_api_client -.->|"sends HTTP requests"| node_app_server
node_app_server -->|"mounts routes"| node_workflow_routes
node_app_server -.->|"mounts auth routes"| node_auth
node_workflow_routes -->|"protects routes"| node_auth_guard
node_workflow_routes -->|"dispatches requests"| node_workflow_controller
node_workflow_routes -->|"dispatches execution"| node_execution_controller
node_workflow_controller -->|"reads and writes"| node_workflow_model
node_workflow_controller -->|"generates graph"| node_ai_service
node_execution_controller -->|"loads workflow"| node_workflow_model
node_execution_controller -->|"creates execution"| node_execution_model
node_execution_controller -->|"enqueues execution"| node_queue
node_queue -->|"runs execution"| node_orchestrator
node_orchestrator -->|"plans steps"| node_planner
node_orchestrator -->|"executes steps"| node_node_runner
node_orchestrator -->|"validates outputs"| node_validation
node_orchestrator -->|"handles failures"| node_recovery
node_orchestrator -->|"updates execution"| node_execution_model
node_orchestrator -->|"loads workflow"| node_workflow_model
node_orchestrator -->|"stores context"| node_agent_memory
node_orchestrator -->|"creates alerts"| node_notifications
node_dashboard -.->|"fetches metrics"| node_api_client
node_executions_page -.->|"fetches runs"| node_api_client
node_operator -.->|"configures accounts"| node_connections
node_operator -.->|"views status"| node_dashboard
node_operator -.->|"monitors runs"| node_executions_page

click node_workflow_page "https://github.com/manikantasai1724/agentflow/blob/main/client/src/pages/workflows/%5Bid%5D.js"
click node_workflow_ui "https://github.com/manikantasai1724/agentflow/tree/main/client/src/components"
click node_workflow_store "https://github.com/manikantasai1724/agentflow/blob/main/client/src/store/workflowStore.ts"
click node_auth_store "https://github.com/manikantasai1724/agentflow/blob/main/client/src/store/authStore.ts"
click node_api_client "https://github.com/manikantasai1724/agentflow/blob/main/client/src/utils/api.ts"
click node_app_server "https://github.com/manikantasai1724/agentflow/blob/main/server/src/app.js"
click node_auth "https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/authController.js"
click node_auth_guard "https://github.com/manikantasai1724/agentflow/blob/main/server/src/middleware/auth.js"
click node_workflow_routes "https://github.com/manikantasai1724/agentflow/blob/main/server/src/routes/workflowRoutes.js"
click node_workflow_controller "https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/workflowController.js"
click node_ai_service "https://github.com/manikantasai1724/agentflow/blob/main/server/src/services/aiService.js"
click node_execution_controller "https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/executionController.js"
click node_queue "https://github.com/manikantasai1724/agentflow/blob/main/server/src/services/queueService.js"
click node_orchestrator "https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/orchestrator.js"
click node_planner "https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/planner.js"
click node_node_runner "https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/execution.js"
click node_validation "https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/validation.js"
click node_recovery "https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/recovery.js"
click node_workflow_model "https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/Workflow.js"
click node_execution_model "https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/Execution.js"
click node_execution_logs "https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/ExecutionLog.js"
click node_agent_memory "https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/AgentMemory.js"
click node_connections "https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/connectionController.js"
click node_notifications "https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/notificationController.js"
click node_dashboard "https://github.com/manikantasai1724/agentflow/blob/main/client/src/pages/dashboard.js"
click node_executions_page "https://github.com/manikantasai1724/agentflow/blob/main/client/src/pages/executions.js"

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_page,node_workflow_ui,node_workflow_store,node_auth_store,node_api_client,node_dashboard,node_executions_page toneBlue
class node_app_server,node_auth,node_auth_guard,node_connections,node_notifications toneAmber
class node_workflow_routes,node_workflow_controller,node_ai_service toneMint
class node_execution_controller,node_queue,node_orchestrator,node_planner,node_node_runner,node_validation,node_recovery toneRose
class node_workflow_model,node_execution_model,node_execution_logs,node_agent_memory,node_operator toneIndigo
```

## Components

### Workflow Client

- [Workflow Editor](https://github.com/manikantasai1724/agentflow/blob/main/client/src/pages/workflows/%5Bid%5D.js): `client/src/pages/workflows/[id].js`
- [Canvas and Palette](https://github.com/manikantasai1724/agentflow/tree/main/client/src/components): `client/src/components`
- [Workflow Store](https://github.com/manikantasai1724/agentflow/blob/main/client/src/store/workflowStore.ts): `client/src/store/workflowStore.ts`
- [Auth Store](https://github.com/manikantasai1724/agentflow/blob/main/client/src/store/authStore.ts): `client/src/store/authStore.ts`
- [API Client](https://github.com/manikantasai1724/agentflow/blob/main/client/src/utils/api.ts): `client/src/utils/api.ts`
- [Dashboard and Metrics](https://github.com/manikantasai1724/agentflow/blob/main/client/src/pages/dashboard.js): `client/src/pages/dashboard.js`
- [Execution Views](https://github.com/manikantasai1724/agentflow/blob/main/client/src/pages/executions.js): `client/src/pages/executions.js`

### API and Accounts

- [HTTP App and Routes](https://github.com/manikantasai1724/agentflow/blob/main/server/src/app.js): `server/src/app.js`
- [Authentication](https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/authController.js): `server/src/controllers/authController.js`
- [JWT Guard](https://github.com/manikantasai1724/agentflow/blob/main/server/src/middleware/auth.js): `server/src/middleware/auth.js`
- [Account Connections](https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/connectionController.js): `server/src/controllers/connectionController.js`
- [Notifications](https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/notificationController.js): `server/src/controllers/notificationController.js`

### Workflow Management

- [Workflow Routes](https://github.com/manikantasai1724/agentflow/blob/main/server/src/routes/workflowRoutes.js): `server/src/routes/workflowRoutes.js`
- [Workflow Service](https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/workflowController.js): `server/src/controllers/workflowController.js`
- [AI Generation](https://github.com/manikantasai1724/agentflow/blob/main/server/src/services/aiService.js): `server/src/services/aiService.js`

### Execution Runtime

- [Execution API](https://github.com/manikantasai1724/agentflow/blob/main/server/src/controllers/executionController.js): `server/src/controllers/executionController.js`
- [Execution Queue](https://github.com/manikantasai1724/agentflow/blob/main/server/src/services/queueService.js): `server/src/services/queueService.js`
- [Agent Orchestrator](https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/orchestrator.js): `server/src/agents/orchestrator.js`
- [Workflow Planner](https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/planner.js): `server/src/agents/planner.js`
- [Node Execution](https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/execution.js): `server/src/agents/execution.js`
- [Output Validation](https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/validation.js): `server/src/agents/validation.js`
- [Failure Recovery](https://github.com/manikantasai1724/agentflow/blob/main/server/src/agents/recovery.js): `server/src/agents/recovery.js`

### Persistent State

- [Workflow Records](https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/Workflow.js): `server/src/models/Workflow.js`
- [Execution Records](https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/Execution.js): `server/src/models/Execution.js`
- [Execution Logs](https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/ExecutionLog.js): `server/src/models/ExecutionLog.js`
- [Agent Memory](https://github.com/manikantasai1724/agentflow/blob/main/server/src/models/AgentMemory.js): `server/src/models/AgentMemory.js`

### Other components

- **Operator**

## Connections

- Operator → Workflow Editor: designs workflow (evidence: `client/src/pages/workflows/[id].js`)
- Workflow Editor → Canvas and Palette: renders editor (evidence: `client/src/pages/workflows/[id].js`)
- Workflow Editor → Workflow Store: uses state (evidence: `client/src/pages/workflows/[id].js`)
- Workflow Store → API Client: calls API (evidence: `client/src/store/workflowStore.ts`)
- Auth Store → API Client: calls API (evidence: `client/src/store/authStore.ts`)
- Operator → Auth Store: signs in
- API Client → HTTP App and Routes: sends HTTP requests
- HTTP App and Routes → Workflow Routes: mounts routes (evidence: `server/src/app.js`)
- HTTP App and Routes → Authentication: mounts auth routes (evidence: `server/src/app.js`)
- Workflow Routes → JWT Guard: protects routes (evidence: `server/src/routes/workflowRoutes.js`)
- Workflow Routes → Workflow Service: dispatches requests (evidence: `server/src/routes/workflowRoutes.js`)
- Workflow Routes → Execution API: dispatches execution (evidence: `server/src/routes/workflowRoutes.js`)
- Workflow Service → Workflow Records: reads and writes (evidence: `server/src/controllers/workflowController.js`)
- Workflow Service → AI Generation: generates graph (evidence: `server/src/controllers/workflowController.js`)
- Execution API → Workflow Records: loads workflow (evidence: `server/src/controllers/executionController.js`)
- Execution API → Execution Records: creates execution (evidence: `server/src/controllers/executionController.js`)
- Execution API → Execution Queue: enqueues execution (evidence: `server/src/controllers/executionController.js`)
- Execution Queue → Agent Orchestrator: runs execution (evidence: `server/src/services/queueService.js`)
- Agent Orchestrator → Workflow Planner: plans steps (evidence: `server/src/agents/orchestrator.js`)
- Agent Orchestrator → Node Execution: executes steps (evidence: `server/src/agents/orchestrator.js`)
- Agent Orchestrator → Output Validation: validates outputs (evidence: `server/src/agents/orchestrator.js`)
- Agent Orchestrator → Failure Recovery: handles failures (evidence: `server/src/agents/orchestrator.js`)
- Agent Orchestrator → Execution Records: updates execution (evidence: `server/src/agents/orchestrator.js`)
- Agent Orchestrator → Workflow Records: loads workflow (evidence: `server/src/agents/orchestrator.js`)
- Agent Orchestrator → Agent Memory: stores context (evidence: `server/src/agents/orchestrator.js`)
- Agent Orchestrator → Notifications: creates alerts (evidence: `server/src/agents/orchestrator.js`)
- Dashboard and Metrics → API Client: fetches metrics
- Execution Views → API Client: fetches runs
- Operator → Account Connections: configures accounts
- Operator → Dashboard and Metrics: views status
- Operator → Execution Views: monitors runs
