API ReferenceInterfacesMessageClientOptions

title: Client. Message Client Options

A2A Node SDK - v0.1.0 / Modules / Client / MessageClientOptions

Interface: MessageClientOptions

Client.MessageClientOptions

Configuration options for the MessageClient

This interface defines how the MessageClient should connect to and authenticate with an A2A server, including base URL, headers, timeout, and authentication details.

Example

// Basic configuration
const basicOptions: MessageClientOptions = {
  baseUrl: 'https://a2a-server.example.com'
};
 
// With bearer token authentication
const authOptions: MessageClientOptions = {
  baseUrl: 'https://a2a-server.example.com',
  timeout: 10000,
  auth: {
    type: 'bearer',
    credentials: {
      token: 'your-bearer-token'
    }
  }
};

Table of contents

Properties

Properties

auth

Optional auth: Object

Authentication configuration

Type declaration

NameTypeDescription
credentials{ apiKey?: string ; headerName?: string ; headerValue?: string ; password?: string ; token?: string ; username?: string }Authentication credentials based on the selected type
credentials.apiKey?stringAPI key for apiKey authentication
credentials.headerName?stringCustom header name for custom authentication
credentials.headerValue?stringCustom header value for custom authentication
credentials.password?stringPassword for basic authentication
credentials.token?stringToken for bearer authentication
credentials.username?stringUsername for basic authentication
type"custom" | "basic" | "bearer" | "apiKey"Authentication type

baseUrl

baseUrl: string

Base URL for the A2A server


headers

Optional headers: Record<string, string>

Additional HTTP headers to include with every request


timeout

Optional timeout: number

Request timeout in milliseconds (default: 5000)