Headless by design

AI agent API for your existing product

Keep your frontend and domain APIs. Add SyntheticBrew as a headless agent runtime through standard HTTP and structured server-sent events.

  • AI agent API
  • AI integration platform
  • embed AI agent
  • AI product integration

Where it sits in your stack

AI agent API architecture: your server stays in front

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.

Your server

Next.js, FastAPI, Go — whatever you already run. It authenticates the user, then forwards the request.

REST API

One POST to /api/v1/agents/{name}/chat with the message and a stable session ID.

SyntheticBrew Engine

One Go binary + PostgreSQL. It reasons, delegates, executes tools server-side, and persists the session.

Any LLM

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

AI agent API: one POST request, a stream of typed events

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.

  • Standard REST request from any language
  • Structured server-sent events with keep-alive
  • Stable session IDs for conversation continuity
POST /api/v1/agents/support/chattext/event-stream
// 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

Embed AI agent chat with one script tag

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.

  • Shadow DOM isolation. The widget’s styles cannot leak into your page, and your page’s CSS cannot break the widget.
  • Origin enforcement. A per-tenant frame-ancestors CSP means your widget only loads on domains you approved — nobody can iframe your agent onto their site.
  • Full event fidelity. The widget renders the same typed stream as your custom UI: tool calls, confirmations, sub-agent work, structured output.
Pick a schema, customize the look, copy one script tag — chat is live

Three ways in

AI integration platform surfaces: widget, REST + SSE, MCP

Pick the surface that matches how much UI you want to own — all three run against the same engine, sessions, and security model.

Embeddable widget

Generated, Shadow-DOM-isolated chat added with a single script tag. Zero frontend work; theming and origin control included.

REST API + SSE

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.

REST API integration guide →

MCP tools

Connect your APIs as tools the agents call server-side — or point your coding agent at the engine and build against it directly.

Connect a coding agent →

This is the integration path SaaS and product teams use to ship agent features without replacing their frontend, auth, or domain APIs.

Questions

AI product integration: common questions

Can I integrate from a mobile app?

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.

Can the chat widget match my product’s look?

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.

How are conversation sessions handled?

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.

Do I need an SDK?

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

AI product integration pairs with these capabilities

Add the agent. Keep your stack.

One POST, one event stream, one script tag if you want the shortcut — try it against Cloud or a local engine in minutes.