Task: Connect an AI agent to websites
Connect an AI agent to websites
Create a simple way to connect our websites to the central service.
Implement client-side integration for our websites: a visitor opens a chat on the site, messages are sent to the central agent, and responses are returned to the website interface. Connecting a new website should require minimal manual configuration.
Ворклоги
Integration of the existing website with the new agent center
Compatibility with the old chat interface of the neighboring agent project has been implemented:
- via
CHAT_AGENT_URL, the chat can be routed to the new agent, while without configuration, the previous path to n8n is preserved; - the adapter converts old client messages into new agent events;
started/delta/doneresponses are converted back to the oldbegin/item/endformat;- sliced UTF-8/JSON fragments, errors, incomplete streams, slow clients, and consumer disconnections are handled;
- related changes:
be06299,4fe6d85,c2a8ded.
Re-passed 3/3 local adapter tests.
Current limitations: this is a verification integration via the old interface, not a dedicated new embeddable widget. sessionId, the user token, and the page URL are not yet passed to the new agent; there is no visitor memory/context. The old website on port 3000 was not running during the last check, so a live end-to-end test through it was not re-verified.