Interface: AddAIPeerOptions\<TPresence\>
@roomful/core / AddAIPeerOptions
Interface: AddAIPeerOptions<TPresence>
Section titled “Interface: AddAIPeerOptions<TPresence>”Defined in: packages/core/src/ai-peer.ts:189
Configures addAIPeer.
Type Parameters
Section titled “Type Parameters”TPresence
Section titled “TPresence”TPresence extends PresenceData = PresenceData
Properties
Section titled “Properties”agent:
AIPeerAgent<TPresence>
Defined in: packages/core/src/ai-peer.ts:191
The brain — decides the peer’s actions each tick.
identity?
Section titled “identity?”
optionalidentity: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.
observeEvents?
Section titled “observeEvents?”
optionalobserveEvents:string[]
Defined in: packages/core/src/ai-peer.ts:206
Event channel names to buffer and surface to the agent via context.events.
presence?
Section titled “presence?”
optionalpresence:TPresence
Defined in: packages/core/src/ai-peer.ts:193
The peer’s initial presence (name, color, custom fields).
recordActions?
Section titled “recordActions?”
optionalrecordActions: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.
relayUrl?
Section titled “relayUrl?”
optionalrelayUrl:string
Defined in: packages/core/src/ai-peer.ts:202
The relay URL, when joining over websocket.
tickMs?
Section titled “tickMs?”
optionaltickMs:number
Defined in: packages/core/src/ai-peer.ts:204
How often (ms) the agent runs. Defaults to 1200.
transport?
Section titled “transport?”
optionaltransport:TransportMode
Defined in: packages/core/src/ai-peer.ts:200
The transport to join on. Match the human room’s transport.