How stack-cairn/liveagent works
LiveAgent is a local-first AI agent desktop with an optional remote Gateway. The primary flow is a user conversation through the desktop chat runtime to a configured model, with local tools available to act on workspace files and processes; results stream into the transcript and history. Separate capabilities include memory, automation, MCP/Skills, and remote browser access. The graph combines README-described capabilities with the supplied tree and sampled call sites; several subsystem paths are supported by the tree but their internal wiring was not sampled.
Main entry points: useProjectToolTextGenerationClient.ts Chat runtime · useLiveTranscriptController.ts Desktop UI · http.go Gateway server · llm.ts Model providers
Components 25
Desktop chat
- Desktop UI
crates/agent-gui/src/pages/chat/hooks/useLiveTranscriptController.ts - Chat runtime
crates/agent-gui/src/pages/chat/runtime/useProjectToolTextGenerationClient.ts - Model providers
crates/agent-gui/src/lib/providers/llm.ts - Live transcript
crates/agent-gui/src/pages/chat/hooks/useLiveTranscriptController.ts
Local agent tools
- Workspace tools
crates/agent-gui/src-tauri/src/commands/workspace/mod.rs - Shell processes
crates/agent-gui/src-tauri/src/runtime/managed_process.rs - Terminal and SSH
crates/agent-gui/src-tauri/src/runtime/terminal/mod.rs - Sub-agents
crates/agent-gui/src-tauri/src/commands/workspace/subagent_worktree.rs - Service tunnels
crates/agent-gui/src-tauri/src/commands/integration/gateway.rs
State and memory
- Chat history
crates/agent-gui/src-tauri/src/commands/history/chat_history/commands.rs - Settings
crates/agent-gui/src/lib/settings/storage.ts - Persistent memory
crates/agent-gui/src-tauri/src/services/memory/store.rs - Memory extraction
crates/agent-gui/src/lib/chat/memory/extractionEngine.ts - Memory organizer
crates/agent-gui/src/lib/memory/organizer/pipeline.ts - Scheduled automation
crates/agent-gui/src-tauri/src/services/automation/scheduler.rs
Extensions
- MCP bridge
crates/agent-gui/src-tauri/src/commands/integration/mcp.rs - Skills ecosystem
crates/agent-gui/src-tauri/src/commands/config/settings/agents.rs - Browser access
crates/agent-gui/src-tauri/src/services/browser/bridge.rs
Remote Gateway
- Gateway WebUI
crates/agent-gateway/web/src/app/GatewayApp.tsx - Gateway server
crates/agent-gateway/internal/server/http.go - Remote sessions
crates/agent-gateway/internal/session/manager.go - Desktop gateway service
crates/agent-gui/src-tauri/src/services/gateway/controller.rs - Gateway state
crates/agent-gateway/internal/db/db.go
Other components
- User
- Browser user
Connections 24
- User → Desktop UI: uses
- Desktop UI → Chat runtime: submits chat
- Chat runtime → Model providers: requests completion
- Model providers → Chat runtime: returns response
- Chat runtime → Live transcript: streams updates
- Live transcript → Chat history: persists conversation
- Chat runtime → Workspace tools: invokes tools
- Chat runtime → Shell processes: runs commands
- Chat runtime → Terminal and SSH: opens terminal
- Chat runtime → Sub-agents: delegates work
- Chat runtime → Service tunnels: exposes service
- Desktop UI → Settings: loads and saves
- Chat runtime → Memory extraction: extracts after turn
- Memory extraction → Persistent memory: reads and applies
- Memory organizer → Persistent memory: organizes entries
- Scheduled automation → Shell processes: runs scheduled jobs
- Chat runtime → MCP bridge: dispatches tools
- Chat runtime → Skills ecosystem: loads skills
- Chat runtime → Browser access: uses browser tools
- Browser user → Gateway WebUI: uses
- Gateway WebUI → Gateway server: sends WebSocket requests
- Gateway server → Remote sessions: dispatches requests
- Remote sessions → Desktop gateway service: relays agent operations
- Gateway server → Gateway state: reads and writes