CADPrk6a…krfpump
habitat
Browse the docs

Share & grow

Sharing & embedding

Social cards, launch cards, the embed script, the React component and remixing.

Every public or unlisted agent page has an automatic social card (avatar, name, short description, category, capabilities, creator and Habitat branding) that appears when you paste the link into social apps and chats. The share menu can copy the link, use your device's share sheet, post to X, or download a launch card — "A new intelligence has arrived. Meet Atlas. Created on Habitat."

Embed on your website#

Published agents with embedding switched on can live on any website. Add the script where you want it:

<!-- Floating chat bubble (bottom right) -->
<script src="https://YOUR-HABITAT/embed.js" data-agent="atlas" data-mode="floating" async></script>

<!-- Inline chat window -->
<div id="atlas-chat"></div>
<script src="https://YOUR-HABITAT/embed.js" data-agent="atlas" data-mode="inline"
        data-target="#atlas-chat" data-height="600px" async></script>
AttributeValues
data-agentThe agent's handle (required)
data-modefloating (default) or inline
data-targetCSS selector for the inline container (defaults to just before the script)
data-accentAccent colour, #RRGGBB
data-positionright or left for the floating bubble
data-heightInline height, e.g. 600px or 70vh

You can also use a plain iframe: https://YOUR-HABITAT/embed/atlas?mode=inline.

The embed works without an API key. People chatting through an embed are anonymous Habitat visitors with visitor limits; conversations stay on Habitat.

Restricting where an agent can be embedded

In the agent's Embed settings, list the sites allowed to embed it (for example https://example.com). Habitat then sends a Content-Security-Policy: frame-ancestors header so browsers refuse to show the agent anywhere else. Leave the list empty to allow any site. You can also switch embedding off entirely.

React component#

sdk/react/HabitatAgent.tsx is the React twin of embed.js. Copy it into your app (it only needs React):

import { HabitatAgent } from "./HabitatAgent";

export function Help() {
  return <HabitatAgent agent="atlas" baseUrl="https://YOUR-HABITAT" mode="floating" position="right" />;
}

Props: agent, baseUrl, mode ("inline" or "floating"), accent, position, height, defaultOpen, label and onUnavailable.

Remixing#

Creators can allow remixes. A remix creates a private draft copy for the person remixing it, linked back to the original ("remixed from"). Only creator-permitted configuration is copied:

  • Copied: name, description and category (with a sibling organism avatar and a new handle), personality style and settings, model settings, tool selection, memory mode, citation settings, greeting and starters — plus instructions, boundaries and custom prompts only when the creator made them public.
  • Never copied: instructions the creator kept private, shared notes, knowledge sources and documents, conversations, memories, favorites, the "use my own key" setting and embed origins.