# jd-opensource/joyai-vl-interaction architecture

> Architecture diagram of the GitHub repository jd-opensource/joyai-vl-interaction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jd-opensource/joyai-vl-interaction
- Repository: https://github.com/jd-opensource/joyai-vl-interaction
- Video tour (about a minute): https://gitdiagram.com/jd-opensource/joyai-vl-interaction/video

## Overview

JoyAI-VL-Interaction is an open real-time video-language interaction system. A user streams webcam or RTSP video through the WebUI; frame processing sends images to the VLM, which can respond, stay silent, or delegate work. Speech input/output and background-agent delegation are pluggable capabilities. The repository also includes interaction-data conversion. Some connections below are documented or visible in excerpts; unsampled service wiring is left unverified rather than inferred.

Main entry points: [`services/webui/src/joy_interaction_webui/server.py`](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/server.py) (WebUI server), [`services/webui/src/joy_interaction_webui/video_processor.py`](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/video_processor.py) (Frame processor), [`services/webui/src/joy_interaction_webui/background_model.py`](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/background_model.py) (Delegation manager), [`services/webui/src/joy_interaction_webui/vlm_service.py`](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/vlm_service.py) (VLM service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Live interaction"]
  node_webui["WebUI server<br/>[server.py]"]
  node_video["Frame processor<br/>[video_processor.py]"]
  node_rtsp["RTSP track<br/>[rtsp_track.py]"]
end

subgraph group_inference["Inference and memory"]
  node_vlm["VLM service<br/>[vlm_service.py]"]
  node_live["Live adapter<br/>[live_adapter.py]"]
  node_memory["Memory summarizer"]
  node_model["VLM inference backend"]
end

subgraph group_extensions["Speech and delegation"]
  node_asr["ASR bridge<br/>[asr.py]"]
  node_asr_service["ASR service<br/>[asr_adapter.py]"]
  node_tts["TTS bridge<br/>[tts.py]"]
  node_tts_service["TTS service<br/>[tts_adapter.py]"]
  node_background["Delegation manager"]
  node_agent["Background agent API<br/>[main.py]"]
  node_files["Artifact file server"]
end

subgraph group_data["Open data"]
  node_data["Interaction data<br/>[convert_data.py]"]
end

node_user(("User"))
node_camera(("Camera stream"))

node_user -->|"uses"| node_webui
node_camera -->|"streams video"| node_webui
node_webui -->|"dispatches frames"| node_video
node_webui -->|"starts RTSP"| node_rtsp
node_rtsp -.->|"provides frames"| node_video
node_video -->|"submits frames"| node_vlm
node_video -->|"buffers frames"| node_background
node_vlm -.->|"sends requests"| node_live
node_live -->|"forwards inference"| node_model
node_live -.->|"summarizes history"| node_memory
node_webui -->|"routes speech"| node_asr
node_asr -->|"forwards audio"| node_asr_service
node_webui -->|"routes speech output"| node_tts
node_tts -->|"streams audio"| node_tts_service
node_vlm -.->|"hands off tasks"| node_background
node_background -.->|"delegates questions"| node_agent
node_background -->|"links artifacts"| node_files
node_user -->|"uses released data"| node_data

click node_webui "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/server.py"
click node_video "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/video_processor.py"
click node_rtsp "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/rtsp_track.py"
click node_vlm "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/vlm_service.py"
click node_live "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webinfer/live_adapter.py"
click node_memory "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webinfer/memory_summarizer.py"
click node_asr "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/asr.py"
click node_asr_service "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/asr/asr_adapter.py"
click node_tts "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/tts.py"
click node_tts_service "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/tts/tts_adapter.py"
click node_background "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/background_model.py"
click node_agent "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/background-agent/codex_api/main.py"
click node_files "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/local_file_server.py"
click node_data "https://github.com/jd-opensource/joyai-vl-interaction/blob/main/datasets/convert_data.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_webui,node_video,node_rtsp,node_user toneBlue
class node_vlm,node_live,node_memory,node_model toneAmber
class node_asr,node_asr_service,node_tts,node_tts_service,node_background,node_agent,node_files toneMint
class node_data toneRose
class node_camera toneIndigo
```

## Components

### Live interaction

- [WebUI server](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/server.py): `services/webui/src/joy_interaction_webui/server.py`
- [Frame processor](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/video_processor.py): `services/webui/src/joy_interaction_webui/video_processor.py`
- [RTSP track](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/rtsp_track.py): `services/webui/src/joy_interaction_webui/rtsp_track.py`

### Inference and memory

- [VLM service](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/vlm_service.py): `services/webui/src/joy_interaction_webui/vlm_service.py`
- [Live adapter](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webinfer/live_adapter.py): `services/webinfer/live_adapter.py`
- [Memory summarizer](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webinfer/memory_summarizer.py): `services/webinfer/memory_summarizer.py`
- **VLM inference backend**

### Speech and delegation

- [ASR bridge](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/asr.py): `services/webui/src/joy_interaction_webui/asr.py`
- [ASR service](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/asr/asr_adapter.py): `services/asr/asr_adapter.py`
- [TTS bridge](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/tts.py): `services/webui/src/joy_interaction_webui/tts.py`
- [TTS service](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/tts/tts_adapter.py): `services/tts/tts_adapter.py`
- [Delegation manager](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/background_model.py): `services/webui/src/joy_interaction_webui/background_model.py`
- [Background agent API](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/background-agent/codex_api/main.py): `services/background-agent/codex_api/main.py`
- [Artifact file server](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/services/webui/src/joy_interaction_webui/local_file_server.py): `services/webui/src/joy_interaction_webui/local_file_server.py`

### Open data

- [Interaction data](https://github.com/jd-opensource/joyai-vl-interaction/blob/main/datasets/convert_data.py): `datasets/convert_data.py`

### Other components

- **User**
- **Camera stream**

## Connections

- User → WebUI server: uses (evidence: `README.md`)
- Camera stream → WebUI server: streams video (evidence: `README.md`)
- WebUI server → Frame processor: dispatches frames (evidence: `services/webui/src/joy_interaction_webui/server.py`)
- WebUI server → RTSP track: starts RTSP (evidence: `services/webui/src/joy_interaction_webui/server.py`)
- RTSP track → Frame processor: provides frames
- Frame processor → VLM service: submits frames (evidence: `services/webui/src/joy_interaction_webui/video_processor.py`)
- Frame processor → Delegation manager: buffers frames (evidence: `services/webui/src/joy_interaction_webui/video_processor.py`)
- VLM service → Live adapter: sends requests
- Live adapter → VLM inference backend: forwards inference (evidence: `services/webinfer/live_adapter.py`)
- Live adapter → Memory summarizer: summarizes history (evidence: `services/webinfer/live_adapter.py`)
- WebUI server → ASR bridge: routes speech (evidence: `services/webui/src/joy_interaction_webui/server.py`)
- ASR bridge → ASR service: forwards audio (evidence: `services/webui/src/joy_interaction_webui/asr.py`)
- WebUI server → TTS bridge: routes speech output (evidence: `services/webui/src/joy_interaction_webui/server.py`)
- TTS bridge → TTS service: streams audio (evidence: `services/webui/src/joy_interaction_webui/tts.py`)
- VLM service → Delegation manager: hands off tasks
- Delegation manager → Background agent API: delegates questions
- Delegation manager → Artifact file server: links artifacts (evidence: `services/webui/src/joy_interaction_webui/background_model.py`)
- User → Interaction data: uses released data (evidence: `README.md`)
