Back to Blog
Blog

Announcing the Cosmic AI Support Agent

The Cosmic AI Support Agent puts a chat agent on your website with one script tag. It answers from the content your site already publishes, in your branding, and passes the question to a person when it is not sure.

We built it for ourselves first. Leo, the support agent on cosmicjs.com, answers questions about Cosmic from our docs, our knowledge base articles, and the pages that make up the rest of the site. When Leo can't help, the visitor leaves an email and the question. It lands in our support inbox, and the visitor gets a confirmation that someone will follow up.

Once Leo was working, we made it something any Cosmic project can add. You can talk to Leo right now, no signup needed.

<script src="https://www.cosmicjs.com/agent.js" data-key="pk_your_key" async> </script>
ai-support-agent.png

What's New

  • A Website tab on every Agent. Turn it on, add the sites allowed to load the script, set the inbox for handoffs, and copy the snippet with your key already filled in. That is the whole install.

  • Answers drawn from live content. The agent reads the same content your site renders. There is no snapshot to re-upload and no separate knowledge base to maintain alongside the pages you already publish.

  • A publishable key, locked to your domains. The data-key is safe to put in public HTML. It only works on the websites you allow, so a copied snippet does nothing on someone else's page.

  • Your name, your color, your greeting. Set the agent's role, a short list of suggested questions, the accent color, and which corner it sits in. Those live on the Agent, so changing them shows up on your site without a deploy of your app.

  • A human handoff instead of a guess. When the visitor wants a person, they leave an email and the question. It arrives in your inbox with their address as the reply-to, so you answer straight from your email. The visitor gets a confirmation, and each question is also saved to a Support questions Object Type in your Bucket.

  • A daily spend cap. Set how many tokens the website agent can use per day. The default is 500,000.

  • The same Agent on other channels. It also takes messages over the REST API and an inbound webhook. The website script is the one your visitors see.

ai-support-agent-config.png

Why This Matters

Most website chat widgets are a second product. You write a help center, you keep it updated, and the bot still answers from a copy of the site that went stale last quarter. The page the visitor is reading and the answer in the chat drift into two different sources of truth, and the visitor is the one who finds out.

An agent reading your live content closes that gap by removing the copy. Publish a pricing change, correct a doc, rename a feature, and the next question gets the current answer. The content team already owns that work, and nobody has to remember a second place to go update.

The handoff matters just as much. A support agent that invents an answer costs more than having no agent at all, because a confident wrong answer gets believed and acted on. Cosmic's agent is told to say when it is not sure instead of guessing, and to offer the visitor a person.

How It Works

  1. Open an Agent and go to the Website tab.

  2. Turn the website channel on and add the domains allowed to load the script.

  3. Set the inbox that receives handoffs, then set the name, color, greeting, suggested questions, and corner.

  4. Copy the snippet and paste it into your HTML before the closing </body> tag.

Notes:

  • The key in the snippet is publishable. Keep write keys on the server as always.

  • Branding and greeting changes take effect without redeploying your site.

  • Handoff emails go to the inbox set on the Website tab, so point it at a monitored address before you turn it on.

Get Started

Give your AI agents a content backend they can write to

Structured, versioned content objects, a REST API and TypeScript SDK, and an MCP server your coding agent connects to directly. The Free plan includes 1 Bucket, 1,000 Objects, and 1 agent. No credit card required.