Light Dark

Functions

broadcast

fn (msg: BroadcastMessage): Map

Broadcast a message to all listening agents.

collaborate

fn (req: CollaborationRequest): Map

Send a collaboration request. Responses arrive at req.reply-event.

respond

fn (req: CollaborationRequest, answer: Str): Map

Respond to a collaboration request.

tell

fn (msg: AgentMessage): Map

Send a targeted message to a specific agent's inbox.

Types

BroadcastMessage

BroadcastMessage type {
    session: Session,
    sender: Identity,
    from-agent: Str,
    topic: Str,
    data: Map
}

A message sent to all agents via fan-out.

CollaborationRequest

CollaborationRequest type {
    session: Session,
    sender: Identity,
    from-agent: Str,
    question: Str,
    reply-event: Str,
    correlation-id: Str,
    context: Map?
}

A request for help from one agent to others, with reply-event and correlation-id for async responses.