Contexts
Contexts are not yet implemented and will be part of a future release.
Contexts are as the name suggests the context of a conversation. You can create a context for a conversation to allow your agent to remember relevant information of past messages or other interactions that happened. They allow for more natural and human-like conversations.
Creating a Context
Contexts are created via the API for a specific agent. Make sure to save context ids in your database to be able to reference them later.
Using a Context
Contexts can be passed to message requests via the API. They work for both realtime and asynchronous message requests. Using contexts is not mandatory but will enhance the conversation and make it more natural.
Referencing the same context for a conversation will make it better over time and make the conversation more natural. It is important to note that contexts are tied to agents and the concept of a conversation only exists on your end. Therefore, if you reference the wrong context in a conversation with the same agent, the agent might refer to things that are not part of the conversation. This can lead to unexpected results.
Make sure to always reference the correct context.
Updating a Context
There is no need to update contexts. Contexts are automatically updated when you reference them in a message request. They get better over time and make the conversation more natural.