Implementation Recipes

Cookbook for Product Integration

ACME-style sample recipes that show how teams can add emotional intelligence to real products: support UX, adaptive interfaces, robotics, music, and segmentation.

Coming Soon: Website self-serve billing checkout and key/account portal. Runtime payment enforcement is handled by the API.

Container style

Recipe Set

Fun + Practical Solution Recipes

Recipe A: ACME Support Copilot

Use RealRuntime before every assistant turn to enforce scope + usage and choose a calmer tone for angry users.

// ACME Helpdesk service
const verify = await fetch(`${API_BASE}/v1/auth/verify`, {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    api_key,
    required_scope: "realflow:stream",
    consume: true,
    units: 1,
    metadata: { product: "acme-helpdesk", use_case: "support-copilot" }
  })
}).then(r => r.json());

if (!verify.allowed) return deny(verify.reason);
// continue with provider call + de-escalation prompt policy

Recipe B: Vector Robot Eye Color by Emotion

Map live emotional state to robot face LEDs for expressive, readable interaction in kiosks or assistants.

// ACME Vector Bot controller
const emotion = detectEmotion(userText); // your classifier or provider analysis
const colorMap = {
  frustrated: "#ff6a5e",
  anxious: "#5e97ff",
  joyful: "#66ffe0",
  neutral: "#b7c2d9"
};
vectorRobot.setEyeColor(colorMap[emotion] ?? colorMap.neutral);

Recipe C: Emotion Feedback UI Layer

Drive UI styling and interaction pacing from emotional state so interfaces feel responsive, not generic.

// ACME Banking app frontend
function applyEmotionTheme(state) {
  const themes = {
    frustrated: { accent: "#ff885c", pace: "fast" },
    anxious: { accent: "#7a7dff", pace: "slow" },
    focused: { accent: "#4cc9a5", pace: "normal" }
  };
  const t = themes[state] || themes.focused;
  document.documentElement.style.setProperty("--accent", t.accent);
  setUiPace(t.pace);
}

Recipe D: Emotion-to-Music Plugin

Generate or modulate soundtrack layers from emotional state for games, wellness, or creative tools.

// ACME Studio plugin
const mood = inferMood(turnTranscript); // anxious, calm, excited
musicEngine.setTempo(mood === "anxious" ? 88 : 104);
musicEngine.setKey(mood === "calm" ? "Dmaj" : "Amin");
musicEngine.setLayer("pad", mood !== "excited");
musicEngine.setLayer("percussion", mood === "excited");

Recipe E: Segment Users by Emotional Profile

Create cohorts for product decisions: churn risk, support escalation, feature personalization.

// ACME Analytics pipeline
profile = {
  user_id,
  stress_index_7d,
  frustration_events_30d,
  calm_recovery_rate,
  confidence: "high"
};

if (profile.stress_index_7d > 0.72) segment = "high-support-need";
else if (profile.calm_recovery_rate > 0.80) segment = "self-guided";
else segment = "balanced";

Recipe F: ACME Value Dashboard

Show business impact from emotional adaptation: resolution speed, satisfaction lift, escalation reduction.

GET /v1/usage/accounts/{account_id}/summary

// combine with product metrics
{
  "support_resolution_time_delta_pct": -18.4,
  "csat_delta_pct": +11.2,
  "escalation_rate_delta_pct": -14.7
}

Use Case Surface

Integration Areas

Support Service Automation Emotion-Aware UX Robotics / Embodied Interfaces Music + Creative Plugins Segmentation + Personalization Analytics + Product Ops

Test These Recipes Instantly

Run requests directly against your API base from the built-in Playground.

Open Playground