# hamna-munir/07-ai-meeting-agent architecture

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

- Interactive diagram: https://gitdiagram.com/hamna-munir/07-ai-meeting-agent
- Repository: https://github.com/hamna-munir/07-ai-meeting-agent

## Overview

AI Meeting Agent is a local Streamlit app that turns a natural-language request into a human-approved Google Calendar booking. The main flow collects missing details, extracts and validates meeting constraints, finds genuinely free slots, presents choices, asks for explicit confirmation, then creates the event. The graph preserves the parser, scheduling, safety, and calendar-integration layers. Relationships are based on the excerpts, SOURCE INDEX references, and README; unsampled implementation details are not inferred.

Main entry points: [`src/agent.py`](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/agent.py) (Meeting agent), [`src/meeting_parser.py`](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/meeting_parser.py) (Request parser), [`src/calendar_service.py`](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/calendar_service.py) (Calendar service), [`src/app.py`](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/app.py) (Streamlit UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Streamlit UI<br/>[app.py]"]
end

subgraph group_orchestration["Agent orchestration"]
  node_agent["Meeting agent<br/>[agent.py]"]
  node_safety["Approval guards<br/>[safety.py]"]
  node_config["Runtime config<br/>[config.py]"]
end

subgraph group_understanding["Request understanding"]
  node_parser["Request parser<br/>[meeting_parser.py]"]
  node_prompts["Prompt templates<br/>[prompts.py]"]
end

subgraph group_calendar["Calendar scheduling"]
  node_scheduler["Slot orchestration<br/>[scheduler.py]"]
  node_tools["Availability tools<br/>[calendar_tools.py]"]
  node_calendar_service["Calendar service"]
end

node_user(("User"))
node_llm(("LLM service"))
node_google_calendar[("Google Calendar")]

node_user -->|"submits request"| node_app
node_app -->|"forwards messages"| node_agent
node_agent -->|"extracts details"| node_parser
node_parser -->|"uses extraction prompt"| node_prompts
node_parser -->|"requests extraction"| node_llm
node_agent -->|"formats responses"| node_prompts
node_agent -->|"requests slot options"| node_scheduler
node_scheduler -->|"finds available slots"| node_tools
node_tools -->|"reads calendar events"| node_calendar_service
node_agent -->|"checks approval"| node_safety
node_agent -->|"creates approved event"| node_calendar_service
node_calendar_service -->|"reads and writes events"| node_google_calendar

click node_app "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/app.py"
click node_agent "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/agent.py"
click node_safety "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/safety.py"
click node_config "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/config.py"
click node_parser "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/meeting_parser.py"
click node_prompts "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/prompts.py"
click node_scheduler "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/scheduler.py"
click node_tools "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/calendar_tools.py"
click node_calendar_service "https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/calendar_service.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_app,node_user toneBlue
class node_agent,node_safety,node_config,node_google_calendar toneAmber
class node_parser,node_prompts toneMint
class node_scheduler,node_tools,node_calendar_service toneRose
class node_llm toneIndigo
```

## Components

### User interface

- [Streamlit UI](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/app.py): `src/app.py`

### Agent orchestration

- [Meeting agent](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/agent.py): `src/agent.py`
- [Approval guards](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/safety.py): `src/safety.py`
- [Runtime config](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/config.py): `src/config.py`

### Request understanding

- [Request parser](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/meeting_parser.py): `src/meeting_parser.py`
- [Prompt templates](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/prompts.py): `src/prompts.py`

### Calendar scheduling

- [Slot orchestration](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/scheduler.py): `src/scheduler.py`
- [Availability tools](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/calendar_tools.py): `src/calendar_tools.py`
- [Calendar service](https://github.com/hamna-munir/07-ai-meeting-agent/blob/main/src/calendar_service.py): `src/calendar_service.py`

### Other components

- **User**
- **LLM service**
- **Google Calendar**

## Connections

- User → Streamlit UI: submits request (evidence: `README.md`)
- Streamlit UI → Meeting agent: forwards messages (evidence: `src/app.py`)
- Meeting agent → Request parser: extracts details (evidence: `src/agent.py`)
- Request parser → Prompt templates: uses extraction prompt (evidence: `src/meeting_parser.py`)
- Request parser → LLM service: requests extraction (evidence: `src/meeting_parser.py`)
- Meeting agent → Prompt templates: formats responses (evidence: `src/agent.py`)
- Meeting agent → Slot orchestration: requests slot options (evidence: `src/agent.py`)
- Slot orchestration → Availability tools: finds available slots (evidence: `src/scheduler.py`)
- Availability tools → Calendar service: reads calendar events (evidence: `src/calendar_tools.py`)
- Meeting agent → Approval guards: checks approval (evidence: `src/agent.py`)
- Meeting agent → Calendar service: creates approved event (evidence: `src/agent.py`)
- Calendar service → Google Calendar: reads and writes events (evidence: `src/calendar_service.py`)
