Self-hosted
You can subclass aRespondAgent
to create a simple agent that can be passed into StreamingConversation
has the following interface:
Here’s one that responds with the same message no matter what is said to it:
Hosted (deprecated)
NOTE: The hostedRESTfulAgent
is being deprecated.
Our library lets you easily host your agent so that the Vocode backend can use it to generate responses.
Users will be responsible for implementing a RESTfulAgent
.
RESTful Implementation (deprecated)
Here is an example implementation of aRESTfulAgent
that just echoes back whatever
input it receives. Note that the respond
method is expecting a RESTfulAgentOutput
return value.
The conversation_id
parameter lets you store state about a single conversation across multiple calls.
Run your agent
/respond
.
We’ll use this in the next step.