Embed your agent on a web site
You can embed your agent on other sites with an IFRAME
SteamshipWidgetTransport Mixin (opens in a new tab) to give your agent a web-based widget you can interact with.
A full working example is here (opens in a new tab).
You can copy and paste this agent into your
api.py file or use it as a reference.
A Mixin is just a way to add a bundle of functionality to your
AgentService. Mixins can include new API endpoints, async processing pipelines, and webhooks.
SteamshipWidgetTransportto the static
USED_MIXIN_CLASSESlist in your AgentService
SteamshipWidgetTransportin your AgentService
self.add_mixin(SteamshipWidgetTransport(self.client, self, self.agent))
That will take you to a web page that contains a chat window as well as other management tools for your agent.
At the top-right, you will find an Embed widget with instructions for placing this chat window on other web pages.