Overview
TQEN Agent is the live communication workspace. The public product currently demonstrates a website support workspace connected to the TQEN Engine.
Quick Start
- Open the Demo Hub.
- Choose Customer Support.
- Send a message in English, Arabic or Turkish and observe the real workflow events emitted for that request.
Architecture
The browser sends a message to a Next.js server route. That route keeps development credentials server-side and streams the engine response back to the browser. The workspace renders safe response text and only the events the engine emits.
Browser → Next.js support proxy → TQEN Engine stream → Support workspace
Website Integration
Use the website workspace for a browser-based support experience. Keep backend credentials on the server; the browser should send only the conversation identifier, customer identifier and message.
The public implementation persists the conversation identifiers in browser session storage, so a refresh can continue the same browser session without creating a public account system.
API Reference
The browser-facing endpoint is POST /api/demo/support. It accepts JSON and returns a server-sent event stream.
POST /api/demo/support
Content-Type: application/json
{
"conversation_id": "session-conversation-id",
"customer_id": "session-customer-id",
"message": "What are your pricing plans?"
}SSE Event Reference
Each event is framed as SSE. The workspace uses the event name and safe JSON data to update visible state. It does not fabricate missing retrieval or tool stages.
event: response.delta
data: {"type":"response.delta","payload":{"text":"Here is how…"}}
event: response.completed
data: {"type":"response.completed","payload":{"intent":"faq"}}| Event | Workspace behavior |
|---|---|
| request.started | The browser message reached the engine. |
| request.validated | The request passed the engine’s validation stage. |
| memory.loaded | Conversation context was emitted as loaded. |
| intent.detected | The engine emitted an intent result. |
| retrieval.started | Business-knowledge retrieval began. |
| retrieval.completed | Business-knowledge retrieval completed. |
| response.started | The response stage began. |
| response.delta | Safe assistant text arrived in payload.text. |
| response.completed | The request completed successfully. |
| request.failed | The request failed; the workspace displays a safe recovery message. |
response.delta.payload.text appends to the active assistant message. response.completed is terminal success; request.failed produces a safe recovery message.
Knowledge Base Setup
Business knowledge is retrieved from Qdrant-backed collections. Keep content current, scoped to the intended business and reviewed for accuracy before it enters a live workflow.
Adaptive Style Memory
Style examples help TQEN adapt the form of a response while preserving the underlying business answer. Treat examples as reviewed communication guidance, not as a replacement for business policy.
Google Calendar Setup
Scheduling requires a configured Google Calendar integration and an available workflow. Confirm the intended calendar and keep credentials server-side before enabling actions. The public workspace only displays the event URL the engine returns; event details remain in Google Calendar.
Environment Variables
Configure public website settings separately from server-only engine settings. Do not expose service credentials through browser-prefixed variables or client code.
NEXT_PUBLIC_SITE_URL=https://your-domain.com
NEXT_PUBLIC_CONTACT_EMAIL=hello@your-domain.com
NEXUS_BACKEND_URL=http://127.0.0.1:8000
NEXUS_DEVELOPMENT_API_KEY=replace-with-server-only-keySecurity
The public demo keeps the engine key in the server proxy and presents safe error messages instead of provider details. Production access controls, retention and deployment requirements should be assessed for each engagement.
Troubleshooting
If the workspace cannot start, confirm the server can reach the streaming engine and that the server-only variables are configured. If a stream stops, check safe server logs and ensure the engine emits a terminal completion or failure event. Do not retry a failed action request automatically, because that could duplicate an external Calendar action.