# vishnudurairaj/personal-assistant architecture

> Architecture diagram of the GitHub repository vishnudurairaj/personal-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vishnudurairaj/personal-assistant
- Repository: https://github.com/vishnudurairaj/personal-assistant

## Overview

##### Project type and purpose
- Type: Full-stack, microservice-style AI assistant
- Purpose: “Kavish” is a personal AI assistant that stores/retrieves user data (with metadata), executes Python code in a Jupyter environment, and exposes a conversational UI.

##### File structure
- Top-level
- Dockerfile & docker-compose.yaml: container definitions and orchestration
- assistant.py & chainlit.md: entry point for the chat UI (Chainlit)
- requirements.txt: Python dependencies for the main service
- prompts/: system prompts used by the agent
- work.ipynb: example notebook for stateful code execution
- core/
- agent.py, helper modules, memory.py, models.py: orchestrator and business logic
- tools/: individual “skill” modules (FileOperations, JupyterTool, PythonTool, ScrapeWebsiteTool, TerminalTool, AgenticTools)
- utils/email_service.py: external email integration
- vectorestores.py & vission_models.py: memory persistence & vision model wrappers
- services/
- Dedicated Dockerfile & requirements.txt: spun up via docker-compose to host the Jupyter execution environment

##### README for additional insights
- Describes CRUD operations on a vector-backed memory store
- Describes remote code execution via Jupyter
- Instructs to use Docker Compose to launch both the chat UI service and the notebook service

## Diagram (Mermaid)

```mermaid
flowchart TB
    User["User"]:::external

    subgraph "Docker Compose Network"
        subgraph "Chat UI Container"
            ChatUI["Chat UI Service"]:::service
            click ChatUI "https://github.com/vishnudurairaj/personal-assistant/blob/main/assistant.py"
            AgentCore["Agent Core"]:::service
            click AgentCore "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/agent.py"
            MemoryStore["Vector Store"]:::datastore
            click MemoryStore "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/vectorestores.py"
            VisionModel["Vision Model Wrapper"]:::service
            click VisionModel "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/vission_models.py"
            subgraph "Tool Modules"
                AgenticTools["AgenticTools"]:::tools
                click AgenticTools "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/tools/AgenticTools.py"
                FileOps["FileOperationsTool"]:::tools
                click FileOps "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/tools/FileOperationsTool.py"
                JupyterTool["JupyterTool"]:::tools
                click JupyterTool "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/tools/JupyterTool.py"
                PythonTool["PythonTool"]:::tools
                click PythonTool "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/tools/PythonTool.py"
                ScrapeTool["ScrapeWebsiteTool"]:::tools
                click ScrapeTool "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/tools/ScrapeWebsiteTool.py"
                TerminalTool["TerminalTool"]:::tools
                click TerminalTool "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/tools/TerminalTool.py"
            end
            EmailService["Email Service"]:::external
            click EmailService "https://github.com/vishnudurairaj/personal-assistant/blob/main/core/utils/email_service.py"
            Prompts["System Prompts"]:::datastore
            click Prompts "https://github.com/vishnudurairaj/personal-assistant/blob/main/prompts/system_prompt.md"
            DepsMain["Main Dependencies"]:::service
            click DepsMain "https://github.com/vishnudurairaj/personal-assistant/blob/main/requirements.txt"
            ExternalWeb["Web Scraping Targets"]:::external
            FileSystem["File System"]:::external
        end
        subgraph "Jupyter Execution Container"
            JupyterService["Jupyter Execution Service"]:::service
            click JupyterService "https://github.com/vishnudurairaj/personal-assistant/tree/main/services/Dockerfile"
            DepsJupyter["Jupyter Dependencies"]:::service
            click DepsJupyter "https://github.com/vishnudurairaj/personal-assistant/blob/main/services/requirements.txt"
        end
    end

    Notebook["Example Notebook"]:::service
    click Notebook "https://github.com/vishnudurairaj/personal-assistant/blob/main/work.ipynb"

    User -->|HTTP/WebSocket| ChatUI
    ChatUI -->|Invokes| AgentCore
    AgentCore -->|Read/Write| MemoryStore
    AgentCore -->|Loads| Prompts
    AgentCore -->|Invokes| AgenticTools
    AgentCore -->|Invokes| FileOps
    AgentCore -->|Invokes| JupyterTool
    AgentCore -->|Invokes| PythonTool
    AgentCore -->|Invokes| ScrapeTool
    AgentCore -->|Invokes| TerminalTool
    AgentCore -->|Uses| EmailService

    FileOps -->|Disk I/O| FileSystem
    ScrapeTool -->|Scrape| ExternalWeb
    JupyterTool -->|RPC/HTTP| JupyterService
    PythonTool -->|RPC/HTTP| JupyterService
    JupyterService -->|Executes| Notebook

    classDef service fill:#cce5ff,stroke:#5fa2dd,color:#000;
    classDef datastore fill:#d4edda,stroke:#3c763d,color:#000;
    classDef external fill:#f8d7da,stroke:#a94442,color:#000;
    classDef tools fill:#e2d5f7,stroke:#8a6bb3,color:#000;
```
