# agentswarms-fyi/agentswarms architecture

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

- Interactive diagram: https://gitdiagram.com/agentswarms-fyi/agentswarms
- Repository: https://github.com/agentswarms-fyi/agentswarms

## Overview

AgentSwarms is a self-hosted agentic AI and data platform. A principal workflow is to ingest and transform data, land it in a governed lakehouse, then query it through BI dashboards or the AI analyst; agents and ML models can also use that data. The graph includes major README capabilities and a governance layer. Relationship evidence comes from the README and shown source references; many product areas were not sampled, so some documented subsystems are shown without speculative implementation-level links.

Main entry points: [`src/components/AppLayout.tsx`](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/components/AppLayout.tsx) (Platform UI), [`src/utils/etl/service.server.ts`](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/etl/service.server.ts) (ETL pipelines), [`src/utils/lakehouse/core.server.ts`](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/lakehouse/core.server.ts) (Lakehouse storage), [`src/lib/biAgent.ts`](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/biAgent.ts) (AI analyst)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experiences"]
  node_app["Platform UI<br/>[AppLayout.tsx]"]
end

subgraph group_data["Data movement"]
  node_etl["ETL pipelines<br/>[service.server.ts]"]
  node_sources[("External data sources")]
end

subgraph group_lakehouse["Lakehouse and governance"]
  node_catalog["Data catalog<br/>[dataCatalog.ts]"]
  node_lakehouse_core[("Lakehouse storage<br/>[core.server.ts]")]
  node_semantic["Semantic layer<br/>[semanticLayer.ts]"]
  node_iam["Access governance<br/>[iam.server.ts]"]
  node_audit[("Audit trail<br/>[auditChain.ts]")]
end

subgraph group_analytics["Analytics and ML"]
  node_bi["BI dashboards<br/>[biDashboards.ts]"]
  node_analyst["AI analyst<br/>[biAgent.ts]"]
  node_ml["No-code ML"]
  node_sheets["Data sheets<br/>[engine.ts]"]
end

subgraph group_automation["Agents and automation"]
  node_agents["AI agents<br/>[agentGuarded.ts]"]
  node_swarms["Agent swarms<br/>[swarmRunManager.ts]"]
  node_knowledge["RAG knowledge bases<br/>[kbRag.ts]"]
  node_mcp["MCP integrations"]
  node_workflows["Workflows"]
  node_notebooks["Notebooks<br/>[index.mjs]"]
end

node_user(("User"))
node_supabase[("Supabase")]

node_user -->|"uses"| node_app
node_app -->|"configures"| node_etl
node_sources -->|"provides data"| node_etl
node_etl -->|"loads data"| node_lakehouse_core
node_etl -->|"refreshes catalog"| node_catalog
node_lakehouse_core -->|"registers tables"| node_catalog
node_app -->|"builds dashboards"| node_bi
node_bi -->|"uses definitions"| node_semantic
node_app -->|"asks questions"| node_analyst
node_analyst -->|"uses definitions"| node_semantic
node_analyst -->|"runs SQL"| node_lakehouse_core
node_app -->|"trains models"| node_ml
node_ml -->|"scores rows"| node_lakehouse_core
node_app -->|"edits data"| node_sheets
node_app -->|"builds agents"| node_agents
node_app -->|"designs swarms"| node_swarms
node_app -->|"connects sources"| node_knowledge
node_app -->|"configures tools"| node_mcp
node_app -->|"orchestrates work"| node_workflows
node_app -->|"opens notebooks"| node_notebooks
node_semantic -->|"queries data"| node_lakehouse_core
node_iam -->|"governs access"| node_bi
node_iam -->|"governs access"| node_agents
node_iam -->|"governs access"| node_ml
node_app -->|"uses backend"| node_supabase
node_etl -->|"uses catalog"| node_supabase
node_analyst -.->|"records activity"| node_audit

click node_app "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/components/AppLayout.tsx"
click node_catalog "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/dataCatalog.ts"
click node_etl "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/etl/service.server.ts"
click node_lakehouse_core "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/lakehouse/core.server.ts"
click node_semantic "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/semanticLayer.ts"
click node_iam "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/iam.server.ts"
click node_audit "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/auditChain.ts"
click node_bi "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/biDashboards.ts"
click node_analyst "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/biAgent.ts"
click node_ml "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/components/ml/DeploymentPanel.tsx"
click node_sheets "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/sheets/engine.ts"
click node_agents "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/agentGuarded.ts"
click node_swarms "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/swarmRunManager.ts"
click node_knowledge "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/kbRag.ts"
click node_mcp "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/mcp/servers.functions.ts"
click node_workflows "https://github.com/agentswarms-fyi/agentswarms/blob/main/src/components/workflows/WorkflowPalette.tsx"
click node_notebooks "https://github.com/agentswarms-fyi/agentswarms/blob/main/services/notebook-gateway/index.mjs"

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_app,node_user toneBlue
class node_etl,node_sources,node_supabase toneAmber
class node_catalog,node_lakehouse_core,node_semantic,node_iam,node_audit toneMint
class node_bi,node_analyst,node_ml,node_sheets toneRose
class node_agents,node_swarms,node_knowledge,node_mcp,node_workflows,node_notebooks toneIndigo
```

## Components

### User experiences

- [Platform UI](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/components/AppLayout.tsx): `src/components/AppLayout.tsx`

### Data movement

- [ETL pipelines](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/etl/service.server.ts): `src/utils/etl/service.server.ts`
- **External data sources**

### Lakehouse and governance

- [Data catalog](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/dataCatalog.ts): `src/lib/dataCatalog.ts`
- [Lakehouse storage](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/lakehouse/core.server.ts): `src/utils/lakehouse/core.server.ts`
- [Semantic layer](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/semanticLayer.ts): `src/lib/semanticLayer.ts`
- [Access governance](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/utils/iam.server.ts): `src/utils/iam.server.ts`
- [Audit trail](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/auditChain.ts): `src/lib/auditChain.ts`

### Analytics and ML

- [BI dashboards](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/biDashboards.ts): `src/lib/biDashboards.ts`
- [AI analyst](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/biAgent.ts): `src/lib/biAgent.ts`
- [No-code ML](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/components/ml/DeploymentPanel.tsx): `src/components/ml/DeploymentPanel.tsx`
- [Data sheets](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/sheets/engine.ts): `src/lib/sheets/engine.ts`

### Agents and automation

- [AI agents](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/agentGuarded.ts): `src/lib/agentGuarded.ts`
- [Agent swarms](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/swarmRunManager.ts): `src/lib/swarmRunManager.ts`
- [RAG knowledge bases](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/kbRag.ts): `src/lib/kbRag.ts`
- [MCP integrations](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/lib/mcp/servers.functions.ts): `src/lib/mcp/servers.functions.ts`
- [Workflows](https://github.com/agentswarms-fyi/agentswarms/blob/main/src/components/workflows/WorkflowPalette.tsx): `src/components/workflows/WorkflowPalette.tsx`
- [Notebooks](https://github.com/agentswarms-fyi/agentswarms/blob/main/services/notebook-gateway/index.mjs): `services/notebook-gateway/index.mjs`

### Other components

- **User**
- **Supabase**

## Connections

- User → Platform UI: uses (evidence: `README.md`)
- Platform UI → ETL pipelines: configures (evidence: `README.md`)
- External data sources → ETL pipelines: provides data (evidence: `README.md`)
- ETL pipelines → Lakehouse storage: loads data (evidence: `README.md`)
- ETL pipelines → Data catalog: refreshes catalog (evidence: `README.md`)
- Lakehouse storage → Data catalog: registers tables (evidence: `README.md`)
- Platform UI → BI dashboards: builds dashboards (evidence: `README.md`)
- BI dashboards → Semantic layer: uses definitions (evidence: `README.md`)
- Platform UI → AI analyst: asks questions (evidence: `README.md`)
- AI analyst → Semantic layer: uses definitions (evidence: `README.md`)
- AI analyst → Lakehouse storage: runs SQL (evidence: `README.md`)
- Platform UI → No-code ML: trains models (evidence: `README.md`)
- No-code ML → Lakehouse storage: scores rows (evidence: `README.md`)
- Platform UI → Data sheets: edits data (evidence: `README.md`)
- Platform UI → AI agents: builds agents (evidence: `README.md`)
- Platform UI → Agent swarms: designs swarms (evidence: `README.md`)
- Platform UI → RAG knowledge bases: connects sources (evidence: `README.md`)
- Platform UI → MCP integrations: configures tools (evidence: `README.md`)
- Platform UI → Workflows: orchestrates work (evidence: `README.md`)
- Platform UI → Notebooks: opens notebooks (evidence: `README.md`)
- Semantic layer → Lakehouse storage: queries data (evidence: `README.md`)
- Access governance → BI dashboards: governs access (evidence: `README.md`)
- Access governance → AI agents: governs access (evidence: `README.md`)
- Access governance → No-code ML: governs access (evidence: `README.md`)
- Platform UI → Supabase: uses backend (evidence: `README.md`)
- ETL pipelines → Supabase: uses catalog (evidence: `README.md`)
- AI analyst → Audit trail: records activity
