Your server
Next.js, FastAPI, Go — whatever you already run. It authenticates the user, then forwards the request.
Headless by design
Keep your frontend and domain APIs. Add SyntheticBrew as a headless agent runtime through standard HTTP and structured server-sent events.
Where it sits in your stack
SyntheticBrew is headless by design. Your server handles authentication, then forwards requests — the engine reasons, calls tools, and streams typed events back. The whole runtime is one Go binary plus PostgreSQL: two containers, nothing exotic to operate.
Next.js, FastAPI, Go — whatever you already run. It authenticates the user, then forwards the request.
One POST to /api/v1/agents/{name}/chat with the message and a stable session ID.
One Go binary + PostgreSQL. It reasons, delegates, executes tools server-side, and persists the session.
OpenAI, Anthropic, Google Gemini, Azure OpenAI, Ollama, OpenRouter — or any OpenAI-compatible provider such as DeepSeek and Mistral.
The response flows the other way as a structured SSE stream your UI renders as native progress. If you are weighing this against assembling the stack yourself, start with how to build an AI agent or the SyntheticBrew vs LangChain comparison.
The whole integration
Your frontend sends one message. The runtime reasons, delegates, calls tools, waits for confirmation when required, persists the session, and streams every step back as a typed event — no client-side tool executor, no polling.
// Your product sends one request data: {"type":"thinking"} data: {"type":"tool_call","tool":"order.lookup"} data: {"type":"tool_result","status":"completed"} data: {"type":"message_delta","content":"Your order…"} data: {"type":"done","session_id":"sess_abc"}
Fastest path to production
The widget generator turns an agent into an embeddable chat in three steps: pick a schema, customize the look, copy one script tag — chat is live on your site.
frame-ancestors CSP means your widget only loads on domains you approved — nobody can iframe your agent onto their site.Three ways in
Pick the surface that matches how much UI you want to own — all three run against the same engine, sessions, and security model.
Generated, Shadow-DOM-isolated chat added with a single script tag. Zero frontend work; theming and origin control included.
Full control: POST a message, render the typed event stream as native UI in web, mobile, or backend clients. An included web client shows the pattern end to end.
Connect your APIs as tools the agents call server-side — or point your coding agent at the engine and build against it directly.
This is the integration path SaaS and product teams use to ship agent features without replacing their frontend, auth, or domain APIs.
Questions
Yes. The integration surface is standard HTTP plus server-sent events, so any client that can POST a request and read an SSE stream works — iOS, Android, React Native, Flutter, or a backend service. No platform-specific SDK is involved.
Yes. The widget generator lets you pick a schema, customize the appearance, and copy a single script tag. The widget renders inside a Shadow DOM, so its styles never collide with your page’s CSS — and your CSS never breaks the widget.
Through stable session IDs. Your product passes a session ID with each request and the runtime maintains the conversation state — history, memory, context — server-side. Returning users pick up exactly where they left off, on any surface.
No. The entire integration is a REST API and structured SSE — the done event even returns the session ID for your next request. If your stack can call an HTTP endpoint and parse JSON lines, it can run a SyntheticBrew agent.
Keep exploring
One POST, one event stream, one script tag if you want the shortcut — try it against Cloud or a local engine in minutes.