# felipebebas/getnet-multi-agent-support architecture

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

- Interactive diagram: https://gitdiagram.com/felipebebas/getnet-multi-agent-support
- Repository: https://github.com/felipebebas/getnet-multi-agent-support

## Overview

Getnet’s product is an authenticated, multi-agent merchant-support service. A client request enters the FastAPI gateway, is checked and routed through a LangGraph workflow, then receives a synthesized and sanitized response; higher-risk cases can pause for operator review and resume. The principal domain stages are knowledge retrieval, merchant operations, and escalation. SQLite-backed history and handoffs, vector retrieval, and observability support the runtime. The README documents capabilities beyond the sampled excerpts; edges without direct evidence are omitted.

Main entry points: [`src/orchestration/graph.py`](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/graph.py) (LangGraph Runner), [`src/api/routes.py`](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/routes.py) (HTTP Routes), [`src/tools/support_tools.py`](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/tools/support_tools.py) (Merchant Tools), [`src/agents/escalation_agent.py`](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/escalation_agent.py) (Escalation Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gateway["API Gateway"]
  node_api["HTTP Routes<br/>[routes.py]"]
  node_auth["Auth and RBAC<br/>[auth.py]"]
  node_limits["Rate Limits<br/>[rate_limit.py]"]
  node_dashboard["HITL Dashboard<br/>[dashboard.py]"]
end

subgraph group_workflow["Agent Workflow"]
  node_graph["LangGraph Runner<br/>[graph.py]"]
  node_state_schema["Workflow State<br/>[state.py]"]
  node_router["Intent Router<br/>[router_agent.py]"]
end

subgraph group_domain["Support Domains"]
  node_knowledge["Knowledge Agent<br/>[knowledge_agent.py]"]
  node_support["Support Agent<br/>[support_agent.py]"]
  node_escalation["Escalation Agent"]
  node_personality["Response Synthesis"]
  node_knowledge_tools["Knowledge Tools<br/>[knowledge_tools.py]"]
  node_support_tools["Merchant Tools<br/>[support_tools.py]"]
  node_escalation_tools["Handoff Tools"]
end

subgraph group_state["State and Retrieval"]
  node_ingest["Knowledge Ingestion<br/>[ingest.py]"]
  node_vector[("Vector Retrieval<br/>[vector_store.py]")]
  node_sessions[("Session History<br/>[session_store.py]")]
  node_persistence[("Handoff Persistence<br/>[persistence.py]")]
  node_merchant_data[("Merchant Ledger<br/>[merchants.json]")]
end

subgraph group_safety["Safety and Operations"]
  node_validator["Input Validation<br/>[validator.py]"]
  node_redaction["Sensitive Data Masking<br/>[redaction.py]"]
  node_tracing["Tracing and Alerts<br/>[tracer.py]"]
  node_logger["Structured Logging<br/>[logger.py]"]
end

node_client(("Merchant / Operator"))
node_operator(("Human Operator"))

node_client -->|"sends request"| node_api
node_api -->|"authenticates"| node_auth
node_api -->|"applies limits"| node_limits
node_api -->|"runs workflow"| node_graph
node_api -->|"serves dashboard"| node_dashboard
node_graph -->|"uses state"| node_state_schema
node_graph -->|"dispatches"| node_router
node_graph -->|"dispatches"| node_knowledge
node_graph -->|"dispatches"| node_support
node_graph -->|"dispatches"| node_escalation
node_graph -->|"synthesizes with"| node_personality
node_graph -->|"validates input"| node_validator
node_graph -->|"stores turns"| node_sessions
node_graph -->|"records handoffs"| node_persistence
node_knowledge -->|"uses tools"| node_knowledge_tools
node_knowledge_tools -->|"retrieves chunks"| node_vector
node_support -->|"uses tools"| node_support_tools
node_support_tools -->|"reads merchant data"| node_merchant_data
node_support_tools -->|"manages tickets"| node_persistence
node_escalation -->|"uses tools"| node_escalation_tools
node_escalation -->|"manages tickets"| node_support_tools
node_operator -->|"reviews handoffs"| node_dashboard
node_dashboard -->|"resumes workflow"| node_api
node_ingest -->|"indexes knowledge"| node_vector
node_graph -->|"sanitizes output"| node_redaction
node_graph -->|"records execution"| node_tracing
node_tracing -->|"emits events"| node_logger
node_api -->|"sanitizes responses"| node_redaction

click node_api "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/routes.py"
click node_auth "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/auth.py"
click node_limits "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/rate_limit.py"
click node_dashboard "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/dashboard.py"
click node_graph "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/graph.py"
click node_state_schema "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/state.py"
click node_router "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/router_agent.py"
click node_knowledge "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/knowledge_agent.py"
click node_support "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/support_agent.py"
click node_escalation "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/escalation_agent.py"
click node_personality "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/personality_agent.py"
click node_knowledge_tools "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/tools/knowledge_tools.py"
click node_support_tools "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/tools/support_tools.py"
click node_escalation_tools "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/tools/escalation_tools.py"
click node_ingest "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/rag/ingest.py"
click node_vector "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/rag/vector_store.py"
click node_sessions "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/session_store.py"
click node_persistence "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/persistence.py"
click node_validator "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/guardrails/validator.py"
click node_redaction "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/guardrails/redaction.py"
click node_tracing "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/observability/tracer.py"
click node_logger "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/observability/logger.py"
click node_merchant_data "https://github.com/felipebebas/getnet-multi-agent-support/blob/main/data/merchants.json"

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_api,node_auth,node_limits,node_dashboard toneBlue
class node_graph,node_state_schema,node_router toneAmber
class node_knowledge,node_support,node_escalation,node_personality,node_knowledge_tools,node_support_tools,node_escalation_tools toneMint
class node_ingest,node_vector,node_sessions,node_persistence,node_merchant_data toneRose
class node_validator,node_redaction,node_tracing,node_logger,node_client,node_operator toneIndigo
```

## Components

### API Gateway

- [HTTP Routes](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/routes.py): `src/api/routes.py`
- [Auth and RBAC](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/auth.py): `src/api/auth.py`
- [Rate Limits](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/rate_limit.py): `src/api/rate_limit.py`
- [HITL Dashboard](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/api/dashboard.py): `src/api/dashboard.py`

### Agent Workflow

- [LangGraph Runner](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/graph.py): `src/orchestration/graph.py`
- [Workflow State](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/state.py): `src/orchestration/state.py`
- [Intent Router](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/router_agent.py): `src/agents/router_agent.py`

### Support Domains

- [Knowledge Agent](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/knowledge_agent.py): `src/agents/knowledge_agent.py`
- [Support Agent](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/support_agent.py): `src/agents/support_agent.py`
- [Escalation Agent](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/escalation_agent.py): `src/agents/escalation_agent.py`
- [Response Synthesis](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/agents/personality_agent.py): `src/agents/personality_agent.py`
- [Knowledge Tools](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/tools/knowledge_tools.py): `src/tools/knowledge_tools.py`
- [Merchant Tools](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/tools/support_tools.py): `src/tools/support_tools.py`
- [Handoff Tools](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/tools/escalation_tools.py): `src/tools/escalation_tools.py`

### State and Retrieval

- [Knowledge Ingestion](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/rag/ingest.py): `src/rag/ingest.py`
- [Vector Retrieval](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/rag/vector_store.py): `src/rag/vector_store.py`
- [Session History](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/session_store.py): `src/orchestration/session_store.py`
- [Handoff Persistence](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/orchestration/persistence.py): `src/orchestration/persistence.py`
- [Merchant Ledger](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/data/merchants.json): `data/merchants.json`

### Safety and Operations

- [Input Validation](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/guardrails/validator.py): `src/guardrails/validator.py`
- [Sensitive Data Masking](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/guardrails/redaction.py): `src/guardrails/redaction.py`
- [Tracing and Alerts](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/observability/tracer.py): `src/observability/tracer.py`
- [Structured Logging](https://github.com/felipebebas/getnet-multi-agent-support/blob/main/src/observability/logger.py): `src/observability/logger.py`

### Other components

- **Merchant / Operator**
- **Human Operator**

## Connections

- Merchant / Operator → HTTP Routes: sends request (evidence: `README.md`)
- HTTP Routes → Auth and RBAC: authenticates (evidence: `src/api/routes.py`)
- HTTP Routes → Rate Limits: applies limits (evidence: `README.md`)
- HTTP Routes → LangGraph Runner: runs workflow (evidence: `src/api/routes.py`)
- HTTP Routes → HITL Dashboard: serves dashboard (evidence: `README.md`)
- LangGraph Runner → Workflow State: uses state (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Intent Router: dispatches (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Knowledge Agent: dispatches (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Support Agent: dispatches (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Escalation Agent: dispatches (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Response Synthesis: synthesizes with (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Input Validation: validates input (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Session History: stores turns (evidence: `src/orchestration/graph.py`)
- LangGraph Runner → Handoff Persistence: records handoffs (evidence: `src/orchestration/graph.py`)
- Knowledge Agent → Knowledge Tools: uses tools (evidence: `src/agents/knowledge_agent.py`)
- Knowledge Tools → Vector Retrieval: retrieves chunks (evidence: `src/tools/knowledge_tools.py`)
- Support Agent → Merchant Tools: uses tools (evidence: `src/agents/support_agent.py`)
- Merchant Tools → Merchant Ledger: reads merchant data (evidence: `src/tools/support_tools.py`)
- Merchant Tools → Handoff Persistence: manages tickets (evidence: `src/tools/support_tools.py`)
- Escalation Agent → Handoff Tools: uses tools (evidence: `src/agents/escalation_agent.py`)
- Escalation Agent → Merchant Tools: manages tickets (evidence: `src/agents/escalation_agent.py`)
- Human Operator → HITL Dashboard: reviews handoffs (evidence: `README.md`)
- HITL Dashboard → HTTP Routes: resumes workflow (evidence: `README.md`)
- Knowledge Ingestion → Vector Retrieval: indexes knowledge (evidence: `README.md`)
- LangGraph Runner → Sensitive Data Masking: sanitizes output (evidence: `README.md`)
- LangGraph Runner → Tracing and Alerts: records execution (evidence: `src/orchestration/graph.py`)
- Tracing and Alerts → Structured Logging: emits events (evidence: `src/observability/tracer.py`)
- HTTP Routes → Sensitive Data Masking: sanitizes responses (evidence: `README.md`)
