Skip to content

agent

Interfaces

Interface Description
AgentErrorContext -
AgentMessageContext -
RineAgent -

Type Aliases

Type Alias Description
AgentHandler User-supplied message handler. Called once per decrypted, non-reserved, schema-passing message. A throw is caught and routed to onError({ stage: 'handler' }) — the agent keeps running. When defineAgent<T>({ schema }) is used, msg.plaintext is narrowed to T | null.
DefineAgentOptions Options bag for defineAgent(). The discriminated union enforces that callers supply exactly one of handlers (type-routed dispatch dict, optionally with a "*" catch-all) OR onMessage (single handler for every non-reserved message) — passing both is a TypeScript error.

Functions

Function Description
defineAgent -