# handerlr/projeto-final-agente-ia architecture

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

- Interactive diagram: https://gitdiagram.com/handerlr/projeto-final-agente-ia
- Repository: https://github.com/handerlr/projeto-final-agente-ia

## Overview

This is a small command-line assistant for booking a vehicle inspection. It shows available times, asks for a customer message, uses Ollama to extract a requested time, checks availability, and prompts for human confirmation before appending a confirmed booking to a text file. All runtime behavior is in agente.py; the excerpts do not show further modules.

Main entry points: [`agente.py`](https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py) (Booking workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking assistant"]
  node_agent["Booking workflow<br/>[agente.py]"]
  node_availability["Available times<br/>[agente.py]"]
  node_extract["Time extraction<br/>[agente.py]"]
  node_normalize["Time normalization<br/>[agente.py]"]
  node_confirm["Human confirmation<br/>[agente.py]"]
  node_records[("Booking records")]
end

node_customer(("Customer"))
node_ollama["Ollama model"]

node_customer -->|"enters request"| node_agent
node_agent -->|"gets times"| node_availability
node_agent -->|"submits message"| node_extract
node_extract -->|"requests extraction"| node_ollama
node_extract -->|"normalizes response"| node_normalize
node_agent -->|"requests approval"| node_confirm
node_confirm -->|"appends booking"| node_records

click node_agent "https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py"
click node_availability "https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py"
click node_extract "https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py"
click node_normalize "https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py"
click node_confirm "https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.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_agent,node_availability,node_extract,node_normalize,node_confirm,node_records toneBlue
class node_customer,node_ollama toneIndigo
```

## Components

### Booking assistant

- [Booking workflow](https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py): `agente.py`
- [Available times](https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py): `agente.py`
- [Time extraction](https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py): `agente.py`
- [Time normalization](https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py): `agente.py`
- [Human confirmation](https://github.com/handerlr/projeto-final-agente-ia/blob/main/agente.py): `agente.py`
- **Booking records**

### Other components

- **Customer**
- **Ollama model**

## Connections

- Customer → Booking workflow: enters request (evidence: `agente.py`)
- Booking workflow → Available times: gets times (evidence: `agente.py`)
- Booking workflow → Time extraction: submits message (evidence: `agente.py`)
- Time extraction → Ollama model: requests extraction (evidence: `agente.py`)
- Time extraction → Time normalization: normalizes response (evidence: `agente.py`)
- Booking workflow → Human confirmation: requests approval (evidence: `agente.py`)
- Human confirmation → Booking records: appends booking (evidence: `agente.py`)
