Skip to content

feat(voice): direct Trinity MCP tools in workspace voice session (list_agents, chat_with_agent) #711

Closed as not planned

Description

@vybe

Summary

The workspace voice session (Gemini Live) currently exposes only a generic run_task tool that routes through the agent container's Claude Code subprocess. This means Gemini has no direct access to Trinity fleet operations — listing agents, chatting with agents, checking health — which makes the voice session unable to orchestrate the fleet in real time.

The standalone Corbin20 workspace solves this with a proxy_server.py that declares fleet_status and call_agent as first-class Gemini function declarations backed by direct Trinity MCP calls. Trinity's voice backend should do the same in-process.

Context

Discovered while testing the workspace voice session locally (issue #707 follow-up). The canvas panel works after flicker fixes, but the voice agent cannot perform Trinity operations like listing the fleet or delegating to another agent — it only has run_task which spawns a new stateless Claude Code process in the container.

Reference implementation: /Users/eugene/Dropbox/Agents/Corbin20/.claude/skills/agent-workspace/proxy_server.py — fleet_status → list_agents and call_agent → chat_with_agent via direct MCP call.

Acceptance Criteria

  • list_agents declared as a Gemini function in the voice session — returns agents accessible to the current user
  • chat_with_agent(agent_name, message) declared as a Gemini function — calls the target agent and returns the response (respects existing agent_permissions access control)
  • Both tools executed in-process in gemini_voice.py via the backend DB / agent_client, not via Claude Code subprocess
  • run_task kept alongside for general agent workspace tasks
  • Tools gated on workspace_mode=True (same as panel tools) or always-on — decide at implementation
  • System prompt updated to describe the new tools and when to use each

Technical Notes

  • Execution site: GeminiVoiceService._execute_tool() — add new branch alongside the run_task path
  • list_agents: call db.get_accessible_agents(session.user_id) (already used by monitoring.py)
  • chat_with_agent: call agent_client.get_agent_client(agent_name).task(message) — same path as run_task but targeted at a specific agent, not the session's own agent
  • Access control: check agent_permissions table (source=session.agent_name, target=agent_name) before allowing chat_with_agent — same gate the MCP server enforces
  • Tool declarations go in gemini_voice.py alongside _PANEL_TOOLS and _RUN_TASK_TOOL

Activity

  1. added
    priority-p2
    type-feature
    on May 7, 2026
  2. added
    complexity-medium
    status-incubating
    on Jun 12, 2026
  3. vybe commented on Sep 7, 2026

    @vybe
    ContributorAuthor

    Superseded by abilityai/trinity-enterprise#535 (operator ruling 2026-09-07): the voice call acts as the agent — run_task runs in the Workspace chat's own agent session — behind a tool manifest locked per agent. Direct fleet tools (list_agents, chat_with_agent) are explicitly out of v1 and would land behind that manifest later. Closing as superseded.

  4. removed
    status-incubating
    on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-mediumpriority-p2theme-devextype-feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions