Function: getAgentState()
@roomful/core / getAgentState
Function: getAgentState()
Section titled “Function: getAgentState()”getAgentState<
TPresence>(peer):AgentState|null
Defined in: packages/core/src/ai-peer.ts:98
Reads a peer’s live AgentState from its presence, or null when absent or malformed.
Type Parameters
Section titled “Type Parameters”TPresence
Section titled “TPresence”TPresence extends PresenceData = PresenceData
Parameters
Section titled “Parameters”Peer<TPresence>
The peer to inspect.
Returns
Section titled “Returns”AgentState | null
The agent’s current state, or null.