Skip to content

bodhi-realtime-agent / Actor

Interface: Actor ​

Defined in: src/runtime/actor-runtime.ts:24

Lifecycle hooks + message handler for an actor.

Properties ​

id ​

readonly id: string

Defined in: src/runtime/actor-runtime.ts:26

Unique actor identity.

Methods ​

onMessage() ​

onMessage(envelope): Promise<void>

Defined in: src/runtime/actor-runtime.ts:32

Handle one envelope. Called serially — no concurrent invocations.

Parameters ​

envelope ​

Envelope

Returns ​

Promise<void>


onStart()? ​

optional onStart(): Promise<void>

Defined in: src/runtime/actor-runtime.ts:29

Called once when the actor is started (before any messages).

Returns ​

Promise<void>


onStop()? ​

optional onStop(reason): Promise<void>

Defined in: src/runtime/actor-runtime.ts:35

Called when the actor is stopped.

Parameters ​

reason ​

string

Returns ​

Promise<void>

Built with VitePress