Agent
Agent
The Agent
is an object that contains all of your agent’s functionality. Must be assigned to a
variable named agent
.
Example Usage
Fields
The ID of your agent. You can retrieve it from Jay’s dashboard. This field can be shared publicly.
An asynchronous function that’s that runs at the beginning of every session. For details, see the Configure Session reference.
An asynchronous function that’s that’s responsible for returning the LLM’s response. For details, see the LLM Response Handler reference.
A list of “tools” (i.e. function calls) that your LLM can invoke to connect to external data and systems. Each item in this array is an asynchronous function. For details, see the Function Calling guide.
An asynchronous function that’s called when the user starts speaking. For details, see the Event Handlers reference.
An asynchronous function that’s called when the user stops speaking. For details, see the Event Handlers reference.
An asynchronous function that’s called when the agent begins speaking. For details, see the Event Handlers reference.
An asynchronous function that’s called when the agent finishes speaking. For details, see the Event Handlers reference.
An asynchronous function that’s called when the user’s message is added to the chat history during the session. For details, see the Event Handlers reference.
An asynchronous function that’s called when the agent’s message is added to the chat history during the session. For details, see the Event Handlers reference.
An asynchronous function that’s called if the agent is interrupted by the user while speaking. For details, see the Event Handlers reference.
An asynchronous function that’s called when Jay receives the complete set of functions to execute from the LLM. For details, see the Event Handlers reference.
An asynchronous function that’s called after Jay has executed all the functions the model requested. For details, see the Event Handlers reference.