Light Dark

Functions

AgentMessage alias

Alias of ::ai::message/AgentMessage

Identity alias

Alias of ::ai::session/Identity

Session alias

Alias of ::ai::session/Session

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.

ns alias

Alias of ::ai::bus/

Typed inter-agent event bus. All messages carry Session + Identity. Supports targeted (tell), broadcast, and collaboration patterns.

respond

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

Respond to a collaboration request.

tell

fn (msg: ::ai::message/AgentMessage): Map

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

Types

BroadcastMessage

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

A message sent to all agents via fan-out.

CollaborationRequest

CollaborationRequest type {
    session: ::ai::session/Session,
    sender: ::ai::session/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.