> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# A2A clients

> Public a2a clients signatures and configuration in @agentium/core 4.0.0.

Import these **29 exports** from `@agentium/core`. Read the [a2a clients guide](/a2a/overview) for setup and behavior, or return to the [package reference](/api-reference/core).

A `?` marks an optional field. These are declarations for lookup; run the examples in the linked guide. Follow related-type links for Agentium types and source links for imported dependency types.

## A2AAgentCard

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2AAgentCard {
    name: string;
    description?: string;
    url: string;
    version?: string;
    provider?: {
        organization: string;
        url?: string;
    };
    capabilities?: {
        streaming?: boolean;
        pushNotifications?: boolean;
        stateTransitionHistory?: boolean;
    };
    authentication?: {
        schemes?: string[];
        credentials?: string;
    };
    skills?: A2ASkill[];
    defaultInputModes?: string[];
    defaultOutputModes?: string[];
    supportedInputModes?: string[];
    supportedOutputModes?: string[];
}
```

Related: [`A2ASkill`](/api-reference/core/a2a#a2askill).

## A2AArtifact

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2AArtifact {
    artifactId: string;
    name?: string;
    description?: string;
    parts: A2APart[];
    metadata?: Record<string, unknown>;
}
```

Related: [`A2APart`](/api-reference/core/a2a#a2apart).

## A2ADataPart

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2ADataPart {
    kind: "data";
    data: Record<string, unknown>;
}
```

## A2AFilePart

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2AFilePart {
    kind: "file";
    file: {
        name?: string;
        mimeType?: string;
        bytes?: string;
        uri?: string;
    };
}
```

## A2AJsonRpcRequest

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2AJsonRpcRequest {
    jsonrpc: "2.0";
    id: string | number;
    method: string;
    params?: Record<string, unknown>;
}
```

## A2AJsonRpcResponse

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2AJsonRpcResponse {
    jsonrpc: "2.0";
    id: string | number;
    result?: unknown;
    error?: {
        code: number;
        message: string;
        data?: unknown;
    };
}
```

## A2AMessage

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2AMessage {
    role: "user" | "agent";
    parts: A2APart[];
    messageId?: string;
    taskId?: string;
    referenceTaskIds?: string[];
    metadata?: Record<string, unknown>;
}
```

Related: [`A2APart`](/api-reference/core/a2a#a2apart).

## A2APart

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export type A2APart = A2ATextPart | A2AFilePart | A2ADataPart;
```

Related: [`A2ADataPart`](/api-reference/core/a2a#a2adatapart), [`A2AFilePart`](/api-reference/core/a2a#a2afilepart), [`A2ATextPart`](/api-reference/core/a2a#a2atextpart).

## A2ARemoteAgent

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/a2a-remote-agent.ts)

```typescript theme={null}
/**
 * A2ARemoteAgent wraps a remote A2A-compliant agent.
 * It can be used as a tool, a Team member, or called directly.
 */
export declare class A2ARemoteAgent {
    readonly url: string;
    name: string;
    instructions: string;
    skills: Array<{
        id: string;
        name: string;
        description?: string;
    }>;
    get tools(): ToolDef[];
    get modelId(): string;
    get providerId(): string;
    get hasStructuredOutput(): boolean;
    constructor(config: A2ARemoteAgentConfig);
    /**
     * Fetch the Agent Card from /.well-known/agent.json and populate metadata.
     */
    discover(opts?: {
        signal?: AbortSignal;
    }): Promise<A2AAgentCard>;
    /**
     * Synchronous run: sends message/send and returns RunOutput.
     */
    run(input: string, opts?: RunOpts): Promise<RunOutput>;
    /**
     * Streaming run: sends message/stream and yields StreamChunks from SSE.
     */
    stream(input: string, opts?: RunOpts): AsyncGenerator<StreamChunk>;
    /**
     * Wrap this remote agent as a ToolDef so it can be used by an orchestrator agent.
     */
    asTool(): ToolDef;
    getAgentCard(): A2AAgentCard | null;
}
```

Related: [`A2AAgentCard`](/api-reference/core/a2a#a2aagentcard), [`A2ARemoteAgentConfig`](/api-reference/core/a2a#a2aremoteagentconfig), [`RunOpts`](/api-reference/core/agent#runopts), [`RunOutput`](/api-reference/core/agent#runoutput), [`StreamChunk`](/api-reference/core/models#streamchunk), [`ToolDef`](/api-reference/core/tools#tooldef).

## A2ARemoteAgentConfig

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/a2a-remote-agent.ts)

```typescript theme={null}
export interface A2ARemoteAgentConfig {
    url: string;
    /** Custom headers for every request (e.g. auth tokens). */
    headers?: Record<string, string>;
    /** Override the discovered name. */
    name?: string;
    /** Request timeout in ms (default 60000). */
    timeoutMs?: number;
}
```

## A2ARemoteTeam

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/a2a-remote-team.ts)

```typescript theme={null}
/**
 * A2ARemoteTeam wraps a remote team endpoint.
 * Duck-types the Team interface so it can be used interchangeably.
 */
export declare class A2ARemoteTeam {
    readonly kind: "team";
    readonly name: string;
    constructor(config: A2ARemoteTeamConfig);
    run(input: string, opts?: RunOpts): Promise<RunOutput>;
    stream(input: string, opts?: RunOpts): AsyncGenerator<StreamChunk>;
}
```

Related: [`A2ARemoteTeamConfig`](/api-reference/core/a2a#a2aremoteteamconfig), [`RunOpts`](/api-reference/core/agent#runopts), [`RunOutput`](/api-reference/core/agent#runoutput), [`StreamChunk`](/api-reference/core/models#streamchunk).

## A2ARemoteTeamConfig

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/a2a-remote-team.ts)

```typescript theme={null}
export interface A2ARemoteTeamConfig {
    url: string;
    name?: string;
    headers?: Record<string, string>;
    timeoutMs?: number;
}
```

## A2ARemoteWorkflow

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/a2a-remote-workflow.ts)

```typescript theme={null}
/**
 * A2ARemoteWorkflow wraps a remote workflow endpoint.
 */
export declare class A2ARemoteWorkflow {
    readonly kind: "workflow";
    readonly name: string;
    constructor(config: A2ARemoteWorkflowConfig);
    run(initialState?: Record<string, unknown>, opts?: {
        signal?: AbortSignal;
    }): Promise<WorkflowResult<Record<string, unknown>>>;
}
```

Related: [`A2ARemoteWorkflowConfig`](/api-reference/core/a2a#a2aremoteworkflowconfig), [`WorkflowResult`](/api-reference/core/workflow#workflowresult).

## A2ARemoteWorkflowConfig

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/a2a-remote-workflow.ts)

```typescript theme={null}
export interface A2ARemoteWorkflowConfig {
    url: string;
    name?: string;
    headers?: Record<string, string>;
    timeoutMs?: number;
}
```

## A2ASendParams

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2ASendParams {
    message: A2AMessage;
    configuration?: {
        acceptedOutputModes?: string[];
        blocking?: boolean;
    };
    metadata?: Record<string, unknown>;
}
```

Related: [`A2AMessage`](/api-reference/core/a2a#a2amessage).

## A2ASkill

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2ASkill {
    id: string;
    name: string;
    description?: string;
    tags?: string[];
    examples?: string[];
}
```

## A2ATask

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2ATask {
    id: string;
    sessionId?: string;
    status: {
        state: A2ATaskState;
        message?: A2AMessage;
        timestamp?: string;
    };
    artifacts?: A2AArtifact[];
    history?: A2AMessage[];
    metadata?: Record<string, unknown>;
}
```

Related: [`A2AArtifact`](/api-reference/core/a2a#a2aartifact), [`A2AMessage`](/api-reference/core/a2a#a2amessage), [`A2ATaskState`](/api-reference/core/a2a#a2ataskstate).

## A2ATaskQueryParams

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export interface A2ATaskQueryParams {
    id: string;
    historyLength?: number;
}
```

## A2ATaskState

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
export type A2ATaskState = "submitted" | "working" | "input-required" | "completed" | "failed" | "canceled";
```

## A2ATextPart

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/types.ts)

```typescript theme={null}
/**
 * A2A (Agent-to-Agent) Protocol types.
 * Based on the A2A specification v0.2.
 * https://google.github.io/A2A/specification/
 */
export interface A2ATextPart {
    kind: "text";
    text: string;
}
```

## A2AV1CallOptions

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
export interface A2AV1CallOptions {
    signal?: AbortSignal;
    tenant?: string;
}
```

## A2AV1Card

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
export interface A2AV1Card {
    name: string;
    description: string;
    version: string;
    supportedInterfaces: Array<{
        url: string;
        protocolBinding: string;
        protocolVersion: string;
        tenant?: string;
    }>;
    capabilities?: {
        streaming?: boolean;
        pushNotifications?: boolean;
    };
    [key: string]: unknown;
}
```

## A2AV1Client

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
/** Optional official-SDK adapter; importing core never loads the A2A SDK.
 * Credentials are restricted to the configured origin, including discovery. */
export declare class A2AV1Client {
    constructor(config: A2AV1ClientConfig);
    discover(options?: Pick<A2AV1CallOptions, "signal">): Promise<A2AV1Card>;
    send(message: A2AV1Message | string, options?: A2AV1CallOptions): Promise<A2AV1Task | A2AV1Message>;
    stream(message: A2AV1Message | string, options?: A2AV1CallOptions): AsyncGenerator<A2AV1StreamEvent>;
    getTask(id: string, options?: A2AV1CallOptions): Promise<A2AV1Task>;
    cancelTask(id: string, options?: A2AV1CallOptions): Promise<A2AV1Task>;
}
```

Related: [`A2AV1CallOptions`](/api-reference/core/a2a#a2av1calloptions), [`A2AV1Card`](/api-reference/core/a2a#a2av1card), [`A2AV1ClientConfig`](/api-reference/core/a2a#a2av1clientconfig), [`A2AV1Message`](/api-reference/core/a2a#a2av1message), [`A2AV1StreamEvent`](/api-reference/core/a2a#a2av1streamevent), [`A2AV1Task`](/api-reference/core/a2a#a2av1task).

## A2AV1ClientConfig

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
export interface A2AV1ClientConfig {
    url: string;
    headers?: Record<string, string>;
    fetch?: typeof fetch;
    timeoutMs?: number;
}
```

## A2AV1Message

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
export interface A2AV1Message {
    messageId: string;
    role: "ROLE_USER" | "ROLE_AGENT";
    parts: A2AV1Part[];
    contextId?: string;
    taskId?: string;
    metadata?: Record<string, unknown>;
}
```

Related: [`A2AV1Part`](/api-reference/core/a2a#a2av1part).

## A2AV1Part

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
/** A2A 1.0 JSON parts. Wire parts stay intact, including data and media. */
export type A2AV1Part = ({
    text: string;
} | {
    data: unknown;
} | {
    raw: string;
} | {
    url: string;
}) & {
    mediaType?: string;
    filename?: string;
    metadata?: Record<string, unknown>;
};
```

## A2AV1State

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
export type A2AV1State = "TASK_STATE_SUBMITTED" | "TASK_STATE_WORKING" | "TASK_STATE_COMPLETED" | "TASK_STATE_FAILED" | "TASK_STATE_CANCELED" | "TASK_STATE_INPUT_REQUIRED" | "TASK_STATE_REJECTED" | "TASK_STATE_AUTH_REQUIRED";
```

## A2AV1StreamEvent

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
export type A2AV1StreamEvent = {
    task: A2AV1Task;
} | {
    message: A2AV1Message;
} | {
    statusUpdate: {
        taskId: string;
        contextId: string;
        status: A2AV1Task["status"];
    };
} | {
    artifactUpdate: {
        taskId: string;
        contextId: string;
        artifact: NonNullable<A2AV1Task["artifacts"]>[number];
        append?: boolean;
        lastChunk?: boolean;
    };
};
```

Related: [`A2AV1Message`](/api-reference/core/a2a#a2av1message), [`A2AV1Task`](/api-reference/core/a2a#a2av1task).

## A2AV1Task

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/a2a/v1-client.ts)

```typescript theme={null}
export interface A2AV1Task {
    id: string;
    contextId: string;
    status: {
        state: A2AV1State;
        message?: A2AV1Message;
        timestamp?: string;
    };
    history?: A2AV1Message[];
    artifacts?: Array<{
        artifactId: string;
        parts: A2AV1Part[];
        name?: string;
        metadata?: Record<string, unknown>;
    }>;
    metadata?: Record<string, unknown>;
}
```

Related: [`A2AV1Message`](/api-reference/core/a2a#a2av1message), [`A2AV1Part`](/api-reference/core/a2a#a2av1part), [`A2AV1State`](/api-reference/core/a2a#a2av1state).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.