Skip to content

Type Alias: AgentEvent

@kortexya/reasoninglayer


@kortexya/reasoninglayer / AgentEvent

AgentEvent = { changeType: KbChangeType; sort: string; termId: string; type: "kb_change"; } | { actionSort: string; confidence: number; deadline?: string | null; reviewId: string; type: "hitl_request"; } | { actionsExecuted: number; agentId: string; beliefsUpdated: number; pendingReviews: string[]; type: "cycle_complete"; } | { from?: string | null; priority: number; to: string; type: "attention_shift"; } | { goalId: string; result?: string | null; success: boolean; type: "goal_completed"; } | { blockedGoal: string; impasseType: string; recoverySuggestions: string[]; type: "impasse_detected"; } | { agentId: string; timestamp: string; type: "connected"; } | { timestamp: string; type: "heartbeat"; } | { code: string; message: string; type: "error"; }

Defined in: src/types/cognitive.ts:1607

Real-time agent event pushed via WebSocket.

{ changeType: KbChangeType; sort: string; termId: string; type: "kb_change"; }

changeType: KbChangeType

Type of change.

sort: string

Sort of the term.

termId: string

Term ID that changed (UUID).

type: "kb_change"


{ actionSort: string; confidence: number; deadline?: string | null; reviewId: string; type: "hitl_request"; }

actionSort: string

Action sort.

confidence: number

Confidence level.

optional deadline?: string | null

Optional deadline.

reviewId: string

Review ID (UUID).

type: "hitl_request"


{ actionsExecuted: number; agentId: string; beliefsUpdated: number; pendingReviews: string[]; type: "cycle_complete"; }

actionsExecuted: number

Number of actions executed.

agentId: string

Agent ID (UUID).

beliefsUpdated: number

Number of beliefs updated.

pendingReviews: string[]

Any pending reviews from this cycle.

type: "cycle_complete"


{ from?: string | null; priority: number; to: string; type: "attention_shift"; }

optional from?: string | null

Previous focus (UUID), if any.

priority: number

Priority of new focus.

to: string

New focus (UUID).

type: "attention_shift"


{ goalId: string; result?: string | null; success: boolean; type: "goal_completed"; }

goalId: string

Goal ID (UUID).

optional result?: string | null

Optional result message.

success: boolean

Success or failure.

type: "goal_completed"


{ blockedGoal: string; impasseType: string; recoverySuggestions: string[]; type: "impasse_detected"; }

blockedGoal: string

Blocked goal ID (UUID).

impasseType: string

Type of impasse.

recoverySuggestions: string[]

Suggested recovery actions.

type: "impasse_detected"


{ agentId: string; timestamp: string; type: "connected"; }

agentId: string

Agent ID connected to (UUID).

timestamp: string

Server timestamp.

type: "connected"


{ timestamp: string; type: "heartbeat"; }

timestamp: string

Server timestamp.

type: "heartbeat"


{ code: string; message: string; type: "error"; }

code: string

Error code.

message: string

Error message.

type: "error"

9-variant tagged union discriminated by the type field. Events are received through the cognitive agent WebSocket subscription.