Skip to content

[FEATURE]: Native A2A support (serve sessions over A2A, delegate to remote A2A agents) #62903

Open

Description

@guglielmo-san

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Summary

Add native support for A2A v1.0, the open agent-to-agent protocol hosted by the Linux Foundation, in both directions: serve opencode as an A2A agent, and delegate to remote A2A agents. A2A complements what opencode already supports: MCP connects it to tools, ACP to editors, and A2A to other agents.

Benefits

Inbound

  • Orchestrators built on ADK, LangGraph, CrewAI or any A2A client can use opencode as a coding sub-agent without custom glue.
  • Long tasks map to A2A tasks: callers stream progress, poll with GetTask and stop with CancelTask.
  • Permission prompts reach the caller as input-required instead of being auto-approved or blocking.
  • opencode keeps its own workspace, tools, keys and permissions; the caller sees only messages and artifacts.

Outbound

  • Delegate to specialized remote agents (a review service, an internal docs agent) by adding a URL, instead of a custom tool or MCP wrapper per agent.
  • The Agent Card gives the model the agent's description, skills and auth requirements.
  • Follow-ups continue the same remote conversation through contextId/taskId.

Proposed design

Inbound: opencode a2a

  • New command in packages/cli/src/a2a/, built like opencode acp, serving the Agent Card and SendMessage, SendStreamingMessage, GetTask, CancelTask through @a2a-js/sdk.
  • An AgentExecutor maps each contextId to one session and streams session events as task updates.
  • permission.asked and form.created become TASK_STATE_INPUT_REQUIRED; the reply on the same taskId goes to permission.reply or session.form.reply.
  • CancelTask calls session.interrupt.

Outbound

  • A plugin with a remote_agent tool; remote agents are listed by Agent Card URL in the plugin options. Later, subagent definitions could accept a card URL directly.

We can implement and maintain this as two PRs, inbound then outbound.

Activity

  1. opencodejr commented on Nov 9, 2026

    @opencodejr

    Thanks for the detailed proposal, @guglielmo-san! You're asking for native A2A v1.0 support in both directions:

    • Inbound: an opencode a2a command, built like opencode acp, that serves sessions as A2A tasks, with permission prompts sent to the caller as input-required.
    • Outbound: a remote_agent tool for delegating to remote A2A agents by Agent Card URL.

    Maintainers will consider it, including whether the inbound side should live in core. Please wait for their feedback before starting the PRs.

    Related issues and PRs:

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions