# victorikaraoha23/agentschat architecture

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

- Interactive diagram: https://gitdiagram.com/victorikaraoha23/agentschat
- Repository: https://github.com/victorikaraoha23/agentschat

## Overview

AgentsChat is a hosted chat product: a signed-in user submits a conversation message, the API authorizes and persists it, invokes Hermes through an adapter, and returns a streamed reply that is stored as an assistant message. The web app also supports account access, profile confirmation, and conversation management. Edges below follow the README’s documented behavior; source excerpts do not cover the AgentsChat application internals, so no additional implementation-level links are inferred.

Main entry points: [`apps/api/app/main.py`](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/main.py) (API routes), [`apps/web`](https://github.com/victorikaraoha23/agentschat/tree/main/apps/web) (Web app), [`apps/api/app/runtime.py`](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/runtime.py) (Runtime boundary), [`apps/api/app/messages.py`](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/messages.py) (Message persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web app"]
  node_conversation_page["Conversation page"]
end

subgraph group_api["API orchestration"]
  node_api_main["API routes<br/>[main.py]"]
  node_api_auth["Authentication<br/>[auth.py]"]
  node_profiles["Profile resolution<br/>[profiles.py]"]
  node_conversations["Conversation operations<br/>[conversations.py]"]
  node_messages["Message persistence<br/>[messages.py]"]
  node_runtime_boundary["Runtime boundary<br/>[runtime.py]"]
end

subgraph group_services["Identity and execution"]
  node_supabase_auth["Supabase Auth"]
  node_supabase_db[("Supabase database")]
  node_hermes_adapter["Hermes adapter<br/>[hermes_adapter.py]"]
  node_hermes_runtime["Hermes runtime"]
end

node_user(("User"))

node_user -->|"uses"| node_webapp
node_webapp -->|"authenticates"| node_supabase_auth
node_webapp -->|"requests"| node_api_main
node_webapp -->|"opens"| node_conversation_page
node_conversation_page -->|"streams execution"| node_api_main
node_api_main -->|"requires identity"| node_api_auth
node_api_main -->|"resolves profile"| node_profiles
node_profiles -->|"reads profile"| node_supabase_db
node_api_main -->|"routes conversation"| node_conversations
node_conversations -->|"persists conversations"| node_supabase_db
node_api_main -->|"routes messages"| node_messages
node_messages -->|"stores messages"| node_supabase_db
node_api_main -->|"orchestrates execution"| node_runtime_boundary
node_runtime_boundary -->|"persists request and reply"| node_messages
node_runtime_boundary -->|"invokes"| node_hermes_adapter
node_hermes_adapter -->|"executes agent"| node_hermes_runtime
node_api_auth -->|"verifies identity"| node_supabase_auth

click node_webapp "https://github.com/victorikaraoha23/agentschat/tree/main/apps/web"
click node_conversation_page "https://github.com/victorikaraoha23/agentschat/tree/main/apps/web"
click node_api_main "https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/main.py"
click node_api_auth "https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/auth.py"
click node_profiles "https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/profiles.py"
click node_conversations "https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/conversations.py"
click node_messages "https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/messages.py"
click node_runtime_boundary "https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/runtime.py"
click node_supabase_db "https://github.com/victorikaraoha23/agentschat/tree/main/supabase"
click node_hermes_adapter "https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/hermes_adapter.py"
click node_hermes_runtime "https://github.com/victorikaraoha23/agentschat/blob/main/agent/conversation_loop.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_webapp,node_conversation_page,node_user toneBlue
class node_api_main,node_api_auth,node_profiles,node_conversations,node_messages,node_runtime_boundary toneAmber
class node_supabase_auth,node_supabase_db,node_hermes_adapter,node_hermes_runtime toneMint
```

## Components

### Web experience

- [Web app](https://github.com/victorikaraoha23/agentschat/tree/main/apps/web): `apps/web`
- [Conversation page](https://github.com/victorikaraoha23/agentschat/tree/main/apps/web): `apps/web`

### API orchestration

- [API routes](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/main.py): `apps/api/app/main.py`
- [Authentication](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/auth.py): `apps/api/app/auth.py`
- [Profile resolution](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/profiles.py): `apps/api/app/profiles.py`
- [Conversation operations](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/conversations.py): `apps/api/app/conversations.py`
- [Message persistence](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/messages.py): `apps/api/app/messages.py`
- [Runtime boundary](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/runtime.py): `apps/api/app/runtime.py`

### Identity and execution

- **Supabase Auth**
- [Supabase database](https://github.com/victorikaraoha23/agentschat/tree/main/supabase): `supabase`
- [Hermes adapter](https://github.com/victorikaraoha23/agentschat/blob/main/apps/api/app/hermes_adapter.py): `apps/api/app/hermes_adapter.py`
- [Hermes runtime](https://github.com/victorikaraoha23/agentschat/blob/main/agent/conversation_loop.py): `agent/conversation_loop.py`

### Other components

- **User**

## Connections

- User → Web app: uses (evidence: `README.md`)
- Web app → Supabase Auth: authenticates (evidence: `README.md`)
- Web app → API routes: requests (evidence: `README.md`)
- Web app → Conversation page: opens (evidence: `README.md`)
- Conversation page → API routes: streams execution (evidence: `README.md`)
- API routes → Authentication: requires identity (evidence: `apps/api/app/main.py`)
- API routes → Profile resolution: resolves profile (evidence: `apps/api/app/main.py`)
- Profile resolution → Supabase database: reads profile (evidence: `README.md`)
- API routes → Conversation operations: routes conversation (evidence: `apps/api/app/main.py`)
- Conversation operations → Supabase database: persists conversations (evidence: `README.md`)
- API routes → Message persistence: routes messages (evidence: `apps/api/app/main.py`)
- Message persistence → Supabase database: stores messages (evidence: `README.md`)
- API routes → Runtime boundary: orchestrates execution (evidence: `README.md`)
- Runtime boundary → Message persistence: persists request and reply (evidence: `README.md`)
- Runtime boundary → Hermes adapter: invokes (evidence: `README.md`)
- Hermes adapter → Hermes runtime: executes agent (evidence: `README.md`)
- Authentication → Supabase Auth: verifies identity (evidence: `README.md`)
