Skip to content

feat: add runtime registries for tools, MCP, A2A, and sub-agents with per-run resolution#29

Merged
vinodvx merged 1 commit into
mainfrom
feat/runtime-registries
Jun 14, 2026
Merged

feat: add runtime registries for tools, MCP, A2A, and sub-agents with per-run resolution#29
vinodvx merged 1 commit into
mainfrom
feat/runtime-registries

Conversation

@vinodvx

@vinodvx vinodvx commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Description

Introduces runtime registries for tools, MCP, A2A, and sub-agents. Capabilities are resolved per run (Run, Stream, RunAsync) from the current registry state, so callers can add or remove tools, MCP/A2A clients, and sub-agents after NewAgent without restarting the agent.

Changes

  • RegistriesToolRegistry, MCPRegistry, A2ARegistry, and SubAgentRegistry with Register / Unregister; exposed on Agent via ToolRegistry(), MCPRegistry(), A2ARegistry(), and SubAgentRegistry(). Sugar options (WithTools, WithMCPConfig, WithSubAgents, etc.) still work and merge at build time.
  • Per-run resolution — Each Run, Stream, and RunAsync builds the tool list and sub-agent specs from the live registries at call time.
  • Runtime — Local and Temporal runtimes receive the resolved tool list on each execute request. Temporal uses fetchTools and fingerprint verification against the worker’s current registry state.
  • RunAsync — Returns (<-chan AgentRunAsyncResult, error); approvals use WithApprovalHandler (same as Run).
  • ToolKind — Optional interfaces.ToolKindProvider and interfaces.KindOf(); MCP, A2A, sub-agent, and retriever tools report their kind ("mcp", "a2a", "sub-agent", "retriever").
  • Docs & examples — README section Managing Capabilities at Runtime; examples/agent_with_tools/dynamic_registry example.
  • Cleanup — Removed pkg/tools/registry in favor of pkg/agent registries; tests and example updates.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / chore

Related issues

Closed #23

Checklist

  • I have run make check
  • I have run task examples:all
  • I have run make tidy if I added or removed dependencies
  • Commit messages follow conventional commits (e.g. feat:, fix:, docs:)
  • I have added/updated tests for my changes
  • Documentation is updated if needed

@vinodvx vinodvx merged commit dde4f1e into main Jun 14, 2026
3 checks passed
@vinodvx vinodvx deleted the feat/runtime-registries branch June 14, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic Runtime Configuration for Tools, MCP, A2A, and Subagents via Registries

1 participant