local-ai-assistant-panel

Builds a FastAPI web control panel with WebSocket state bus for local Python processes.

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/TylerSimons1127/vibe --skill local-ai-assistant-panel-tylersimons1127
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: local-ai-assistant-panel
Source: https://github.com/TylerSimons1127/vibe/tree/main/skills/local-ai-assistant-panel
Command: npx skills add https://github.com/TylerSimons1127/vibe --skill local-ai-assistant-panel-tylersimons1127

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fastapi, psutil, playwright, sounddevice, and includes references (resource) components.

What problem does it solve? Long-running local Python processes like voice assistants or inference daemons lack a convenient way to start, stop, monitor live status, and edit settings without touching the terminal or source code. ## Core Features & Use Cases - Subprocess State Bus: Tails a log file in a background thread and broadcasts tagged state lines ([STATE], [LEVEL], [AMBIENT]) to WebSocket clients, avoiding the deadlocks of reading subprocess stdout through pipes. - Type-Safe Config Editing: Reads UPPERCASE constants from the app's source via ast, PATCHes values with type checking and import validation, and rolls back automatically on failure. - Single-File Frontend: Serves one vanilla JS + canvas index.html with an animated orb, settings drawer, and auto-reconnecting WebSocket client, with no CDN or build step. - Use Case: Wrap a JARVIS-style voice assistant in a localhost panel showing a live listening/thinking/speaking orb, mic levels, and a settings drawer where every config change triggers a validated restart. ## Quick Start Build a localhost FastAPI control panel for my Python voice assistant with start/stop controls, a live status orb, and an editable settings drawer.

Frequently Asked Questions about local-ai-assistant-panel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a web UI to control a local Python process?▼

Use a single FastAPI server that launches the Python app as a subprocess, serves one index.html page, and exposes REST plus WebSocket endpoints. The frontend gets start/stop/restart controls, live status, and a settings drawer that PATCHes config values.

How to stream subprocess output to a WebSocket in FastAPI?▼

Redirect the subprocess stdout to a log file instead of using subprocess.PIPE, which can deadlock in headless contexts. Run a tail_log thread that reads new lines and broadcasts them to WebSocket clients via asyncio.run_coroutine_threadsafe.

Why does subprocess.PIPE deadlock when reading stdout?▼

Pipe buffers can stall in daemon or headless contexts, so the child process never flushes its ready message through the pipe. Redirecting output to a file and tailing that file from a background thread avoids the deadlock entirely.

Can I edit Python config constants safely from a web API?▼

Yes, parse the source with ast to read UPPERCASE constants, then PATCH values with regex replacement after type-checking against the current value. Validate by importing the module in a subprocess and roll back from a .bak file if the import fails.

How do I verify canvas rendering without a vision API?▼

Use headless Playwright to read canvas pixel data with getImageData and apply relative thresholds, such as counting pixels darker than the local average or matching a target palette. Also assert zero console errors to catch silent JavaScript failures.

Why does sounddevice reject a valid mic channel count?▼

A device may report max_input_channels that its driver will not actually open, causing an Invalid number of channels error. Try a fallback candidate list from the reported maximum down to 2 channels, 1 channel, another device, then the system default.