# luffyyeet/agentic-interaction-ws2627 architecture

> Architecture diagram of the GitHub repository luffyyeet/agentic-interaction-ws2627, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/luffyyeet/agentic-interaction-ws2627
- Repository: https://github.com/luffyyeet/agentic-interaction-ws2627

## Overview

This is a command-line day and travel planning agent. A user submits a question; the entry point loads configuration and starts logging, then the agent consults a model that may request calendar, weather, or train lookups. Tool results return to the model, which produces the final answer for the CLI. The tools also read home-city context and use a shared HTTP fetch helper. The README documents the service capabilities and behavior; the graph keeps those stages distinct while grouping implementations that share a source file.

Main entry points: [`agent/agent.py`](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/agent.py) (Agent loop), [`agent/__main__.py`](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/__main__.py) (Command entry), [`agent/tools.py`](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py) (HTTP fetch), [`agent/runlog.py`](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/runlog.py) (Run log)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["User interface"]
  node_cli["Command entry<br/>[__main__.py]"]
end

subgraph group_loop["Agent orchestration"]
  node_agent["Agent loop<br/>[agent.py]"]
end

subgraph group_lookups["Planning lookups"]
  node_home["Home context<br/>[tools.py]"]
  node_calendar["Calendar lookup<br/>[tools.py]"]
  node_weather["Weather lookup<br/>[tools.py]"]
  node_trains["Train lookup<br/>[tools.py]"]
  node_fetch["HTTP fetch<br/>[tools.py]"]
end

subgraph group_support["Runtime support"]
  node_config["Configuration<br/>[config.py]"]
  node_runlog[("Run log<br/>[runlog.py]")]
end

node_user(("User"))
node_model["Language model"]
node_data["Planning data service"]

node_user -->|"asks"| node_cli
node_cli -->|"loads"| node_config
node_cli -->|"creates"| node_runlog
node_cli -->|"submits question"| node_agent
node_agent -->|"sends prompt"| node_model
node_model -->|"returns tool requests"| node_agent
node_agent -->|"reads context"| node_home
node_agent -->|"dispatches"| node_calendar
node_agent -->|"dispatches"| node_weather
node_agent -->|"dispatches"| node_trains
node_home -->|"uses"| node_fetch
node_calendar -->|"uses"| node_fetch
node_weather -->|"uses"| node_fetch
node_trains -->|"uses"| node_fetch
node_fetch -->|"GETs data"| node_data
node_agent -->|"writes events"| node_runlog
node_agent -->|"returns answer"| node_cli

click node_cli "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/__main__.py"
click node_agent "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/agent.py"
click node_config "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/config.py"
click node_runlog "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/runlog.py"
click node_home "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py"
click node_calendar "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py"
click node_weather "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py"
click node_trains "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py"
click node_fetch "https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.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_cli,node_user toneBlue
class node_agent toneAmber
class node_home,node_calendar,node_weather,node_trains,node_fetch toneMint
class node_config,node_runlog toneRose
class node_model,node_data toneIndigo
```

## Components

### User interface

- [Command entry](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/__main__.py): `agent/__main__.py`

### Agent orchestration

- [Agent loop](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/agent.py): `agent/agent.py`

### Planning lookups

- [Home context](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py): `agent/tools.py`
- [Calendar lookup](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py): `agent/tools.py`
- [Weather lookup](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py): `agent/tools.py`
- [Train lookup](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py): `agent/tools.py`
- [HTTP fetch](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/tools.py): `agent/tools.py`

### Runtime support

- [Configuration](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/config.py): `agent/config.py`
- [Run log](https://github.com/luffyyeet/agentic-interaction-ws2627/blob/main/agent/runlog.py): `agent/runlog.py`

### Other components

- **User**
- **Language model**
- **Planning data service**

## Connections

- User → Command entry: asks (evidence: `README.md`)
- Command entry → Configuration: loads (evidence: `agent/__main__.py`)
- Command entry → Run log: creates (evidence: `agent/__main__.py`)
- Command entry → Agent loop: submits question (evidence: `agent/__main__.py`)
- Agent loop → Language model: sends prompt (evidence: `agent/agent.py`)
- Language model → Agent loop: returns tool requests (evidence: `agent/agent.py`)
- Agent loop → Home context: reads context (evidence: `agent/agent.py`)
- Agent loop → Calendar lookup: dispatches (evidence: `agent/agent.py`)
- Agent loop → Weather lookup: dispatches (evidence: `agent/agent.py`)
- Agent loop → Train lookup: dispatches (evidence: `agent/agent.py`)
- Home context → HTTP fetch: uses (evidence: `agent/tools.py`)
- Calendar lookup → HTTP fetch: uses (evidence: `agent/tools.py`)
- Weather lookup → HTTP fetch: uses (evidence: `agent/tools.py`)
- Train lookup → HTTP fetch: uses (evidence: `agent/tools.py`)
- HTTP fetch → Planning data service: GETs data (evidence: `agent/tools.py`)
- Agent loop → Run log: writes events (evidence: `agent/agent.py`)
- Agent loop → Command entry: returns answer (evidence: `agent/__main__.py`)
