You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add HostTools API to Go ADK for SDK-registered custom tools
Add HostToolDef and ToolHandlerFunc types to the ADK so users can
declaratively register custom tools with auto-dispatch handlers.
The agent intercepts host tool calls from the harness, invokes the
registered handler, and sends results back automatically.
Key changes:
- HostToolDef type with Name, Description, Parameters, Handler fields
- ToolHandlerFunc signature: func(ctx, args) (any, error)
- Validation: reject duplicate names, built-in name collisions, nil handlers
- Auto-dispatch in Agent.processStep via handleHostToolCall
- buildHarnessConfig translates HostTools to proto host_tools
- IsHostToolCall flag on connection.Step for detection
- 8 new tests (3 dispatch + 5 validation)
- adk-host-tools example with get_weather and convert_units tools
- Updated docs/adding-tools.md with Go ADK section
0 commit comments