Back to PortfolioCase Study — Voice AI & Local Automation
Voice AI & Local Automation

Friday User Assist Protocol

Multimodal Voice AI assistant designed to run desktop operations, execute CLI scripts, manage filesystem directories, and integrate custom tools in real-time.

Friday User Assist Protocol

Project Overview

Friday is an advanced, multimodal voice assistant that bridges the gap between natural voice reasoning and OS-level execution. By integrating LiveKit WebRTC channels with Google Gemini Realtime APIs, the assistant processes voice instructions with sub-second latency, executing local commands through a secured tool-calling architecture.

Product Demonstration

Problem & Motivation

The Problem

Traditional automation requires writing custom scripts or using rigid hotkeys. Non-technical tasks (like organizing files or checking build logs) take active context-switching. Friday resolves this by offering a zero-interface voice gateway that interacts with the operating system securely.

The Motivation

Most voice assistants are walled gardens confined to answering generic web questions. The motivation behind Friday was to build a truly useful agentic helper that has full access to the local machine, allowing hands-free developer workflows, automated directory setups, and instant system actions through natural conversation.

System Architecture

Friday utilizes a client-server WebRTC setup. The frontend Next.js application connects to the LiveKit server to capture user audio. The backend agent node (Python) listens to the audio stream, pipes it to the Gemini Realtime WebSocket, and handles tool-call responses dynamically (e.g. running shell scripts, editing files).

1

Secured tool-calling framework (automation.py & tools.py) implementing strict file-range and command validation sandboxes.

2

Real-time audio streaming pipeline using LiveKit's WebRTC infrastructure to minimize voice loopback latency under 600ms.

3

Context persistence layer powered by mem0, allowing the assistant to remember project names, developer preferences, and user history across restarts.

4

Custom MCP (Model Context Protocol) client integration allowing Friday to connect to local development tools and databases.

Key Features & Capabilities

Capability Explorer

Friday is integrated directly with the workstation's local environment through a registry of 45+ system, mouse, keyboard, search, and device controller scripts. Click any category to inspect its integrated tools.

4 Tools

Information & Search

Retrieves weather reports, searches the web, or queries YouTube paths.

get_weather()search_web()get_local_time()search_youtube()
Expand Details ▼
5 Tools

Desktop Automation

Launches local applications, controls dark mode, and handles power loops.

open_app()set_dark_mode()shutdown_system()restart_system()lock_screen()
Expand Details ▼
7 Tools

System Controls

Monitors battery specs, triggers volumes, and routes mic streams.

unlock_screen()battery_status()adjust_volume()mute_volume()unmute_volume()mute_microphone()unmute_microphone()
Expand Details ▼
7 Tools

File System

Audits folder structures, writes/reads file segments, and handles directories.

clean_temp_files()open_folder()search_file()open_file()create_directory()write_file()read_file()
Expand Details ▼
8 Tools

Mouse & Keyboard Control

Positions cursor coords, triggers keystrokes, and types string logs.

move_mouse()click_mouse()cursor_cordinate()type_text()press_keys()scroll_mouse()press_or_click()switch_window()
Expand Details ▼
3 Tools

Browser & Media

Loads web pages, manages media playback, and opens settings panels.

play_music()open_website()open_settings_page()
Expand Details ▼
2 Tools

AI Generation

Drafts detailed copy plans and generates image assets locally.

image_genrt()generate_content()
Expand Details ▼
3 Tools

Scheduling & Productivity

Triggers notification alarms, logs focus states, and tracks processes.

add_reminder()get_due_reminders()monitor_app_focus()
Expand Details ▼
6 Tools

Mobile Automation

Bridges WhatsApp networks, unlocks screens, and dials phone lines.

unlock_phone()open_mobile_app()close_mobile_app()auto_dial_contact()send_whatsapp_message()get_screen_lock_state()
Expand Details ▼
Friday Runtime Engine Diagnostics
BOOTING
$ initialize --core-agent --mode=voice
Loading Friday Runtime...

Agent Core Execution Architecture

1

Input

User triggers Voice WebRTC stream

2

Parsing

Intent parameters parsed via Gemini Realtime

3

Planner

Compiles dependency execution tree paths

4

Tool Resolve

Locates function schemes inside registry

5

Execution

Runs command scripts on local OS

6

Observation

Inspects output log results and codes

7

Response

TTS synthesizes response voice feedback

Engineering Challenges

Voice Audio Latency Over WebRTC

Challenge

Standard HTTP request loops for audio upload and text-to-speech feedback resulted in average response latency exceeding 3 seconds, making fluid voice conversation impossible.

Solution

Replaced API polling with a persistent bi-directional WebRTC connection via LiveKit. The audio is streamed chunk-by-chunk and sent directly to Gemini's Realtime WebSocket interface, reducing complete round-trip latency to roughly 650ms.

Development Timeline

May 2026

Conceived Friday Voice Agent system architecture.

June 2026

Wired LiveKit RTC audio capture and Gemini Realtime WebSocket hooks.

July 2026

Integrated mem0 memory storage and completed standard local tools suite.

Lessons Learned

  • Real-time state orchestration is complex; keeping voice buffers synchronized requires robust WebSocket handling.
  • Securing local OS agents is critical; arbitrary command execution must always be restricted by whitelist schemas.

Future Improvements

  • Integrate local vector-embedding searches for on-device codebase comprehension.
  • Support fully offline operation by routing voice pipelines to local Whisper and LLaMA instances.