run
Run the Agent
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 response.
Arguments
Takes one argument passed as an object with the following properties:
Used to specify the input properties for the agent run. It should be an object adhering to the Inputs
structure.
You can pass a text message, list of audio files, and a list of images.
Used to specify the run options, like the session ID, run ID, voice output, and some other options.
Allows you to provide a Hooks object
to establish real-time communication channels with the agent during its processing.
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.