Humaner Cloud - Agent Brief
Copy this Markdown into an AI coding agent. It contains everything needed to go from zero to a fully deployed Humaner Cloud agent. The only value a human must provide is the public Agent ID.
Instructions for the integrating agent
Your job
Integrate Humaner Cloud into the user's project end-to-end. Ask once for their public Agent ID (and optionally their site domain). Do not ask them to open docs pages or write integration code themselves. Do not set up Self-Host / OSS mode, fork the repo, or configure DATABASE_URL.
- Confirm the target: Humaner Cloud at app.humaner.io (managed agents, Intelligence, Desk, optional Inboxes). If they self-host, stop and use the Self-hosting brief instead.
- Ask for the public Agent ID from Dashboard → Agents → their agent → Integrations. Placeholder in this doc: YOUR_AGENT_PUBLIC_ID.
- Ask for the production hostname(s) that will host the chat (e.g. example.com, www.example.com). Needed for the domain allowlist.
- Pick the right surface (default: Widget). Implement it in their codebase against https://app.humaner.io.
- Tell the user the one dashboard step they must do: add allowed domains under Agents → Integrations → Widget.
- Verify: load the site, open the bubble, send a test message. Optional: force a handoff into Human Desk.
Self-hosting brief: https://docs.humaner.io/oss/agent-brief · Cloud quickstart: https://docs.humaner.io/quickstart · Self-hosting vs Cloud: https://docs.humaner.io/contributing/open-source-vs-cloud
What Humaner Cloud is
Humaner Cloud is a managed customer-support layer: AI agents that answer from the customer's knowledge, Desk escalation (Agent Desk + Human Desk), live chat, optional collaborative Inboxes, and Intelligence (memory, retrieval, auto-training). Inference and retrieval run on Humaner's servers. The integrator only embeds a surface and pastes the Agent ID.
- Agents: personality, knowledge, memory, Skills, guardrails, auto-escalation.
- Desk: Agent Desk, Human Desk / Helpdesk, live chat, runbooks, loops (tiered).
- Inboxes: IMAP / Gmail collaborative mailbox (optional).
- Base URL: https://app.humaner.io — never point Cloud embeds at a self-hosted origin.
- Docs: https://docs.humaner.io
What the human must do (dashboard only)
- 1
Sign up and create an agent
https://app.humaner.io/auth/signup → create an organization → Dashboard → Agents → New. Add site URL, docs, or FAQ as knowledge.
- 2
Copy the public Agent ID
Agents → your agent → Integrations. Copy the public ID (cuid). That is YOUR_AGENT_PUBLIC_ID. Never put API keys in the browser.
- 3
Allowlist production domains
Agents → Integrations → Widget → Allowed domains. Add every hostname that will load the embed (example.com, www.example.com). Leave empty only while testing on localhost.
Agent-ID-only path
Widget, hosted Link, and React talk to Humaner's hosted agent — Humaner, or Self-Host on your own deploy. Custom chats from your own agent and calls Helpdesk over the API. REST API needs a Bearer key (Custom or Humaner).
Choose an integration surface
| Surface | When to use | Needs API key? | Install |
|---|---|---|---|
| Widget | Any website. Fastest path. Default choice. | No | One script before </body> |
| Link | Shareable URL in email, docs, README. Zero install. | No | Share URL only |
| React | React / Next.js apps that want a component. | No | npm i @humaner/react |
| REST API | Fully custom chat UI. Server-side only. | Yes (hm_live_…) | POST /api/v1/chat + SSE |
Default
If unsure, implement the Widget. Same backend for all surfaces.
1. Widget (recommended)
Paste before </body> on every page that should show chat. No API key. Auth = public Agent ID + Origin against the allowlist.
index.html · before </body>
<script
src="https://app.humaner.io/widget.js"
data-agent="YOUR_AGENT_PUBLIC_ID"
data-color="#e0e1df"
data-position="bottom-right"
async
></script>| Attribute | Required | Notes |
|---|---|---|
| data-agent | Yes | Public Agent ID. Attribute name is data-agent (not data-agent-id). |
| data-color | No | Accent hex without or with # |
| data-position | No | bottom-right (default) or bottom-left |
| data-greeting | No | One-off greeting override |
- Handoff to Human Desk is built in when escalation triggers.
- Identify logged-in visitors (optional, Humaner memory): window.Humaner.identify(hashedUserId, metadata).
- Proactive popup: window.Humaner.message(text), or POST /api/v1/widget/proactive after identify.
- CSP: allow script/frame from app.humaner.io, or use Link / API instead.
2. Hosted Link
Zero install. Open or link this URL:
Hosted chat URL
https://app.humaner.io/widget/YOUR_AGENT_PUBLIC_ID?open=1Optional query params: color, pos, host. Text-only surface (no inline product cards). Full handoff still works.
3. React SDK
Terminal
npm install @humaner/reactapp/layout.tsx or a client page
import { HumanerChat } from "@humaner/react";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<HumanerChat
agentId="YOUR_AGENT_PUBLIC_ID"
position="bottom-right"
color="#e0e1df"
/>
</body>
</html>
);
}| Prop | Type | Notes |
|---|---|---|
| agentId | string | Required. Public Agent ID. |
| position | "bottom-right" | "bottom-left" | Bubble position |
| color | string | Accent hex |
| greeting | string | Optional greeting override |
| defaultOpen | boolean | Open panel on mount |
| baseUrl | string | Defaults to https://app.humaner.io. Only override for Self-hosting. |
In Next.js App Router, render HumanerChat from a Client Component ('use client') or a client boundary. Same domain allowlist rules as the Widget.
4. Custom (your agent + Intelligence REST)
When the customer is on Custom
Do not embed Widget, Link, or React — those require Humaner. Stop here and use the dedicated Custom brief: https://docs.humaner.io/custom/agent-brief. Your agent calls POST /api/v1/intelligence/retrieve and POST /api/v1/intelligence/create-ticket with a server-side Bearer key.
- Confirm plan is Custom (not Humaner).
- Create an API key in Dashboard → Settings → Developers.
- From your backend, call /api/v1/intelligence/retrieve before factual answers.
- On escalation, call /api/v1/intelligence/create-ticket with sessionId + summary.
curl · retrieve
curl -X POST https://app.humaner.io/api/v1/intelligence/retrieve \
-H "Authorization: Bearer hm_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "YOUR_AGENT_PUBLIC_ID",
"query": "Where is my order?"
}'5. REST API (Humaner custom UI)
Not Agent-ID-only
Requires Custom or Humaner and a server-side Bearer key (hm_live_…). Never expose the key in the browser. Proxy through your backend.
- Dashboard → Settings → API (or Integrations → REST API) → create key. Shown once.
- Store as HUMANER_API_KEY (or similar) on the server.
- POST messages to /api/v1/chat. Parse SSE.
- On metadata.escalate / handoff, create a ticket via POST /api/v1/handoff/ticket or render your own handoff UI.
curl · chat
curl -N -X POST https://app.humaner.io/api/v1/chat \
-H "Authorization: Bearer hm_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "YOUR_AGENT_PUBLIC_ID",
"message": "Where is my order?",
"sessionId": "sess_abc123"
}'server · chat proxy sketch
const res = await fetch("https://app.humaner.io/api/v1/chat", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HUMANER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
agentId: process.env.HUMANER_AGENT_ID, // YOUR_AGENT_PUBLIC_ID
message,
sessionId,
visitorId, // optional hashed id for memory
}),
});
// Stream res.body as SSE: data: {"delta":"..."} then final event, then [DONE]| Endpoint | Method | Purpose |
|---|---|---|
| /api/v1/chat | POST | Message → SSE stream |
| /api/v1/agents/{publicId} | GET | Greeting + agent config |
| /api/v1/visitors/identify | POST | Link visitor for cross-session memory |
| /api/v1/handoff/ticket | POST | Create Human Desk ticket |
SSE shape: N events with {delta}, one final JSON event (usage, metadata, handoff, suggestions), then data: [DONE]. Auth errors: 401 missing/invalid key or agent; 403 key/org mismatch or origin not allowlisted.
Runtime pipeline (what happens after embed)
Hover to zoom
- Browser embeds never send an API key; Origin must match Allowed domains.
- Knowledge retrieval and model routing are automatic on Cloud.
- Escalation opens Human Desk with summary, urgency, and transcript when configured.
Optional: identify visitors
For cross-session memory (Humaner), pass a stable hashed user id — never raw email or PII in the clear as the id.
After login
// Widget global (when present)
window.Humaner?.identify?.(hashedUserId, { plan: "pro" });
// Or REST: POST https://app.humaner.io/api/v1/visitors/identify
// Body: { agentId, visitorId, metadata } with Bearer keyVerification checklist
- Script/component is on the page with the real Agent ID (not the placeholder).
- Allowed domains include the hostname under test (or empty list for localhost only).
- Chat bubble appears; greeting loads.
- A knowledge-backed question returns a sensible answer.
- If Human Desk is enabled: force an escalation path and confirm a ticket appears in the dashboard.
| Symptom | Fix |
|---|---|
| Bubble missing | Check data-agent / agentId; script src must be app.humaner.io/widget.js; look for console [Humaner] errors. |
| 403 / chat fails | Add the page hostname to Allowed domains. For API, check Bearer key and org match. |
| CSP blocked | Allow app.humaner.io for script-src and frame-src, or use hosted Link / server API. |
Cloud vs Self-hosting
| Capability | Self-hosting | Cloud |
|---|---|---|
| Widget, React SDK, hosted Link | Yes (your deploy) | Humaner only |
| REST API / Helpdesk | Yes | Custom and Humaner |
| Org & team access | Yes | Yes |
| Handoff + Helpdesk | Yes | Yes |
| Agent inference | Your API | Managed |
| Memory + knowledge retrieval | Hybrid RAG (no cloud memory) | Yes (tiered) |
| Agent Desk, runbooks, loops | No | Yes (Custom via API; Loops on Humaner) |
| Inboxes | No | Yes |
Humaner Intelligence (Cloud)
| Node | Short | Availability | What it does |
|---|---|---|---|
| Hybrid RAG | Retrieval | Custom | Hybrid retrieval using semantic vectors and BM25. Custom integrations call it over REST; Native agents retrieve automatically. |
| Memory | Cross-session | Custom | In-session recall on Custom; cross-session memory for identified visitors on Native Humaner agents. |
| Recognition | Who is speaking | Custom | Returning visitors, purchase or account context, each user gets attributed with an unique iD for retrieval. |
| Empathy | Showing care | Native | Native agents encode acknowledgment, tone, and emotional judgment in Skills. Custom keeps voice on your own agent. |
| Auto-Training | Agent keeps learning | Native | Native agents learn from approved Loops and your team behavior to become better over time. |
| Content Gaps | Missing knowledge | Custom | When conversations or agents lack knowledge, gaps surface missing points in your dashboard. |
| Guardrails | Agentic safety | Custom | Answer gates, forbidden topics, and fallback messages. Configure what the agent can and cannot do. |
| Personas | Your brand voice | Native | Casual, Corporate, or Efficient tone on hosted Humaner agents. Custom integrations keep persona on your own agent. |
| Skills | Inner industry knowledge | Native | The How-to framework per industry so Native agents act as expert employees. |
Humaner Desk (Cloud)
| Node | Short | Availability | What it does |
|---|---|---|---|
| Escalation | The handoff path | Custom | When a ticket is requested, or your agent cannot solve the issue, it escalates to your desks. Available to Custom over REST. |
| Desks | Solving issues | Custom | Agent Desk: built for low complexity/urgency tickets. Human Desk: built for critical or complex tickets that need your team. Custom reaches both over the API. |
| Runbooks | Known procedures | Custom | Your business step-by-step procedures for known issues. Custom integrations match them over REST; Native agents follow them in Agent Desk. |
| Loops | Learn new patterns | Native | Loops is Native auto-training for Humaner agents. Learning patterns and problem-solving from your team to get better over time. |
| Async solving | Urgent first | Custom | Everything defined a low complexity/urgency is resolved by agents. Leaving top priority tickets for your team. Custom exposes this over the API. |
| Urgency | Score at handoff | Custom | Priority is computed during escalation through sentiment, wait, account value and topic risk. |
| Live Chat | Real-time handling | Native | When a ticket is created, set a time limit where a team member can join the conversation right away. Native Humaner agents and widget only. |