Skip to content

Interface: AddAIPeerOptions\<TPresence\>

@roomful/core


@roomful/core / AddAIPeerOptions

Defined in: packages/core/src/ai-peer.ts:189

Configures addAIPeer.

TPresence extends PresenceData = PresenceData

agent: AIPeerAgent<TPresence>

Defined in: packages/core/src/ai-peer.ts:191

The brain — decides the peer’s actions each tick.


optional identity: Omit<AgentIdentity, "kind">

Defined in: packages/core/src/ai-peer.ts:198

Declares the agent’s role and disclosure. The peer is always stamped as an AI agent (so every peer can detect it via isAgentPeer); this adds the optional role/disclosure.


optional observeEvents: string[]

Defined in: packages/core/src/ai-peer.ts:206

Event channel names to buffer and surface to the agent via context.events.


optional presence: TPresence

Defined in: packages/core/src/ai-peer.ts:193

The peer’s initial presence (name, color, custom fields).


optional recordActions: boolean

Defined in: packages/core/src/ai-peer.ts:213

Auto-records the agent’s semantic actions (events it emits, presence patches it applies) into the room’s activity feed, so every peer has an auditable log via getAgentActions. Its cursor and state are continuous status, not discrete actions, so they are not logged — call context.recordAction for anything else you want on the record. Defaults to false.


optional relayUrl: string

Defined in: packages/core/src/ai-peer.ts:202

The relay URL, when joining over websocket.


optional tickMs: number

Defined in: packages/core/src/ai-peer.ts:204

How often (ms) the agent runs. Defaults to 1200.


optional transport: TransportMode

Defined in: packages/core/src/ai-peer.ts:200

The transport to join on. Match the human room’s transport.