a2a

package
v1.67.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package a2a provides a toolset implementation for connecting to remote A2A agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToolSet added in v1.60.0

func CreateToolSet(ctx context.Context, toolset latest.Toolset, runConfig *config.RuntimeConfig) (tools.ToolSet, error)

CreateToolSet is used by the tools registry.

Types

type Option added in v1.66.0

type Option func(*Toolset)

Option configures a Toolset.

func WithAllowPrivateIPs added in v1.66.0

func WithAllowPrivateIPs(allow bool) Option

WithAllowPrivateIPs disables SSRF dial-time protection so the a2a tool can reach internal services. Off by default; matches the behaviour of the same flag on `fetch`, `api`, `openapi` and remote `mcp`.

func WithExpander added in v1.67.0

func WithExpander(expander *js.Expander) Option

func WithTimeout added in v1.66.0

func WithTimeout(d time.Duration) Option

WithTimeout overrides the default HTTP client timeout (see httpclient.DefaultToolHTTPTimeout) used both for fetching the agent card and for streaming messages.

type Toolset

type Toolset struct {
	// contains filtered or unexported fields
}

Toolset implements tools.ToolSet for A2A remote agents.

func NewToolset

func NewToolset(name, url string, headers map[string]string, opts ...Option) *Toolset

NewToolset creates a new A2A toolset for the given URL.

func (*Toolset) Instructions

func (t *Toolset) Instructions() string

Instructions returns instructions for using the A2A toolset.

func (*Toolset) Start

func (t *Toolset) Start(ctx context.Context) error

Start connects to the A2A agent and fetches the agent card.

func (*Toolset) Stop

func (t *Toolset) Stop(_ context.Context) error

Stop disconnects from the A2A agent.

func (*Toolset) Tools

func (t *Toolset) Tools(_ context.Context) ([]tools.Tool, error)

Tools returns the tools available from the remote A2A agent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL