# victor-hugos/agente-de-atendimento-a architecture

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

- Interactive diagram: https://gitdiagram.com/victor-hugos/agente-de-atendimento-a
- Repository: https://github.com/victor-hugos/agente-de-atendimento-a

## Overview

ARISE is a prototype conversational booking agent for an automotive-care business. In the demonstrated terminal workflow, a customer message enters through the CLI, the agent builds context from the prompt, service data, and session, then asks OpenAI for a reply and may invoke tools to update a booking or record a human handoff. Session state remains in memory; each exchange is costed and logged. The README also describes a server and owner panel, but the tree contains no panel implementation or server conversation routes, so those links are not inferred.

Main entry points: [`src/agent.ts`](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/agent.ts) (Conversation agent), [`src/cli.ts`](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/cli.ts) (Terminal chat), [`src/config.ts`](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/config.ts) (Runtime configuration), [`src/session.ts`](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/session.ts) (Conversation and order state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_channels["Entry channels"]
  node_terminal["Terminal chat<br/>[cli.ts]"]
  node_server["HTTP server<br/>[server.ts]"]
end

subgraph group_conversation["Conversation runtime"]
  node_agent["Conversation agent<br/>[agent.ts]"]
  node_prompt["Agent instructions<br/>[system.md]"]
  node_service_data["Service knowledge<br/>[arise.json]"]
end

subgraph group_booking["Booking workflow"]
  node_tools["Agent tools<br/>[tools.ts]"]
  node_session[("Conversation and order state<br/>[session.ts]")]
end

subgraph group_operations["Usage and operations"]
  node_config["Runtime configuration<br/>[config.ts]"]
  node_logger["Costing and conversation log<br/>[logger.ts]"]
end

node_customer(("Customer"))
node_http_client(("Health client"))
node_openai["OpenAI API"]

node_customer -->|"enters messages"| node_terminal
node_terminal -->|"sends messages"| node_agent
node_terminal -->|"reads and resets"| node_session
node_agent -->|"gets session"| node_session
node_agent -->|"loads instructions"| node_prompt
node_agent -->|"loads service data"| node_service_data
node_agent -->|"requests completions"| node_openai
node_agent -->|"executes tool calls"| node_tools
node_tools -->|"updates order and handoff"| node_session
node_agent -->|"logs exchange"| node_logger
node_logger -->|"reads pricing"| node_config
node_terminal -->|"reads settings"| node_config
node_agent -->|"reads model settings"| node_config
node_server -->|"reads server settings"| node_config
node_http_client -->|"checks health"| node_server

click node_terminal "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/cli.ts"
click node_server "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/server.ts"
click node_agent "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/agent.ts"
click node_prompt "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/prompts/system.md"
click node_service_data "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/data/arise.json"
click node_tools "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/tools.ts"
click node_session "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/session.ts"
click node_config "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/config.ts"
click node_logger "https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/logger.ts"

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_terminal,node_server,node_http_client toneBlue
class node_agent,node_prompt,node_service_data toneAmber
class node_tools,node_session,node_openai toneMint
class node_config,node_logger toneRose
class node_customer toneIndigo
```

## Components

### Entry channels

- [Terminal chat](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/cli.ts): `src/cli.ts`
- [HTTP server](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/server.ts): `src/server.ts`

### Conversation runtime

- [Conversation agent](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/agent.ts): `src/agent.ts`
- [Agent instructions](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/prompts/system.md): `prompts/system.md`
- [Service knowledge](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/data/arise.json): `data/arise.json`

### Booking workflow

- [Agent tools](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/tools.ts): `src/tools.ts`
- [Conversation and order state](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/session.ts): `src/session.ts`

### Usage and operations

- [Runtime configuration](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/config.ts): `src/config.ts`
- [Costing and conversation log](https://github.com/victor-hugos/agente-de-atendimento-a/blob/claude/new-session-4avcn4/src/logger.ts): `src/logger.ts`

### Other components

- **Customer**
- **Health client**
- **OpenAI API**

## Connections

- Customer → Terminal chat: enters messages (evidence: `README.md`)
- Terminal chat → Conversation agent: sends messages (evidence: `src/cli.ts`)
- Terminal chat → Conversation and order state: reads and resets (evidence: `src/cli.ts`)
- Conversation agent → Conversation and order state: gets session (evidence: `src/agent.ts`)
- Conversation agent → Agent instructions: loads instructions (evidence: `src/agent.ts`)
- Conversation agent → Service knowledge: loads service data (evidence: `src/agent.ts`)
- Conversation agent → OpenAI API: requests completions (evidence: `src/agent.ts`)
- Conversation agent → Agent tools: executes tool calls (evidence: `src/agent.ts`)
- Agent tools → Conversation and order state: updates order and handoff (evidence: `src/tools.ts`)
- Conversation agent → Costing and conversation log: logs exchange (evidence: `src/agent.ts`)
- Costing and conversation log → Runtime configuration: reads pricing (evidence: `src/logger.ts`)
- Terminal chat → Runtime configuration: reads settings (evidence: `src/cli.ts`)
- Conversation agent → Runtime configuration: reads model settings (evidence: `src/agent.ts`)
- HTTP server → Runtime configuration: reads server settings (evidence: `src/server.ts`)
- Health client → HTTP server: checks health (evidence: `README.md`)
