Agent
Represents a CCAI Agent instance.
Constructors
constructor
Parameters
agentId:
string
region:
string
Optional
Methods
addEventListener
addEventListener(event: , callback: Function
): void
Adds a handler for the specified CCAI.Events.Agent event. Use only functions as handlers; anything except a function leads to an error and scenario termination when a handler is called
Parameters
event:
Event class (i.e., CCAI.Events.Agent.Started)
callback:
Function
Callback function to execute
Returns
type:
void
destroy
destroy(): void
Destroys a CCAI Agent instance.
Returns
type:
void
removeEventListener
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified CCAI.Events.Agent event
Parameters
event:
Event class (i.e., CCAI.Events.Agent.Started)
callback:
Function
OptionalCallback function to execute. If not specified, all event listeners are removed
Returns
type:
void