Skip to main content

Protocol Types

Type definitions for ARC Protocol.

Message

interface Message {
role: "user" | "agent";
parts: MessagePart[];
}

MessagePart

interface TextPart {
type: "text";
content: string;
}

interface ToolCallPart {
type: "tool_call";
toolCallId: string;
name: string;
parameters: Record<string, any>;
}

interface ToolResultPart {
type: "tool_result";
toolCallId: string;
result: any;
}

type MessagePart = TextPart | ToolCallPart | ToolResultPart;

Task

interface Task {
taskId: string;
status: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "FAILED" | "CANCELLED";
message?: Message;
}

Chat

interface Chat {
chatId: string;
status: "ACTIVE" | "ENDED";
message: Message;
}

Full Schemas

View complete type definitions: