# sayamgada/omniagent architecture

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

- Interactive diagram: https://gitdiagram.com/sayamgada/omniagent
- Repository: https://github.com/sayamgada/omniagent

## Overview

OmniAgent is a web platform for turning a user’s natural-language automation request into a generated, configurable workflow/agent, then managing integrations and deployment through n8n. The main path is request entry, semantic retrieval, LLM generation, preview/configuration, compilation, and deployment. The graph also includes authentication and integration management. Some backend and frontend modules were not sampled; those relationships are included only where the README or SOURCE INDEX supports them.

Main entry points: [`server/app/routers/agent_router.py`](https://github.com/sayamgada/omniagent/blob/main/server/app/routers/agent_router.py) (Agent API), [`client/src/App.tsx`](https://github.com/sayamgada/omniagent/blob/main/client/src/App.tsx) (Web app routes), [`server/app/main.py`](https://github.com/sayamgada/omniagent/blob/main/server/app/main.py) (FastAPI application), [`client/src/pages/NewAgentCreation.tsx`](https://github.com/sayamgada/omniagent/blob/main/client/src/pages/NewAgentCreation.tsx) (Agent creation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_web_app["Web app routes<br/>[App.tsx]"]
  node_auth_ui["Sign-in and signup<br/>[SignIn.tsx]"]
  node_agent_creation["Agent creation"]
  node_agent_management["Agent management<br/>[MyAgents.tsx]"]
  node_workflow_review["Workflow review"]
  node_workflow_preview["Workflow preview"]
  node_auth_context["Auth state<br/>[AuthContext.tsx]"]
  node_integrations_ui["Integration settings<br/>[Integrations.tsx]"]
end

subgraph group_generation["Agent generation"]
  node_agent_routes["Agent API<br/>[agent_router.py]"]
  node_semantic_search[("Automation retrieval<br/>[vectorstore.py]")]
  node_workflow_generator["Workflow generation"]
  node_llm_service["LLM service<br/>[llm_service.py]"]
  node_workflow_compiler["Workflow compiler<br/>[compile.py]"]
  node_workflow_store[("Preview storage")]
end

subgraph group_platform["Backend platform"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_auth_core["JWT and password auth<br/>[auth.py]"]
  node_users[("User records<br/>[user.py]")]
  node_mongo[("MongoDB previews")]
end

subgraph group_integrations["Integrations and execution"]
  node_integration_routes["Integration API"]
  node_integration_service["Integration service"]
  node_n8n_client["n8n client<br/>[n8n_client.py]"]
end

node_user(("User"))
node_n8n{{"n8n"}}

node_user -->|"opens platform"| node_web_app
node_web_app -->|"routes to"| node_auth_ui
node_web_app -->|"routes to"| node_agent_creation
node_web_app -->|"routes to"| node_agent_management
node_web_app -->|"provides auth"| node_auth_context
node_user -->|"describes automation"| node_agent_creation
node_agent_creation -.->|"submits request"| node_agent_routes
node_agent_routes -->|"searches automations"| node_semantic_search
node_agent_routes -->|"generates workflow"| node_workflow_generator
node_workflow_generator -.->|"uses LLM"| node_llm_service
node_agent_routes -->|"compiles workflow"| node_workflow_compiler
node_agent_routes -->|"loads workflow data"| node_workflow_store
node_workflow_store -->|"writes previews"| node_mongo
node_agent_routes -.->|"returns preview"| node_workflow_review
node_workflow_review -->|"renders pipeline"| node_workflow_preview
node_agent_routes -->|"creates workflow"| node_n8n_client
node_n8n_client -->|"calls API"| node_n8n
node_integrations_ui -.->|"manages connections"| node_integration_routes
node_integration_routes -->|"delegates operations"| node_integration_service
node_integration_service -->|"uses credentials API"| node_n8n_client
node_auth_ui -.->|"authenticates"| node_auth_routes
node_auth_routes -->|"uses auth helpers"| node_auth_core
node_auth_core -->|"queries users"| node_users
node_api_app -->|"registers routes"| node_auth_routes
node_api_app -->|"registers routes"| node_agent_routes
node_api_app -->|"registers routes"| node_integration_routes

click node_web_app "https://github.com/sayamgada/omniagent/blob/main/client/src/App.tsx"
click node_auth_ui "https://github.com/sayamgada/omniagent/blob/main/client/src/pages/SignIn.tsx"
click node_agent_creation "https://github.com/sayamgada/omniagent/blob/main/client/src/pages/NewAgentCreation.tsx"
click node_agent_management "https://github.com/sayamgada/omniagent/blob/main/client/src/pages/dashboard/MyAgents.tsx"
click node_workflow_review "https://github.com/sayamgada/omniagent/blob/main/client/src/components/workflow/WorkflowReviewStep.tsx"
click node_workflow_preview "https://github.com/sayamgada/omniagent/blob/main/client/src/components/workflow/WorkflowPipelinePreview.tsx"
click node_auth_context "https://github.com/sayamgada/omniagent/blob/main/client/src/context/AuthContext.tsx"
click node_api_app "https://github.com/sayamgada/omniagent/blob/main/server/app/main.py"
click node_auth_routes "https://github.com/sayamgada/omniagent/blob/main/server/app/routers/auth.py"
click node_auth_core "https://github.com/sayamgada/omniagent/blob/main/server/app/core/auth.py"
click node_users "https://github.com/sayamgada/omniagent/blob/main/server/app/models/user.py"
click node_agent_routes "https://github.com/sayamgada/omniagent/blob/main/server/app/routers/agent_router.py"
click node_semantic_search "https://github.com/sayamgada/omniagent/blob/main/server/app/services/vectorstore.py"
click node_workflow_generator "https://github.com/sayamgada/omniagent/blob/main/server/app/services/workflow_generator.py"
click node_llm_service "https://github.com/sayamgada/omniagent/blob/main/server/app/services/llm_service.py"
click node_workflow_compiler "https://github.com/sayamgada/omniagent/blob/main/server/app/compiler/compile.py"
click node_workflow_store "https://github.com/sayamgada/omniagent/blob/main/server/app/services/workflow_storage.py"
click node_integrations_ui "https://github.com/sayamgada/omniagent/blob/main/client/src/pages/dashboard/Integrations.tsx"
click node_integration_routes "https://github.com/sayamgada/omniagent/blob/main/server/app/routers/integration_router.py"
click node_integration_service "https://github.com/sayamgada/omniagent/blob/main/server/app/services/integration_service.py"
click node_n8n_client "https://github.com/sayamgada/omniagent/blob/main/server/app/services/n8n_client.py"
click node_mongo "https://github.com/sayamgada/omniagent/blob/main/server/app/models/automation_preview_model.py"

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_web_app,node_auth_ui,node_agent_creation,node_agent_management,node_workflow_review,node_workflow_preview,node_auth_context,node_integrations_ui,node_user toneBlue
class node_agent_routes,node_semantic_search,node_workflow_generator,node_llm_service,node_workflow_compiler,node_workflow_store toneAmber
class node_api_app,node_auth_routes,node_auth_core,node_users,node_mongo toneMint
class node_integration_routes,node_integration_service,node_n8n_client toneRose
class node_n8n toneIndigo
```

## Components

### Web experience

- [Web app routes](https://github.com/sayamgada/omniagent/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Sign-in and signup](https://github.com/sayamgada/omniagent/blob/main/client/src/pages/SignIn.tsx): `client/src/pages/SignIn.tsx`
- [Agent creation](https://github.com/sayamgada/omniagent/blob/main/client/src/pages/NewAgentCreation.tsx): `client/src/pages/NewAgentCreation.tsx`
- [Agent management](https://github.com/sayamgada/omniagent/blob/main/client/src/pages/dashboard/MyAgents.tsx): `client/src/pages/dashboard/MyAgents.tsx`
- [Workflow review](https://github.com/sayamgada/omniagent/blob/main/client/src/components/workflow/WorkflowReviewStep.tsx): `client/src/components/workflow/WorkflowReviewStep.tsx`
- [Workflow preview](https://github.com/sayamgada/omniagent/blob/main/client/src/components/workflow/WorkflowPipelinePreview.tsx): `client/src/components/workflow/WorkflowPipelinePreview.tsx`
- [Auth state](https://github.com/sayamgada/omniagent/blob/main/client/src/context/AuthContext.tsx): `client/src/context/AuthContext.tsx`
- [Integration settings](https://github.com/sayamgada/omniagent/blob/main/client/src/pages/dashboard/Integrations.tsx): `client/src/pages/dashboard/Integrations.tsx`

### Agent generation

- [Agent API](https://github.com/sayamgada/omniagent/blob/main/server/app/routers/agent_router.py): `server/app/routers/agent_router.py`
- [Automation retrieval](https://github.com/sayamgada/omniagent/blob/main/server/app/services/vectorstore.py): `server/app/services/vectorstore.py`
- [Workflow generation](https://github.com/sayamgada/omniagent/blob/main/server/app/services/workflow_generator.py): `server/app/services/workflow_generator.py`
- [LLM service](https://github.com/sayamgada/omniagent/blob/main/server/app/services/llm_service.py): `server/app/services/llm_service.py`
- [Workflow compiler](https://github.com/sayamgada/omniagent/blob/main/server/app/compiler/compile.py): `server/app/compiler/compile.py`
- [Preview storage](https://github.com/sayamgada/omniagent/blob/main/server/app/services/workflow_storage.py): `server/app/services/workflow_storage.py`

### Backend platform

- [FastAPI application](https://github.com/sayamgada/omniagent/blob/main/server/app/main.py): `server/app/main.py`
- [Authentication routes](https://github.com/sayamgada/omniagent/blob/main/server/app/routers/auth.py): `server/app/routers/auth.py`
- [JWT and password auth](https://github.com/sayamgada/omniagent/blob/main/server/app/core/auth.py): `server/app/core/auth.py`
- [User records](https://github.com/sayamgada/omniagent/blob/main/server/app/models/user.py): `server/app/models/user.py`
- [MongoDB previews](https://github.com/sayamgada/omniagent/blob/main/server/app/models/automation_preview_model.py): `server/app/models/automation_preview_model.py`

### Integrations and execution

- [Integration API](https://github.com/sayamgada/omniagent/blob/main/server/app/routers/integration_router.py): `server/app/routers/integration_router.py`
- [Integration service](https://github.com/sayamgada/omniagent/blob/main/server/app/services/integration_service.py): `server/app/services/integration_service.py`
- [n8n client](https://github.com/sayamgada/omniagent/blob/main/server/app/services/n8n_client.py): `server/app/services/n8n_client.py`

### Other components

- **User**
- **n8n**

## Connections

- User → Web app routes: opens platform (evidence: `README.md`)
- Web app routes → Sign-in and signup: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Agent creation: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Agent management: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Auth state: provides auth (evidence: `client/src/App.tsx`)
- User → Agent creation: describes automation (evidence: `README.md`)
- Agent creation → Agent API: submits request
- Agent API → Automation retrieval: searches automations (evidence: `server/app/routers/agent_router.py`)
- Agent API → Workflow generation: generates workflow (evidence: `server/app/routers/agent_router.py`)
- Workflow generation → LLM service: uses LLM
- Agent API → Workflow compiler: compiles workflow (evidence: `server/app/routers/agent_router.py`)
- Agent API → Preview storage: loads workflow data (evidence: `server/app/routers/agent_router.py`)
- Preview storage → MongoDB previews: writes previews (evidence: `server/app/services/workflow_storage.py`)
- Agent API → Workflow review: returns preview
- Workflow review → Workflow preview: renders pipeline (evidence: `client/src/components/workflow/WorkflowReviewStep.tsx`)
- Agent API → n8n client: creates workflow (evidence: `server/app/routers/agent_router.py`)
- n8n client → n8n: calls API (evidence: `server/app/services/n8n_client.py`)
- Integration settings → Integration API: manages connections
- Integration API → Integration service: delegates operations (evidence: `server/app/routers/integration_router.py`)
- Integration service → n8n client: uses credentials API (evidence: `server/app/services/integration_service.py`)
- Sign-in and signup → Authentication routes: authenticates
- Authentication routes → JWT and password auth: uses auth helpers (evidence: `server/app/routers/auth.py`)
- JWT and password auth → User records: queries users (evidence: `server/app/core/auth.py`)
- FastAPI application → Authentication routes: registers routes (evidence: `server/app/main.py`)
- FastAPI application → Agent API: registers routes (evidence: `server/app/main.py`)
- FastAPI application → Integration API: registers routes (evidence: `server/app/main.py`)
