StateSet Desktop
An Electron desktop application for managing autonomous customer service agents, with a real-time streaming UI over the StateSet Engine API.Features
- Autonomous AI agents running in continuous loops that handle customer service tasks.
- Real-time streaming β SSE-based live updates showing agent thinking, tool calls, and responses.
- Platform integrations β OAuth connections for Shopify, Gorgias, Zendesk, and more.
- Multi-brand support β manage multiple brands with separate configurations.
- Loop control β pause, resume, and stop agents at any time.
- Metrics dashboard β token usage, tool calls, and agent performance.
Architecture
At runtime:
- Auth state is restored from secure storage and validated with
GET /api/v1/auth/me. - API requests flow through a client providing retry, timeout, circuit breaking, validation, and request dedupe.
- React Query holds server state; Zustand holds app and session UI state.
- The agent console streams live events over SSE.
- An IndexedDB offline cache provides fallback reads for key lists.
Request lifecycle
Starting a stopped agent from the dashboard:- The user clicks start.
- An optimistic mutation marks the session
startingimmediately, so the UI stays responsive. - The mutation calls
startSession(tenantId, brandId, sessionId). - That issues
POST /api/v1/tenants/:tenantId/brands/:brandId/agents/:sessionId/start. - The request layer handles retry, timeout, and circuit-breaker concerns, and records metrics.
- On success, React Query invalidates session queries and refetches canonical state.
- The UI re-renders with the authoritative status β
runningorpausedβ from the API. - In the Agent Console, the stream hook connects to the SSE endpoint.
- SSE events (
thinking,message,tool_call,metrics,status_changed) stream in and update the live timeline and metrics panel. - Background sync updates tray status and optionally raises desktop notifications.
The optimistic
starting state is a UI affordance only. Canonical status always comes from the
API refetch in step 6 β donβt treat the optimistic value as authoritative.Development
Prerequisites
Node.js 22.12+ (see.nvmrc).
Setup
.env:
Running
Related
- Console Overview β the web console
- Console Mobile β the React Native app