# ganganidhanush-maker/pacific architecture

> Architecture diagram of the GitHub repository ganganidhanush-maker/pacific, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ganganidhanush-maker/pacific
- Repository: https://github.com/ganganidhanush-maker/pacific

## Overview

Octopus AI is a teacher- and student-facing desktop assistant whose main workflow accepts a chat or voice request, routes it through a master agent, and returns a response or carries out an automation. The README documents five agent roles and web, desktop, research, and tutoring capabilities. The sampled server code shows agent dispatch, browser setup, and research/chatbot calls; the README supports the broader agent map. Some subsystem wiring is therefore shown only where documented, and uncertain links are omitted.

Main entry points: [`octopus_ai/server/app.py`](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/app.py) (FastAPI Backend), [`octopus_ai/agent/orchestrator.py`](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/orchestrator.py) (Master Orchestrator), [`octopus_ai/server/local_llm_service.py`](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/local_llm_service.py) (Local LLM Service), [`octopus_ai/agent/subagents/desktop_agent.py`](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/desktop_agent.py) (Desktop Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User Interaction"]
  node_desktop_ui["Desktop UI<br/>[desktop_app.py]"]
  node_chat_ui["Chat Interface<br/>[chat.py]"]
  node_api["FastAPI Backend<br/>[app.py]"]
end

subgraph group_agents["Agent Reasoning"]
  node_orchestrator["Master Orchestrator<br/>[orchestrator.py]"]
  node_web_agent["Web Agent<br/>[web_agent.py]"]
  node_desktop_agent["Desktop Agent<br/>[desktop_agent.py]"]
  node_research_agent["Research Agent<br/>[research_agent.py]"]
  node_chatbot_agent["Chatbot Agent<br/>[chatbot_agent.py]"]
end

subgraph group_execution["Task Execution"]
  node_browser_tasks["Web Automations"]
  node_desktop_tasks["Desktop Tasks<br/>[system_task.py]"]
  node_computer_agent["Computer Use<br/>[computer_agent.py]"]
  node_computer_router["Action Router<br/>[router.py]"]
  node_windows_adapter["Windows Adapter"]
  node_clacky_adapter["Clacky Adapter<br/>[clacky_adapter.py]"]
  node_browser_engine["Browser Engine<br/>[selenium_engine.py]"]
end

subgraph group_services["State And Services"]
  node_preview["Execution Preview<br/>[preview_manager.py]"]
  node_local_llm["Local LLM Service"]
  node_kimi["Kimi Provider<br/>[kimi_llm.py]"]
  node_groq["Groq Provider<br/>[groq_llm.py]"]
  node_memory[("Persistent Memory")]
  node_voice["Voice Service<br/>[voice_service.py]"]
end

node_user(("Student Or Teacher"))

node_user -->|"submits request"| node_desktop_ui
node_user -->|"submits request"| node_chat_ui
node_desktop_ui -->|"sends requests"| node_api
node_chat_ui -->|"sends requests"| node_api
node_api -->|"routes tasks"| node_orchestrator
node_orchestrator -->|"dispatches"| node_web_agent
node_orchestrator -->|"dispatches"| node_desktop_agent
node_orchestrator -->|"dispatches"| node_research_agent
node_orchestrator -->|"dispatches"| node_chatbot_agent
node_api -->|"calls research"| node_research_agent
node_api -->|"calls chat"| node_chatbot_agent
node_web_agent -->|"runs web tasks"| node_browser_tasks
node_browser_tasks -->|"controls browser"| node_browser_engine
node_api -->|"initializes"| node_browser_engine
node_desktop_agent -->|"runs desktop tasks"| node_desktop_tasks
node_desktop_agent -->|"uses computer"| node_computer_agent
node_computer_agent -->|"executes actions"| node_computer_router
node_computer_router -->|"controls Windows"| node_windows_adapter
node_computer_router -->|"uses companion"| node_clacky_adapter
node_api -->|"sets browser driver"| node_preview
node_local_llm -->|"queries knowledge"| node_memory
node_local_llm -.->|"tries provider"| node_kimi
node_local_llm -.->|"tries provider"| node_groq
node_api -->|"generates speech"| node_voice

click node_desktop_ui "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/interface/desktop_app.py"
click node_chat_ui "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/interface/chat.py"
click node_api "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/app.py"
click node_orchestrator "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/orchestrator.py"
click node_web_agent "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/web_agent.py"
click node_desktop_agent "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/desktop_agent.py"
click node_research_agent "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/research_agent.py"
click node_chatbot_agent "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/chatbot_agent.py"
click node_browser_tasks "https://github.com/ganganidhanush-maker/pacific/tree/main/octopus_ai/automations/web"
click node_desktop_tasks "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/automations/desktop/system_task.py"
click node_computer_agent "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/computer_agent.py"
click node_computer_router "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/router.py"
click node_windows_adapter "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/adapters/windows_use_adapter.py"
click node_clacky_adapter "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/adapters/clacky_adapter.py"
click node_browser_engine "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/engine/selenium_engine.py"
click node_preview "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/automations/preview/preview_manager.py"
click node_local_llm "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/local_llm_service.py"
click node_kimi "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/kimi_llm.py"
click node_groq "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/groq_llm.py"
click node_memory "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/memory/persistent_memory.py"
click node_voice "https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/voice_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_desktop_ui,node_chat_ui,node_api toneBlue
class node_orchestrator,node_web_agent,node_desktop_agent,node_research_agent,node_chatbot_agent toneAmber
class node_browser_tasks,node_desktop_tasks,node_computer_agent,node_computer_router,node_windows_adapter,node_clacky_adapter,node_browser_engine toneMint
class node_preview,node_local_llm,node_kimi,node_groq,node_memory,node_voice toneRose
class node_user toneIndigo
```

## Components

### User Interaction

- [Desktop UI](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/interface/desktop_app.py): `octopus_ai/interface/desktop_app.py`
- [Chat Interface](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/interface/chat.py): `octopus_ai/interface/chat.py`
- [FastAPI Backend](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/app.py): `octopus_ai/server/app.py`

### Agent Reasoning

- [Master Orchestrator](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/orchestrator.py): `octopus_ai/agent/orchestrator.py`
- [Web Agent](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/web_agent.py): `octopus_ai/agent/subagents/web_agent.py`
- [Desktop Agent](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/desktop_agent.py): `octopus_ai/agent/subagents/desktop_agent.py`
- [Research Agent](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/research_agent.py): `octopus_ai/agent/subagents/research_agent.py`
- [Chatbot Agent](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/subagents/chatbot_agent.py): `octopus_ai/agent/subagents/chatbot_agent.py`

### Task Execution

- [Web Automations](https://github.com/ganganidhanush-maker/pacific/tree/main/octopus_ai/automations/web): `octopus_ai/automations/web`
- [Desktop Tasks](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/automations/desktop/system_task.py): `octopus_ai/automations/desktop/system_task.py`
- [Computer Use](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/computer_agent.py): `octopus_ai/computer_use/computer_agent.py`
- [Action Router](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/router.py): `octopus_ai/computer_use/router.py`
- [Windows Adapter](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/adapters/windows_use_adapter.py): `octopus_ai/computer_use/adapters/windows_use_adapter.py`
- [Clacky Adapter](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/computer_use/adapters/clacky_adapter.py): `octopus_ai/computer_use/adapters/clacky_adapter.py`
- [Browser Engine](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/engine/selenium_engine.py): `octopus_ai/engine/selenium_engine.py`

### State And Services

- [Execution Preview](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/automations/preview/preview_manager.py): `octopus_ai/automations/preview/preview_manager.py`
- [Local LLM Service](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/local_llm_service.py): `octopus_ai/server/local_llm_service.py`
- [Kimi Provider](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/kimi_llm.py): `octopus_ai/agent/kimi_llm.py`
- [Groq Provider](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/agent/groq_llm.py): `octopus_ai/agent/groq_llm.py`
- [Persistent Memory](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/memory/persistent_memory.py): `octopus_ai/memory/persistent_memory.py`
- [Voice Service](https://github.com/ganganidhanush-maker/pacific/blob/main/octopus_ai/server/voice_service.py): `octopus_ai/server/voice_service.py`

### Other components

- **Student Or Teacher**

## Connections

- Student Or Teacher → Desktop UI: submits request
- Student Or Teacher → Chat Interface: submits request
- Desktop UI → FastAPI Backend: sends requests
- Chat Interface → FastAPI Backend: sends requests
- FastAPI Backend → Master Orchestrator: routes tasks
- Master Orchestrator → Web Agent: dispatches
- Master Orchestrator → Desktop Agent: dispatches
- Master Orchestrator → Research Agent: dispatches
- Master Orchestrator → Chatbot Agent: dispatches
- FastAPI Backend → Research Agent: calls research
- FastAPI Backend → Chatbot Agent: calls chat
- Web Agent → Web Automations: runs web tasks
- Web Automations → Browser Engine: controls browser
- FastAPI Backend → Browser Engine: initializes
- Desktop Agent → Desktop Tasks: runs desktop tasks
- Desktop Agent → Computer Use: uses computer
- Computer Use → Action Router: executes actions
- Action Router → Windows Adapter: controls Windows
- Action Router → Clacky Adapter: uses companion
- FastAPI Backend → Execution Preview: sets browser driver
- Local LLM Service → Persistent Memory: queries knowledge
- Local LLM Service → Kimi Provider: tries provider
- Local LLM Service → Groq Provider: tries provider
- FastAPI Backend → Voice Service: generates speech
