# harish14-hub/open-air architecture

> Architecture diagram of the GitHub repository harish14-hub/open-air, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harish14-hub/open-air
- Repository: https://github.com/harish14-hub/open-air

## Overview

Open Air provides Telegram-driven browser and file-manager agents, plus a separate local CLI browser agent that uses Ollama to classify commands. The main workflows are command intake, routing or classification, local browser/file operations, and replies or results. The README also advertises remote desktop control and broader AI workflows, but the sampled code does not show their implementation, so they are not represented as implemented components.

Main entry points: [`telegram_agent.py`](https://github.com/harish14-hub/open-air/blob/main/telegram_agent.py) (Telegram browser agent), [`main.py`](https://github.com/harish14-hub/open-air/blob/main/main.py) (Local AI browser agent), [`telegram_file_manager.py`](https://github.com/harish14-hub/open-air/blob/main/telegram_file_manager.py) (File manager bot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser_agent["Browser agents"]
  node_telegram_browser_agent["Telegram browser agent<br/>[telegram_agent.py]"]
  node_local_browser_agent["Local AI browser agent<br/>[main.py]"]
end

subgraph group_file_manager["File manager"]
  node_file_bot["File manager bot"]
  node_folder_navigation["Folder navigation"]
  node_file_download["File download"]
end

subgraph group_external_services["External services"]
  node_telegram_api["Telegram Bot API"]
  node_ollama["Ollama Phi3"]
  node_playwright_browser["Chromium via Playwright"]
  node_websites["Websites and search"]
  node_local_files[("Local filesystem")]
end

node_telegram_user(("Telegram user"))
node_cli_user(("CLI user"))

node_telegram_user -->|"sends commands"| node_telegram_api
node_telegram_api -->|"delivers updates"| node_telegram_browser_agent
node_telegram_browser_agent -->|"drives browser"| node_playwright_browser
node_telegram_browser_agent -->|"opens and searches"| node_websites
node_telegram_browser_agent -->|"sends replies"| node_telegram_api
node_cli_user -->|"enters tasks"| node_local_browser_agent
node_local_browser_agent -->|"classifies commands"| node_ollama
node_local_browser_agent -->|"drives browser"| node_playwright_browser
node_local_browser_agent -->|"opens and searches"| node_websites
node_telegram_user -->|"sends file commands"| node_telegram_api
node_telegram_api -->|"delivers messages"| node_file_bot
node_file_bot -->|"routes folder actions"| node_folder_navigation
node_file_bot -->|"routes file actions"| node_file_download
node_folder_navigation -->|"lists folders"| node_local_files
node_folder_navigation -->|"sends folder menus"| node_telegram_api
node_file_download -->|"reads selected file"| node_local_files
node_file_download -->|"sends document"| node_telegram_api

click node_telegram_browser_agent "https://github.com/harish14-hub/open-air/blob/main/telegram_agent.py"
click node_local_browser_agent "https://github.com/harish14-hub/open-air/blob/main/main.py"
click node_file_bot "https://github.com/harish14-hub/open-air/blob/main/telegram_file_manager.py"
click node_folder_navigation "https://github.com/harish14-hub/open-air/blob/main/telegram_file_manager.py"
click node_file_download "https://github.com/harish14-hub/open-air/blob/main/telegram_file_manager.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_telegram_browser_agent,node_local_browser_agent,node_telegram_user,node_cli_user toneBlue
class node_file_bot,node_folder_navigation,node_file_download toneAmber
class node_telegram_api,node_ollama,node_playwright_browser,node_websites,node_local_files toneMint
```

## Components

### Browser agents

- [Telegram browser agent](https://github.com/harish14-hub/open-air/blob/main/telegram_agent.py): `telegram_agent.py`
- [Local AI browser agent](https://github.com/harish14-hub/open-air/blob/main/main.py): `main.py`

### File manager

- [File manager bot](https://github.com/harish14-hub/open-air/blob/main/telegram_file_manager.py): `telegram_file_manager.py`
- [Folder navigation](https://github.com/harish14-hub/open-air/blob/main/telegram_file_manager.py): `telegram_file_manager.py`
- [File download](https://github.com/harish14-hub/open-air/blob/main/telegram_file_manager.py): `telegram_file_manager.py`

### External services

- **Telegram Bot API**
- **Ollama Phi3**
- **Chromium via Playwright**
- **Websites and search**
- **Local filesystem**

### Other components

- **Telegram user**
- **CLI user**

## Connections

- Telegram user → Telegram Bot API: sends commands (evidence: `README.md`)
- Telegram Bot API → Telegram browser agent: delivers updates (evidence: `telegram_agent.py`)
- Telegram browser agent → Chromium via Playwright: drives browser (evidence: `telegram_agent.py`)
- Telegram browser agent → Websites and search: opens and searches (evidence: `telegram_agent.py`)
- Telegram browser agent → Telegram Bot API: sends replies (evidence: `telegram_agent.py`)
- CLI user → Local AI browser agent: enters tasks (evidence: `main.py`)
- Local AI browser agent → Ollama Phi3: classifies commands (evidence: `main.py`)
- Local AI browser agent → Chromium via Playwright: drives browser (evidence: `main.py`)
- Local AI browser agent → Websites and search: opens and searches (evidence: `main.py`)
- Telegram user → Telegram Bot API: sends file commands (evidence: `README.md`)
- Telegram Bot API → File manager bot: delivers messages (evidence: `telegram_file_manager.py`)
- File manager bot → Folder navigation: routes folder actions (evidence: `telegram_file_manager.py`)
- File manager bot → File download: routes file actions (evidence: `telegram_file_manager.py`)
- Folder navigation → Local filesystem: lists folders (evidence: `telegram_file_manager.py`)
- Folder navigation → Telegram Bot API: sends folder menus (evidence: `telegram_file_manager.py`)
- File download → Local filesystem: reads selected file (evidence: `telegram_file_manager.py`)
- File download → Telegram Bot API: sends document (evidence: `telegram_file_manager.py`)
