Repository navigation
Description
Summary
A2A is its own domain, but its code lives inside the agent and scheduler bounded contexts:
internal/agent/tools/a2a_*.go: theA2A_QueryAgent,A2A_QueryTaskandA2A_SubmitTasktools and the A2A polling job.internal/agent/application/: the whole package is A2A (A2AAgentService,AgentSupervisor,ProbeAgents,ExternalAgents).internal/agent/domain:AgentSupervisorandAgentState(A2A agent containers).internal/scheduler/domain:A2ATaskTracker,TaskPollingState,TaskInfo,TaskRetentionService,BackgroundTaskService,A2AClearer,JobKindA2A,TaskRetainer,A2AStateProvider.internal/scheduler: theA2ATaskTrackerimplementation,BackgroundTaskServiceandTaskRetentionService.
Extract it into internal/a2a, mirroring internal/mcp: a pure internal/a2a/domain, internal/a2a/infrastructure for the ADK client adapters, and a root package for the tools, the agent supervisor, the status probe and the background task service. The container registers a2a.NewTools(...) into the tool registry the same way it does for the browser and computer tools, and the A2A tool manifests (introduced by #1367) move to internal/a2a/tools/<Name>.yaml, so changing an A2A tool touches only internal/a2a.
Known knots
tools.NewRegistrytakes an A2A-typedtaskTrackerparameter and type-asserts the non-A2A subagent tracker, job submitter, stopper and liveness reporter out of it.- Shared
scheddomaincontracts reference A2A types:BackgroundTaskRegistryembedsA2ATaskTracker,TaskRetainerreturnsTaskInfo,A2AStateProviderreturnsTaskPollingState. The depguarddomain-is-purerule forbidsscheddomainimporting an a2a domain, so these contracts need inverting. a2a_task.goreusesweb_fetch.gohelpers (isTrustedAgentHost,extractFilenameFromURL), andisTrustedAgentHostreads the A2A config.llm_tool_service.gospecial-cases theA2A_prefix (enable gate, skipped validation).agent.goholds anA2AAgentServiceto render thea2a_agentssystem prompt section.- The presentation layer uses
adk.TaskState,agentdomain.AgentStateand the scheduler A2A types.
Acceptance Criteria
- An
internal/a2abounded context (domain/,infrastructure/, root package) following theinternal/mcplayout;internal/agent/applicationis gone. - The A2A tools and their manifests live in
internal/a2a, the container registers them,internal/agent/toolshas no A2A code, andNewRegistryno longer takes an A2A tracker. - The generic job contracts in
scheddomainno longer reference A2A types; A2A task tracking and retention live in the a2a context. -
llm_tool_service.gohas noA2A_special cases; gating comes from the tools'IsEnabledand manifests. - depguard:
github.com/inference-gateway/adkis only imported insideinternal/a2a(like the playwright and robotgo rules). - No behavior change: the tool-definitions golden test from [TASK] Refactor built-in tool definitions into manifests (groundwork for #1366) #1367 passes unchanged,
task testandtask lintpass, mocks are regenerated from the new paths, and AGENTS.md is updated.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
refactor(tools): define built-in tools through embedded manifests (#1369
refactor(a2a): extract A2A into its own bounded context
inference-gateway-releaser commentedon Sep 28, 2026
🎉 This issue has been resolved in version 0.216.0 🎉
The release is available on:
Your semantic-release bot 📦🚀