Methods
run
Run the Agent from client-side
The run method is the primary way to interact with an agent. It initiates the agent’s processing based on the provided inputs and returns the generated textual response.
Agents can call client-side actions that are defined and executed on client-side. check addClientAction
Arguments
Takes one argument passed as an object with the following properties:
Specifies the input properties for the agent run. It should be an object adhering to the Inputs structure.
Allows you to provide a Hooks object to establish real-time communication channels with the agent during its processing (using HTTP streaming).
Response
The run method returns a Promise that resolves to an AgentResponse object upon successful agent run completion. This object contains the agent’s generated response and other relevant information about the run.
Was this page helpful?
Suggest editsRaise issue