Agent
A dynamic component for managing and rendering agent-based interactions with configurable widget display and debugging capabilities.
Agent is available in UI component using:
let agent = component.getAgent();
Agent is available in agent component using:
let agent = this.agent;
To debug agent code:
lib/components-ui2/taskAgent/agent.jsTo debug event handler code of UI Component:
lib/components-ui2/base-component.js - handleEvent method
Fields
Name | Code | Data Type | Description |
|---|---|---|---|
Data |
| object | Agent data |
Agent ID |
| String | Id of agent |
Saved |
| boolean | |
Parent |
| Agent | Returns parent agent that started this agent |
Methods
Name | Description |
|---|---|
| Returns widgets loaded during this agent's flow |
| Emit an event |
| Retrieve a component in the agent process flow |
| Loads a sub-agent and pushes it onto the stack |
| Ends the agent. If a parent agent exists, this agent is removed from the stack, and the parent becomes active |
| Retrieve the currently active agent |
| Saves agent data. Every field in the data is stored separately in the database |
| Asynchronously saves the agent and all its unsaved data |
Events
No events available for this component.