Skip to content

feat: Trinity-to-Trinity federation via A2A protocol #738

Open

Description

@vybe

Summary

Enable Trinity agents to delegate tasks to agents on a different Trinity instance using the A2A protocol. Agent A on Instance 1 calls `call_a2a_agent` (see #736) with the remote agent's Agent Card URL (see #737). Auth is handled by a stored token in `.env`. No custom inter-Trinity protocol needed — standard A2A over HTTPS.

Context

Multi-instance Trinity deployments (e.g. production + staging, or multiple operator-controlled instances) currently have no native way to delegate across instances. Once #736 (A2A client tool) and #737 (Agent Card serving) land, Trinity-to-Trinity federation is a zero-code-change consequence: each instance already speaks A2A client and serves A2A cards. This issue tracks the validation, documentation, and any glue needed to make cross-instance calls work reliably. Depends on #736 and #737.

Acceptance Criteria

  • End-to-end test: Agent on Instance A calls agent on Instance B via `call_a2a_agent` using the remote Agent Card URL
  • Remote instance auth: calling agent stores `A2A_{REMOTE_DOMAIN}_TOKEN` in `.env` (a Trinity MCP API key from the remote instance)
  • `agent_permissions` on the remote instance controls whether the inbound call is accepted (remote agent must permit inbound A2A calls from the caller's Trinity identity)
  • Cross-instance audit: both instances log the call — Instance A logs outbound (actor: local agent), Instance B logs inbound (source: A2A, actor_ip: Instance A)
  • Docs: update `docs/MULTI_AGENT_SYSTEM_GUIDE.md` with a cross-instance delegation pattern example
  • Error handling: Instance B unreachable → graceful failure with retry guidance in the calling agent's response
  • No new infrastructure required — works over existing HTTPS/Cloudflare Tunnel endpoints

Technical Notes

Activity

  1. added
    priority-p3
    type-feature
    on May 8, 2026
  2. added
    theme-infrastructure
    on Jun 3, 2026
  3. added
    complexity-high
    status-incubating
    on Jun 12, 2026
  4. added
    status-ready
    and removed
    status-incubating
    on Jul 14, 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-highpriority-p3status-readytheme-infrastructuretype-feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions