Type definitions and helper factories conforming to the Agent-to-Agent (A2A) specification v0.3.0. Reuse when building interoperable agent communication interfaces.
// Source: https://github.com/elizaOS/eliza | License: MIT | Copyright 2026 Shaw Walters and elizaOS Contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
* A2A Protocol Types
*
* Type definitions conforming to the A2A specification v0.3.0
* @see https://google.github.io/a2a-spec/
*/
// ===== Core Enums =====
export type TaskState =
| "submitted"
| "working"
| "input-required"
| "auth-required"
| "completed"
| "canceled"
| "failed"
| "rejected";
export type Role = "user" | "agent";
export type PartType = "text" | "file" | "data";
// ===== Part Types =====
interface PartBase {
type: PartType;
metadata?: Record<string, unknown>;
}
export interface TextPart extends PartBase {
type: "text";
text: string;
}
export interface FileWi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key