API Reference
Reference documentation for Ponder’s Web SDK
Installation
Install the Ponder web sdk using NPM
npm install @ponderai/web
Ponder
The Ponder
class is the main class that exposes all Ponder’s functionality
Params
the id of the assistant that is created on the dashboard
url of the Ponder backend, usually https://api.useponder.ai unless self hosted
instructions for the agent, these get added to the system prompt from the dashboard
a list of actions / function the agent can call. format is the same as react sdk - refer it for schema
Properties
starts a web call
stops a web call
callback function called when the call is connected and the agent is listening
callback function called when the call is disconnected and the agent is no longer listening
callback function for whenever user speech start is detected
does not have any arguments
callback function for whenever user is done speaking
does not have any arguments
callback for whenever there is a new message added to the conversation
for example when the user’s speech is transcribed, or when the agent’s response is recieved
callback for whenever the agent decides to call a function
has the name
- function name and args
- arguments of the function as parameters