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.

  1. 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.
  2. Ask for the public Agent ID from Dashboard → Agents → their agent → Integrations. Placeholder in this doc: YOUR_AGENT_PUBLIC_ID.
  3. Ask for the production hostname(s) that will host the chat (e.g. example.com, www.example.com). Needed for the domain allowlist.
  4. Pick the right surface (default: Widget). Implement it in their codebase against https://app.humaner.io.
  5. Tell the user the one dashboard step they must do: add allowed domains under Agents → Integrations → Widget.
  6. 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. 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. 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. 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

SurfaceWhen to useNeeds API key?Install
WidgetAny website. Fastest path. Default choice.NoOne script before </body>
LinkShareable URL in email, docs, README. Zero install.NoShare URL only
ReactReact / Next.js apps that want a component.Nonpm i @humaner/react
REST APIFully 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>
AttributeRequiredNotes
data-agentYesPublic Agent ID. Attribute name is data-agent (not data-agent-id).
data-colorNoAccent hex without or with #
data-positionNobottom-right (default) or bottom-left
data-greetingNoOne-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.

3. React SDK

Terminal

npm install @humaner/react

app/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>
  );
}
PropTypeNotes
agentIdstringRequired. Public Agent ID.
position"bottom-right" | "bottom-left"Bubble position
colorstringAccent hex
greetingstringOptional greeting override
defaultOpenbooleanOpen panel on mount
baseUrlstringDefaults 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.

  1. Confirm plan is Custom (not Humaner).
  2. Create an API key in Dashboard → Settings → Developers.
  3. From your backend, call /api/v1/intelligence/retrieve before factual answers.
  4. 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.

  1. Dashboard → Settings → API (or Integrations → REST API) → create key. Shown once.
  2. Store as HUMANER_API_KEY (or similar) on the server.
  3. POST messages to /api/v1/chat. Parse SSE.
  4. 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]
EndpointMethodPurpose
/api/v1/chatPOSTMessage → SSE stream
/api/v1/agents/{publicId}GETGreeting + agent config
/api/v1/visitors/identifyPOSTLink visitor for cross-session memory
/api/v1/handoff/ticketPOSTCreate 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 key

Verification checklist

  1. Script/component is on the page with the real Agent ID (not the placeholder).
  2. Allowed domains include the hostname under test (or empty list for localhost only).
  3. Chat bubble appears; greeting loads.
  4. A knowledge-backed question returns a sensible answer.
  5. If Human Desk is enabled: force an escalation path and confirm a ticket appears in the dashboard.
SymptomFix
Bubble missingCheck data-agent / agentId; script src must be app.humaner.io/widget.js; look for console [Humaner] errors.
403 / chat failsAdd the page hostname to Allowed domains. For API, check Bearer key and org match.
CSP blockedAllow app.humaner.io for script-src and frame-src, or use hosted Link / server API.

Cloud vs Self-hosting

CapabilitySelf-hostingCloud
Widget, React SDK, hosted LinkYes (your deploy)Humaner only
REST API / HelpdeskYesCustom and Humaner
Org & team accessYesYes
Handoff + HelpdeskYesYes
Agent inferenceYour APIManaged
Memory + knowledge retrievalHybrid RAG (no cloud memory)Yes (tiered)
Agent Desk, runbooks, loopsNoYes (Custom via API; Loops on Humaner)
InboxesNoYes

Humaner Intelligence (Cloud)

NodeShortAvailabilityWhat it does
Hybrid RAGRetrievalCustomHybrid retrieval using semantic vectors and BM25. Custom integrations call it over REST; Native agents retrieve automatically.
MemoryCross-sessionCustomIn-session recall on Custom; cross-session memory for identified visitors on Native Humaner agents.
RecognitionWho is speakingCustomReturning visitors, purchase or account context, each user gets attributed with an unique iD for retrieval.
EmpathyShowing careNativeNative agents encode acknowledgment, tone, and emotional judgment in Skills. Custom keeps voice on your own agent.
Auto-TrainingAgent keeps learningNativeNative agents learn from approved Loops and your team behavior to become better over time.
Content GapsMissing knowledgeCustomWhen conversations or agents lack knowledge, gaps surface missing points in your dashboard.
GuardrailsAgentic safetyCustomAnswer gates, forbidden topics, and fallback messages. Configure what the agent can and cannot do.
PersonasYour brand voiceNativeCasual, Corporate, or Efficient tone on hosted Humaner agents. Custom integrations keep persona on your own agent.
SkillsInner industry knowledgeNativeThe How-to framework per industry so Native agents act as expert employees.

Humaner Desk (Cloud)

NodeShortAvailabilityWhat it does
EscalationThe handoff pathCustomWhen a ticket is requested, or your agent cannot solve the issue, it escalates to your desks. Available to Custom over REST.
DesksSolving issuesCustomAgent 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.
RunbooksKnown proceduresCustomYour business step-by-step procedures for known issues. Custom integrations match them over REST; Native agents follow them in Agent Desk.
LoopsLearn new patternsNativeLoops is Native auto-training for Humaner agents. Learning patterns and problem-solving from your team to get better over time.
Async solvingUrgent firstCustomEverything defined a low complexity/urgency is resolved by agents. Leaving top priority tickets for your team. Custom exposes this over the API.
UrgencyScore at handoffCustomPriority is computed during escalation through sentiment, wait, account value and topic risk.
Live ChatReal-time handlingNativeWhen a ticket is created, set a time limit where a team member can join the conversation right away. Native Humaner agents and widget only.