Skip to content

feat(voice): agent-scoped voice + canvas workspace with Trinity MCP access [experimental] #699

Closed

Description

@vybe

Summary

Add an agent-scoped voice + canvas workspace to Trinity — a split-panel voice UI where a Gemini Live session is grounded in a specific agent's context (CLAUDE.md, template, credentials) while also holding Trinity MCP access to orchestrate the broader fleet.

This is an experimental feature gated behind a feature flag.

Context

Trinity's existing voice mode already scopes to an agent via `/api/agents/{name}/voice/start`. This feature extends that pattern: instead of replacing the agent with a neutral platform-level orchestrator, we ground the voice session in the agent's persona and context, then augment it with Trinity MCP tools so it can reach across the fleet.

A "chief of staff" or orchestrator-type agent is the natural host — but any agent works. The agent's CLAUDE.md defines the personality and purpose; Trinity MCP provides fleet-wide reach.

Inspired by the split-panel workspace pattern in Corbin, adapted for Trinity's multi-agent context.

Design

  • Left panel: Reuse existing VoiceOverlay.vue orb — no changes to audio or animation
  • Right panel: Canvas updated by 4 voice-driven tools:
    • show_markdown(content, title?) — default, renders markdown
    • update_panel(html, title?) — full HTML panel replacement
    • append_to_panel(html) — incremental content
    • clear_panel() — reset for new topic
  • Voice session: Extend existing per-agent voice session (POST /api/agents/{name}/voice/start) to inject Trinity MCP tools alongside the agent's context — no new endpoint needed
  • Agent context injected: agent's CLAUDE.md, template.yaml metadata, and active tool list
  • Trinity MCP tools injected: chat_with_agent, list_agents, get_agent_health, get_fleet_health (and others as appropriate), using the current user's MCP API key
  • Auth: Uses current user's JWT — agent visibility matches what the user can access
  • Navigation: Canvas panel lives on the agent detail page (new "Workspace" tab), not a new top-level route

Acceptance Criteria

  • Agent detail page gains a "Workspace" tab with split-panel layout (orb left, canvas right)
  • Voice session is agent-scoped — agent's CLAUDE.md and template context injected into Gemini's system prompt
  • Voice agent also has access to Trinity MCP tools: chat_with_agent, list_agents, get_agent_health, get_fleet_health (and others as appropriate)
  • Panel tools (show_markdown, update_panel, append_to_panel, clear_panel) are callable during voice session
  • Canvas updates in real-time as voice agent makes tool calls
  • Feature is gated behind workspace_enabled feature flag (default OFF)
  • Existing per-agent voice mode (existing tab) is unaffected

Technical Notes

  • Extend POST /api/agents/{name}/voice/start — add agent context + Trinity MCP tools to Gemini system prompt; no new endpoint
  • Backend adds panel state endpoint: GET /api/agents/{name}/voice/{session_id}/panel (polled at 300ms by frontend)
  • Tool dispatch: panel tools handled in-process by backend; MCP tools proxied to mcp-server using user's API key
  • Reuse VoiceOverlay.vue, useVoiceSession.js, and audio utils unchanged
  • Feature flag: add workspace_enabled to GET /api/settings/feature-flags (default false)
  • Session transcript saved on stop (same pattern as existing per-agent voice)

Activity

  1. added
    priority-p2
    type-feature
    on May 7, 2026
  2. changed the title [-]feat(workspace): Trinity-wide voice + canvas workspace with MCP agent control [experimental][/-] [+]feat(voice): agent-scoped voice + canvas workspace with Trinity MCP access [experimental][/+] on May 7, 2026
  3. vybe commented on May 7, 2026

    @vybe
    ContributorAuthor

    /claim

  4. added
    status-in-progress
    on May 7, 2026
  5. github-actions commented on May 7, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/699-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #699
  6. added
    status-in-dev
    and removed
    status-in-progress
    on May 7, 2026
  7. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  8. added
    complexity-medium
    theme-ui-ux
    and removed
    status-in-dev
    on Jun 1, 2026
  9. added a commit that references this issue on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-ui-uxtype-feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions