Interface AgentRequest

A request expecting a response.

interface AgentRequest {
    messageId: string;
    fromAgentId: string;
    fromRoleId?: string;
    toAgentId?: string;
    toRoleId?: string;
    agencyId?: string;
    content: string | Record<string, unknown>;
    priority: MessagePriority;
    sentAt: Date;
    expiresAt?: Date;
    inReplyTo?: string;
    threadId?: string;
    metadata?: Record<string, unknown>;
    requiresAck?: boolean;
    type: "task_delegation" | "question" | "critique";
    timeoutMs?: number;
}

Hierarchy

Properties

messageId: string

Unique message identifier

fromAgentId: string

Sender agent ID

fromRoleId?: string

Sender's role in the agency

toAgentId?: string

Target agent ID (null for broadcasts)

toRoleId?: string

Target role (for role-based routing)

agencyId?: string

Agency context

content: string | Record<string, unknown>

Message content

priority: MessagePriority

Message priority

sentAt: Date

Timestamp when sent

expiresAt?: Date

Expiration time for time-sensitive messages

inReplyTo?: string

If this is a reply, the original message ID

threadId?: string

Thread/conversation ID for related messages

metadata?: Record<string, unknown>

Additional metadata

requiresAck?: boolean

Whether delivery confirmation is required

type: "task_delegation" | "question" | "critique"

Request type (subset of message types)

timeoutMs?: number

Timeout for response in ms