# laavanjan/concierge architecture

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

- Interactive diagram: https://gitdiagram.com/laavanjan/concierge
- Repository: https://github.com/laavanjan/concierge

## Overview

Concierge is a multi-channel hotel reservations assistant. Guests enter through web chat, WhatsApp, email, or voice; the gateway hands turns to a shared runtime, which routes work to booking, pricing, and policy specialists. Backend actions go through MCP to inventory, pricing, and reservations services; policy answers use cited retrieval. The README documents approvals, operator handoffs, and operational dashboards as additional capabilities. Edges follow README statements or shown calls; several subsystems are represented at directory level because their implementation was not sampled.

Main entry points: [`agents/runtime.py`](https://github.com/laavanjan/concierge/blob/main/agents/runtime.py) (Conversation runtime), [`channels/gateway.py`](https://github.com/laavanjan/concierge/blob/main/channels/gateway.py) (Channel gateway), [`agents/specialists.py`](https://github.com/laavanjan/concierge/blob/main/agents/specialists.py) (Booking, pricing, policy agents), [`services/client.py`](https://github.com/laavanjan/concierge/blob/main/services/client.py) (Backend service client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_channels["Guest channels"]
  node_web["Web chat<br/>[web.py]"]
  node_messaging["Messaging channels<br/>[whatsapp.py]"]
  node_email["Email channel<br/>[email_channel.py]"]
  node_voice["Voice channel<br/>[voice.py]"]
  node_gateway["Channel gateway<br/>[gateway.py]"]
  node_operator["Operator console<br/>[operator.py]"]
  node_ops["Ops dashboard<br/>[ops.py]"]
end

subgraph group_agents["Conversation runtime"]
  node_runtime["Conversation runtime<br/>[runtime.py]"]
  node_supervisor["Supervisor routing<br/>[router.py]"]
  node_specialists["Booking, pricing, policy agents<br/>[specialists.py]"]
  node_sessions[("Session and customer memory<br/>[stores.py]")]
  node_mcp["MCP tools and server<br/>[server.py]"]
  node_llm["Model clients"]
end

subgraph group_knowledge["Policy and safeguards"]
  node_rag["Hybrid policy retrieval<br/>[retriever.py]"]
  node_guardrails["Input and output safeguards"]
  node_approvals["Approval and handoff gate<br/>[approvals.py]"]
  node_evaluation["Evaluation gate"]
end

subgraph group_backend["Booking and operations"]
  node_inventory[("Inventory and holds<br/>[app.py]")]
  node_pricing[("Dynamic pricing<br/>[app.py]")]
  node_reservations[("Reservations<br/>[app.py]")]
  node_service_client["Backend service client<br/>[client.py]"]
  node_shared["Shared domain, config, telemetry"]
end

node_guest(("Guest"))

node_guest -->|"sends message"| node_web
node_guest -->|"sends message"| node_messaging
node_guest -->|"sends message"| node_email
node_guest -->|"speaks to"| node_voice
node_web -->|"submits turn"| node_gateway
node_messaging -->|"submits turn"| node_gateway
node_email -->|"submits turn"| node_gateway
node_voice -->|"submits turn"| node_gateway
node_gateway -->|"handles turn"| node_runtime
node_runtime -->|"routes turn"| node_supervisor
node_supervisor -->|"fans out"| node_specialists
node_runtime -->|"persists context"| node_sessions
node_runtime -->|"checks input"| node_guardrails
node_specialists -->|"calls tools"| node_mcp
node_specialists -->|"retrieves citations"| node_rag
node_mcp -->|"calls backend"| node_service_client
node_service_client -->|"calls service"| node_inventory
node_service_client -->|"calls service"| node_pricing
node_service_client -->|"calls service"| node_reservations
node_reservations -->|"fetches quote"| node_pricing
node_reservations -->|"places holds"| node_inventory
node_pricing -->|"reads occupancy"| node_inventory
node_specialists -.->|"requests approval"| node_approvals
node_operator -->|"reviews actions"| node_approvals
node_operator -.->|"resumes handoff"| node_runtime
node_ops -.->|"reads metrics"| node_shared
node_runtime -->|"uses model"| node_llm
node_evaluation -->|"exercises flows"| node_runtime
node_evaluation -->|"evaluates retrieval"| node_rag

click node_web "https://github.com/laavanjan/concierge/blob/main/channels/web.py"
click node_messaging "https://github.com/laavanjan/concierge/blob/main/channels/whatsapp.py"
click node_email "https://github.com/laavanjan/concierge/blob/main/channels/email_channel.py"
click node_voice "https://github.com/laavanjan/concierge/blob/main/channels/voice.py"
click node_gateway "https://github.com/laavanjan/concierge/blob/main/channels/gateway.py"
click node_operator "https://github.com/laavanjan/concierge/blob/main/channels/operator.py"
click node_ops "https://github.com/laavanjan/concierge/blob/main/channels/ops.py"
click node_runtime "https://github.com/laavanjan/concierge/blob/main/agents/runtime.py"
click node_supervisor "https://github.com/laavanjan/concierge/blob/main/agents/router.py"
click node_specialists "https://github.com/laavanjan/concierge/blob/main/agents/specialists.py"
click node_sessions "https://github.com/laavanjan/concierge/blob/main/agents/stores.py"
click node_mcp "https://github.com/laavanjan/concierge/blob/main/mcp_server/server.py"
click node_llm "https://github.com/laavanjan/concierge/tree/main/agents/llm"
click node_rag "https://github.com/laavanjan/concierge/blob/main/rag/retriever.py"
click node_guardrails "https://github.com/laavanjan/concierge/tree/main/guardrails"
click node_approvals "https://github.com/laavanjan/concierge/blob/main/common/approvals.py"
click node_evaluation "https://github.com/laavanjan/concierge/tree/main/evals"
click node_inventory "https://github.com/laavanjan/concierge/blob/main/services/inventory/app.py"
click node_pricing "https://github.com/laavanjan/concierge/blob/main/services/pricing/app.py"
click node_reservations "https://github.com/laavanjan/concierge/blob/main/services/reservations/app.py"
click node_service_client "https://github.com/laavanjan/concierge/blob/main/services/client.py"
click node_shared "https://github.com/laavanjan/concierge/tree/main/common"

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,node_messaging,node_email,node_voice,node_gateway,node_operator,node_ops toneBlue
class node_runtime,node_supervisor,node_specialists,node_sessions,node_mcp,node_llm toneAmber
class node_rag,node_guardrails,node_approvals,node_evaluation toneMint
class node_inventory,node_pricing,node_reservations,node_service_client,node_shared toneRose
class node_guest toneIndigo
```

## Components

### Guest channels

- [Web chat](https://github.com/laavanjan/concierge/blob/main/channels/web.py): `channels/web.py`
- [Messaging channels](https://github.com/laavanjan/concierge/blob/main/channels/whatsapp.py): `channels/whatsapp.py`
- [Email channel](https://github.com/laavanjan/concierge/blob/main/channels/email_channel.py): `channels/email_channel.py`
- [Voice channel](https://github.com/laavanjan/concierge/blob/main/channels/voice.py): `channels/voice.py`
- [Channel gateway](https://github.com/laavanjan/concierge/blob/main/channels/gateway.py): `channels/gateway.py`
- [Operator console](https://github.com/laavanjan/concierge/blob/main/channels/operator.py): `channels/operator.py`
- [Ops dashboard](https://github.com/laavanjan/concierge/blob/main/channels/ops.py): `channels/ops.py`

### Conversation runtime

- [Conversation runtime](https://github.com/laavanjan/concierge/blob/main/agents/runtime.py): `agents/runtime.py`
- [Supervisor routing](https://github.com/laavanjan/concierge/blob/main/agents/router.py): `agents/router.py`
- [Booking, pricing, policy agents](https://github.com/laavanjan/concierge/blob/main/agents/specialists.py): `agents/specialists.py`
- [Session and customer memory](https://github.com/laavanjan/concierge/blob/main/agents/stores.py): `agents/stores.py`
- [MCP tools and server](https://github.com/laavanjan/concierge/blob/main/mcp_server/server.py): `mcp_server/server.py`
- [Model clients](https://github.com/laavanjan/concierge/tree/main/agents/llm): `agents/llm`

### Policy and safeguards

- [Hybrid policy retrieval](https://github.com/laavanjan/concierge/blob/main/rag/retriever.py): `rag/retriever.py`
- [Input and output safeguards](https://github.com/laavanjan/concierge/tree/main/guardrails): `guardrails`
- [Approval and handoff gate](https://github.com/laavanjan/concierge/blob/main/common/approvals.py): `common/approvals.py`
- [Evaluation gate](https://github.com/laavanjan/concierge/tree/main/evals): `evals`

### Booking and operations

- [Inventory and holds](https://github.com/laavanjan/concierge/blob/main/services/inventory/app.py): `services/inventory/app.py`
- [Dynamic pricing](https://github.com/laavanjan/concierge/blob/main/services/pricing/app.py): `services/pricing/app.py`
- [Reservations](https://github.com/laavanjan/concierge/blob/main/services/reservations/app.py): `services/reservations/app.py`
- [Backend service client](https://github.com/laavanjan/concierge/blob/main/services/client.py): `services/client.py`
- [Shared domain, config, telemetry](https://github.com/laavanjan/concierge/tree/main/common): `common`

### Other components

- **Guest**

## Connections

- Guest → Web chat: sends message
- Guest → Messaging channels: sends message
- Guest → Email channel: sends message
- Guest → Voice channel: speaks to
- Web chat → Channel gateway: submits turn
- Messaging channels → Channel gateway: submits turn
- Email channel → Channel gateway: submits turn
- Voice channel → Channel gateway: submits turn
- Channel gateway → Conversation runtime: handles turn
- Conversation runtime → Supervisor routing: routes turn (evidence: `agents/runtime.py`)
- Supervisor routing → Booking, pricing, policy agents: fans out
- Conversation runtime → Session and customer memory: persists context (evidence: `agents/runtime.py`)
- Conversation runtime → Input and output safeguards: checks input (evidence: `agents/runtime.py`)
- Booking, pricing, policy agents → MCP tools and server: calls tools
- Booking, pricing, policy agents → Hybrid policy retrieval: retrieves citations
- MCP tools and server → Backend service client: calls backend (evidence: `mcp_server/server.py`)
- Backend service client → Inventory and holds: calls service (evidence: `services/client.py`)
- Backend service client → Dynamic pricing: calls service (evidence: `services/client.py`)
- Backend service client → Reservations: calls service (evidence: `services/client.py`)
- Reservations → Dynamic pricing: fetches quote (evidence: `services/reservations/app.py`)
- Reservations → Inventory and holds: places holds (evidence: `services/reservations/app.py`)
- Dynamic pricing → Inventory and holds: reads occupancy (evidence: `services/pricing/app.py`)
- Booking, pricing, policy agents → Approval and handoff gate: requests approval
- Operator console → Approval and handoff gate: reviews actions
- Operator console → Conversation runtime: resumes handoff
- Ops dashboard → Shared domain, config, telemetry: reads metrics
- Conversation runtime → Model clients: uses model (evidence: `agents/runtime.py`)
- Evaluation gate → Conversation runtime: exercises flows (evidence: `evals/harness.py`)
- Evaluation gate → Hybrid policy retrieval: evaluates retrieval (evidence: `evals/harness.py`)
