Logo Iblai Vibe Agent Chat

Iblai Vibe Agent Chat

Tổ chức
iblai
iblai-vibe-agent-chat

Add the in-process Chat SDK component (full agent surface — message stream, canvas, file attach, voice, prompts) to a Next.js app

Tổng quan

Nhà phát hànhiblai
Kho mãvibe
Tên kỹ năngiblai-vibe-agent-chat
Sao
229
Bản fork
8
Tệp đi kèm
11
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 11 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được iblai công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Iblai Vibe Agent Chat trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/iblai/vibe/tree/main/skills/agents/iblai-vibe-agent-chat
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/iblai/vibe.git /tmp/vibe
mkdir -p .claude/skills
cp -r /tmp/vibe/skills/agents/iblai-vibe-agent-chat .claude/skills/iblai-vibe-agent-chat
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Iblai Vibe Agent Chat trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Iblai Vibe Agent Chat ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Iblai Vibe Agent Chat với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

/iblai-vibe-agent-chat

First time here? If iblai.env has no ARCHITECTURE=, run /iblai-vibe-start first (four questions; two minutes) — it decides single-org / multi-org / headless and who signs in, and every skill reads the answer.

Add the full ibl.ai agent chat surface — welcome screen, message stream with per-message actions, composer (+ menu, tool chips, file cards, / skill picker), suggested prompts, canvas, voice input, voice call, screen sharing — to your Next.js app. Uses the Chat React component from @iblai/iblai-js/web-containers/next, which renders in-process (not in an iframe) and shares the host app's Redux store, providers, and auth session. This text describes the redesigned chat that ships from @iblai/iblai-js 2.36.2.

Welcome state Message sent (Thinking… while the agent starts, Stop Streaming on the send button) The + menu (Upload File, Camera, Memory) A finished answer (Thought section, message actions, suggested follow-up prompts) Canvas card in a response (Open Canvas, follow-up suggestions, Canvas chip on) Canvas panel open beside the chat (editing toolbar, Export)

Template (legacy <mentor-ai> widget): a full-screen <mentor-ai> web-component ChatWidget (distinct from the in-process Chat component this skill documents) — bundled as assets/chat-widget.tsx + assets/iblai-web-mentor.d.ts.

What you get: the SDK's Chat component wired directly into your app (in-process, not an iframe). Full feature surface, intercept actions, shared auth/store with the rest of your app, themeable with your Tailwind config.

Do NOT add custom styles, colors, or CSS overrides to the SDK Chat component. It ships with its own styling. Keep the component as-is. Do NOT implement dark mode unless the user explicitly asks for it.

This is a revised skill. It folds in everything learned from a real brownfield integration (Next.js App Router, React 19, RTK, pnpm, sub-path basePath). Greenfield apps can mostly follow the happy path; brownfield apps must read the Brownfield and Known issues notes — most of the integration cost lives there, not in the happy path.

Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.

Prerequisites

  • Auth must be set up first (/iblai-vibe-auth) — the Chat component reads the axd token, username, and organizations from the providers tree.

  • A working store, providers, and SSO callback route — i.e. an app that already passes /iblai-vibe-auth verification.

  • An agent ID (a UUID) — the last path segment of an https://os.ibl.ai/platform/<tenant>/<agent-uuid> URL the user gave, or create an agent on os.ibl.ai (or with /iblai-api-agent-create).

  • Minimum SDK versions. The Chat component and its required hooks are only present in recent SDKs. Older-but-recent installs silently lack them. Require at least:

    packagemin version
    @iblai/iblai-js^2.67.3
    @iblai/agent-ai^2.10.0

    (v2 bundles web-containers, web-utils, and data-layer as @iblai/iblai-js/* subpaths — do not install the separate v1 packages.)

  • Pre-flight export check (do this before writing any code):

    bash
    grep -qE "declare function Chat\b|type ChatConfig" \
      node_modules/@iblai/web-containers/dist/next/index.d.ts \
      && echo "Chat present" \
      || echo "MISSING — upgrade the SDK packages (see Step 3)"

    @iblai/iblai-js/web-containers/next re-exports @iblai/web-containers/next; the component physically lives in @iblai/web-containers. If the check fails, the rest of this skill cannot work — upgrade first.

Caveat: the SDK .d.ts is incomplete and sometimes misleading. Several runtime props/args (e.g. getChatHistory's userId path param) are absent from the type defs, and some documented slot props are typed but not implemented. When something doesn't match, verify against node_modules/@iblai/web-containers/dist/next/index.esm.js (the actual bundle), not just the types.

What Gets Wired

FileChange
package.jsonAdds SDK packages + peers (Step 3)
providers/index.tsxWraps tree in <ServiceWorkerProvider>; skip={isSsoLoginRoute} on AuthProvider / TenantProvider (Step 4)
public/sw.jsThe SDK offline service worker — required by ServiceWorkerProvider (Step 4)
next.config.*Service-Worker-Allowed header for sub-path mounts; reactStrictMode:false (Step 4, Known issues)
store/index.tsRegisters chat, chatInput, chatSliceShared, files, rbac, subscription, topBanner reducers (Step 5)
app/agents/[mentorId]/chat-new/page.tsxNew route rendering <Chat> with resume/new-chat handling (Step 6)
components/radix-pointer-events-guard.tsxHost recovery for the SDK prompt-gallery teardown bug (Known issues)

Step 1: Check Environment

The API URLs default to hosted iblai.app in lib/iblai/config.ts, so .env.local only needs:

bash
NEXT_PUBLIC_MAIN_TENANT_KEY=your-platform
NEXT_PUBLIC_DEFAULT_AGENT_ID=<agent uuid>

Note: some host config helpers don't expose supportEmail(). If yours doesn't, read process.env.NEXT_PUBLIC_SUPPORT_EMAIL directly in ChatConfig (Step 6) — don't assume the helper has every field.

Step 2: Get the Agent ID

If the user already gave an os.ibl.ai URL (https://os.ibl.ai/platform/<tenant>/<agent-uuid>), the UUID is its last path segment — use it, don’t ask. Otherwise ask the user for their agent UUID. Write it directly to .env.local using the Edit tool — do NOT echo it back in shell commands:

NEXT_PUBLIC_DEFAULT_AGENT_ID=<the-uuid>

If the user doesn't have one, direct them to create an agent on https://os.ibl.ai (or run /iblai-api-agent-create).

Step 3: Install Dependencies

bash
pnpm add @iblai/data-layer @iblai/web-containers @iblai/web-utils \
         @iblai/agent-ai \
         react-paginate livekit-client \
         @livekit/components-react @livekit/components-styles \
         @tauri-apps/plugin-os @tauri-apps/api

Why each one:

PackageUsed by
@iblai/data-layer, @iblai/web-containers, @iblai/web-utilsHoist SDK packages to top-level node_modules so the bundler resolves them from the host
@iblai/agent-aiVoice/agent web component — dynamically imported by <Chat> (import('@iblai/agent-ai')). Easy to miss; its absence is a hard build error
react-paginatePeer of @iblai/web-containers (agent search pagination)
livekit-client, @livekit/components-react, @livekit/components-stylesVoice call / screen-sharing
@tauri-apps/plugin-os, @tauri-apps/apiOS detection (Tauri desktop wrapper)

All of these are build-time-required, even the runtime-guarded ones. <Chat> statically/dynamically imports them; a missing package is a hard Module not found from Turbopack/Webpack, not a soft runtime fallback. Don't defer any of them "until needed".

If on a fresh upgrade you hit Module not found: Can't resolve '@iblai/...' for a name you did install, the export may have moved between subpaths — e.g. AgentSearchResult moved from @iblai/iblai-js/web-containers to @iblai/iblai-js/web-containers/next. Expect to fix a few import paths after an SDK bump; the /web-containers vs /web-containers/next split is real (the chat component lives under /next).

Step 4: Wire the Providers + Service Worker

The Chat component uses useAuthContext, useTenantContext, useEmbedMode, useServiceWorker, and several Redux hooks. The host needs all of these.

4a. Providers

In providers/index.tsx:

  1. Import ServiceWorkerProvider from @iblai/iblai-js/web-utils.
  2. Wrap the existing <AuthProvider> tree in <ServiceWorkerProvider>.
  3. Pass skip={isSsoLoginRoute} to both <AuthProvider> and <TenantProvider> so the /sso-login-complete callback page doesn't crash on missing context.
  4. Pass basePath if the app is mounted under a sub-path (e.g. NEXT_PUBLIC_BASE_PATH=/hq):
tsx
import {
  AuthProvider,
  TenantProvider,
  MentorProvider,
  ServiceWorkerProvider,
} from "@iblai/iblai-js/web-utils";

return (
  <ServiceWorkerProvider basePath={config.basePath() /* "" or "/hq" */}>
    <AuthProvider /* …, */ skip={isSsoLoginRoute}>
      <TenantProvider /* …, */ skip={isSsoLoginRoute}>
        <MentorProvider {...mentorProps}>{children}</MentorProvider>
      </TenantProvider>
    </AuthProvider>
  </ServiceWorkerProvider>
);

4b. Ship the service worker (required)

ServiceWorkerProvider calls navigator.serviceWorker.register(${basePath}/sw.js, { scope: basePath || "/" }). The host must provide public/sw.js — the SDK does not ship a copyable one. Without it, registration 404s (non-fatal but noisy, and offline is disabled). Use the SDK's standard offline worker (generic; cache-in-background, serve-from-cache only when Tauri+offline). A known working sw.js is bundled with this skill — copy it to public/sw.js.

4c. Service-Worker-Allowed header (sub-path mounts only)

If the app is under a basePath, the script lives at /hq/sw.js, whose default max scope is /hq/, but the provider registers with scope: "/hq" → SecurityError: scope ('/hq') is not under the max scope allowed ('/hq/'). Fix in next.config:

js
async headers() {
  return [
    {
      source: '/sw.js', // Next prefixes basePath → matches /hq/sw.js
      headers: [{ key: 'Service-Worker-Allowed', value: basePath || '/' }],
    },
  ]
}

(No-op safe when there's no basePath: header value /.)

Step 5: Register Store Reducers

In store/index.ts, register these reducers. The SDK's selectors hard-code these exact keys (state.chat, state.rbac, …) — they are non-negotiable:

ts
import {
  coreApiSlice, mentorReducer, mentorMiddleware,
} from "@iblai/iblai-js/data-layer";
import {
  hostChatReducer,
  chatInputSliceReducer,
  chatSliceReducerShared,
  filesReducer,
  rbacReducer,
  subscriptionReducer,
  topBannerReducer,
} from "@iblai/iblai-js/web-utils";

reducer: {
  chat: hostChatReducer,
  chatInput: chatInputSliceReducer,
  chatSliceShared: chatSliceReducerShared, // used by useAdvancedChat; NOT in mentorReducer
  files: filesReducer,
  rbac: rbacReducer,
  subscription: subscriptionReducer,
  topBanner: topBannerReducer,
  [coreApiSlice.reducerPath]: coreApiSlice.reducer,
  ...mentorReducer,
}

Brownfield: store-key collisions. A mature app very likely already has its own chat / files (or rbac/subscription/…) slices with different shapes. The SDK's keys are fixed, so rename the host's slices, not the SDK's. Find collisions first:

bash
grep -rn "state\.\(chat\|files\|rbac\|subscription\|topBanner\|chatInput\)\b" \
  --include="*.ts" --include="*.tsx" app components lib hooks

Rename each host slice (e.g. chat → v0Chat) and migrate every selector that reads it (slice name and action creators are key-agnostic — only useSelector(s => s.<key>) accesses change). mentorReducer is RTK Query API slices only; it does not shadow plain feature slices like chat/files.

The slice keys matter — don't rename them. mentorMiddleware is still concatenated as before.

Step 6: Create the Route

Create app/agents/[mentorId]/chat-new/page.tsx. This version handles session resume, new-chat, the useSearchParams Suspense requirement, and the mounting discipline (see notes after the code):

tsx
"use client";

export const dynamic = "force-dynamic";

import { Suspense, useEffect, useState } from "react";
import { useParams, useRouter, useSearchParams } from "next/navigation";
import { Chat, type ChatConfig } from "@iblai/iblai-js/web-containers/next";
import {
  useUsername, useAxdToken, useUserTenants, useVisitingTenant,
  useIsAdmin, useCachedSessionId,
} from "@iblai/iblai-js/web-utils";
import { redirectToAuthSpa } from "@/lib/iblai/auth-utils";
import config from "@/lib/iblai/config";

export default function AgentChatPageWrapper() {
  // `useSearchParams()` requires a Suspense boundary in the App Router
  // (the SDK <Chat> tree uses it too).
  return (
    <Suspense fallback={null}>
      <AgentChatPage />
    </Suspense>
  );
}

function AgentChatPage() {
  const { mentorId } = useParams<{ mentorId: string }>();
  const router = useRouter();
  const searchParams = useSearchParams();

  // Resume (`?session=<id>`) or new chat (`?new=<nonce>`). The SDK reads
  // its per-mentor cached-session map (`useCachedSessionId`,
  // localStorage `{ [mentorId]: sessionId }`) ONCE at <Chat> mount
  // (`isNewSession = cachedSessionId[mentorId] ? false : true`). So seed
  // (resume) or clear (new) BEFORE mount, gate the render until done,
  // and key <Chat> on session/new so switching remounts it.
  const restoreSessionId = searchParams.get("session") ?? undefined;
  const newParam = searchParams.get("new") ?? undefined;
  const [cachedSessionId, saveCachedSessionId] = useCachedSessionId();
  const [seededFor, setSeededFor] = useState<string | undefined>(
    restoreSessionId || newParam ? undefined : "none",
  );
  useEffect(() => {
    if (!mentorId) { setSeededFor("none"); return; }
    const map = { ...((cachedSessionId ?? {}) as Record<string, string>) };
    if (restoreSessionId) {
      if (map[mentorId] !== restoreSessionId) {
        saveCachedSessionId({ ...map, [mentorId]: restoreSessionId });
      }
      setSeededFor(restoreSessionId);
    } else if (newParam) {
      if (map[mentorId]) { delete map[mentorId]; saveCachedSessionId(map); }
      setSeededFor(`new:${newParam}`);
    } else {
      setSeededFor("none");
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [restoreSessionId, newParam, mentorId]);
  const sessionReady = restoreSessionId
    ? seededFor === restoreSessionId
    : newParam
      ? seededFor === `new:${newParam}`
      : true;

  const [tenantKey, setTenantKey] = useState("");
  useEffect(() => {
    const appTenant = localStorage.getItem("app_tenant");
    const tenant = localStorage.getItem("tenant");
    let currentTenant = "";
    try {
      currentTenant =
        JSON.parse(localStorage.getItem("current_tenant") ?? "{}")?.key ?? "";
    } catch {}
    setTenantKey(appTenant || currentTenant || tenant || config.mainTenantKey());
  }, []);

  const username = useUsername();
  const axdToken = useAxdToken();
  const { userTenants } = useUserTenants();
  const { visitingTenant } = useVisitingTenant();
  const isAdmin = useIsAdmin();

  const chatConfig: ChatConfig = {
    baseWsUrl: () => config.baseWsUrl(),
    // Host config may not expose supportEmail — fall back to env.
    supportEmail: () =>
      process.env.NEXT_PUBLIC_SUPPORT_EMAIL ?? "support@ibl.ai",
    authUrl: () => config.authUrl(),
    mainTenantKey: config.mainTenantKey(),
    navigateToAdminBilling: () =>
      router.push(`/agents/${mentorId}/settings?tab=billing`),
    navigateToExplore: () => router.push("/agents"),
    navigateToMentor: (id) => router.push(`/agents/${id}`),
  };

  if (!tenantKey || !sessionReady) return null;

  return (
    <div className="flex h-screen w-full flex-col">
      <Chat
        // Key on mentor+session+new so an intentional switch remounts
        // <Chat> and the SDK re-reads the cached session. Do NOT remount
        // it any other way (see "Mounting discipline").
        key={`${mentorId}:${restoreSessionId ?? ""}:${newParam ?? ""}`}
        isPreviewMode={false}
        mentorId={mentorId}
        tenantKey={tenantKey}
        config={chatConfig}
        // Wrap so the callback is `=> void` (host helpers are often
        // async / extra-arg; SDK type wants `(…) => void`).
        redirectToAuthSpa={(to, key, logout) =>
          void redirectToAuthSpa(to, key, logout)
        }
        username={username ?? null}
        userTenants={userTenants ?? []}
        visitingTenant={visitingTenant}
        axdToken={axdToken ?? ""}
        userIsStudent={!isAdmin}
      />
    </div>
  );
}

Why each piece:

ItemWhy
"use client" + dynamic = "force-dynamic"Chat is client-only; prevent static pre-render
<Suspense> wrapperuseSearchParams() requires a Suspense boundary in App Router
useCachedSessionId seeding + render gateonly way to resume / start-new (no sessionId prop, no URL handling — see "Resuming / starting sessions")
key={mentor:session:new}the ONLY safe remount; switching session needs it
void redirectToAuthSpa(...) wrapperSDK type is (…) => void; host helper is often async
env fallback for supportEmailhost config may not expose it

Mounting discipline

The SDK reads session/voice state once at <Chat> mount and has an isMounted defect (see Known issues), so an unintended remount is destructive (loses session, wedges voice). Rules:

  • Never conditionally swap subtrees around <Chat> (isMobile ? <A/> : <B/> with <Chat> in both → remount on breakpoint resolve). Use one stable tree and change layout via props (e.g. ResizablePanelGroup direction), not subtree swaps.
  • The only legitimate remount is an intentional session/new-chat key change (Step 6).
  • const el = (<Chat .../>) reused in the same JSX position is fine (React reconciles — not a remount).

Resuming / starting sessions

<Chat> has no sessionId prop and reads no URL param: sessions live in localStorage via useCachedSessionId() and are read once at mount — seed (resume) or clear (new) before mounting and key <Chat> on it, exactly as Step 6 does. Details, the missing "conversation loaded" signal, and the getChatHistory host list: references/sessions.md.

What the chat shows

Everything below is the SDK's own UI; none of it needs host code. The agent's own settings and your config.features allow-list decide which controls appear (a host flag can only hide a control, never force it on).

AreaWhat the user sees
Welcome screenGradient heading (the agent's name, or a time-of-day greeting with the user's first name when the agent's Welcome screen setting is "personal greeting"), the agent's welcome line, the disclaimer, and the centred composer. Starter prompts show under it as chips only when the host passes showConversationStarters, config.features.suggestedPrompts is not false and the agent's "Starter prompts" setting is not "none" (the agent's guided_prompts_count, 1-10, sets how many on desktop; phones show rows capped at 4); "Explore Agents" below the first screen needs showExploreMentors
Message listRight-aligned user bubbles; the agent's bubble with name and time, a collapsible "Thought" section for reasoning, markdown with code blocks (Copy) and tables (copy / download), and "Thinking…" until the first token
Message actionsUnder each finished reply: Copy and Read aloud for everyone; thumbs up / down, Retry, Report, Share and Download for signed-in users (Share and Download also for visitors with showMessageActionsWhenLoggedOut, both hidden under chat privacy; Report needs the agent's inappropriate-content setting; thumbs, Retry and Report are hidden when viewing a shared chat)
Suggested promptsAfter a reply, up to three follow-up chips and a refresh button. Picking one sends it
Composer+ menu (Upload File, Camera, then Tools, Skills, Prompts, Memory, MCP with a count badge when the agent has a connector on — its panel switches connectors for this chat, see /iblai-vibe-agent-mcp — and a Model picker when the agent allows it), a Canvas pill that turns off with its x, tool chips (two shown, the rest fold into "+N"), screen share, voice input, voice call, and Send, which becomes Stop Streaming while the agent answers
Spend limitsFor a signed-in member, a banner above the composer when one of their LLM spend limits is near (percentages only, never dollars), and a red banner with Send disabled while a Block Requests limit is exceeded; a refused send tells a member to contact their admin and gives an admin Open Billing. Limits are set in /iblai-vibe-billing and /iblai-vibe-agent-billing
AttachmentsFile cards above the input: uploading, processing, failed (with retry), too large, and long pastes that become a .txt card
/ skill pickerTyping / in the input lists the agent's skills by name. It needs the per-agent view_skill_assignments grant in the rbac store, which Chat and vibe-starter's providers do not load, so in vibe-starter it stays empty unless you pass slashSkills; slashSkillsEnabled={false} turns it off
CanvasAn agent reply that creates a document shows a card with Open Canvas; the panel opens beside the chat with an editing toolbar and Export. Tables show as plain pipe text unless you pass GFM-aware markdownToHtml / htmlToMarkdown in config
EmbedWith embed (or ?embed=true) the chat drops its card border, widens the composer to about 680px, and shows up to four full-width suggested-prompt rows above the disclaimer; "Explore Agents" is never shown
PhonesThe + menu becomes a bottom sheet and the composer pins to the bottom

Props

PropTypeRequiredDescription
mentorIdstringyesAgent UUID
tenantKeystringyesOrganization (platform) key
configChatConfigyesURLs + navigation callbacks
redirectToAuthSpa(redirectTo?, platformKey?, logout?) => voidyesHost-owned auth redirect (wrap async helpers to => void)
usernamestring | nullyesCurrent user; null for anonymous
userTenantsTenant[]yesFrom useUserTenants
axdTokenstringyesAXD auth token
userIsStudentbooleanyesRBAC role hint
visitingTenantTenant | undefinednoViewing another organization's agent
isPreviewModebooleanyestrue for admin preview
mode"default" | "advanced"no"advanced" enables builder UI
isPublicRoutebooleannoUnauthenticated share links
hasBorderbooleannoCard border around the chat. Default true
isInCanvasViewbooleannoSet when the chat itself is rendered inside the canvas view
embedbooleannoEmbedded (iframe widget) presentation. Defaults to the ?embed=true query param
labelsDeepPartial<ChatLabels>noOverride any user-visible string, keyed like the SDK catalogue (chat.<component>.<key>). Omitted strings use the catalogue for the active locale
slotsChatSlotsno{ composerExtraControls?: ReactNode } — extra controls rendered first in the composer's tool row. The only slot in 2.36.x
showConversationStartersbooleannoShow the welcome screen's starter prompts. Default false
showExploreMentorsbooleannoShow "Explore Agents" on the welcome screen and the project agents list. Default false; the agent's own setting still applies
slashSkillsEnabledbooleanno/ skill picker. On unless false, but it fetches only with config.features.skills and the per-agent view_skill_assignments grant already in the rbac store (nothing in Chat loads it); otherwise pass slashSkills
slashSkills, slashSkillsLoadingEffectiveAgentSkill[], booleannoA host-supplied skill list for the / picker (EffectiveAgentSkill is exported from @iblai/iblai-js/data-layer), and its loading flag
projectIdstringnoScope the chat to a project (a new chat renders the project landing page)
redirectToAuthSpaJoinTenant() => voidnoSends a signed-in user who is not a member of the organization to the auth app's join flow

The old slot overrides (canvasView, disclaimerModal, advancedChatHeader, advancedChatBuilder, liveKitChat, liveKitScreenSharing, welcomeChat, promptGalleryModal) do not exist. Host UI goes through slots, labels and config.

ChatConfig

FieldTypeDescription
baseWsUrl() => stringWebSocket origin
supportEmail() => stringFooter / error-toast email (env fallback if host config lacks it)
authUrl() => stringAuth SPA origin
mainTenantKeystringDefault organization key
navigateToAdminBilling() => voidOpen the billing tab; also the Open Billing button an admin gets when a spend limit refuses a send
navigateToExplore() => void"Browse All" agents link
navigateToMentor(id: string) => voidOpen an individual agent
appSyncBanner?{ badge, text, link, linkText } | nullOptional sync banner
features?ChatFeaturesAllow-list: voiceCall, dictation, screenShare, fileUpload, camera, canvas, memory, prompts, skills, suggestedPrompts, cowork. All default true; false hides the control
navigateToProject?(projectId: string, mentorId: string) => voidOpen a project
onUpgradeRequired?(proceed, isAdminAction?) => unknownPaywall gate; run proceed when the user may continue. Without it every gated action runs
on402Error?(data) => void | Promise<void>Credits exhausted. Defaults to the SDK's pricing modal / billing tab / top banner
onSessionChange?(sessionId: string) => voidCalled whenever the active session id changes
freeTrialDialog?{ component, isOpen, onClose } | nullUpgrade dialog the chat renders while isOpen; null renders none
markdownComponent?ComponentType<{ children?: string; className?: string }>Custom renderer for message bodies
markdownToHtml?, htmlToMarkdown?(s: string) => stringCanvas converters; pass a richer pair (tables, math) so canvas output matches chat
dmUrl?() => stringData-manager URL for "Read aloud"; browser speech when absent
allowedParentOrigins?, postMessageTargetOrigin?string[], stringOrigins allowed to message the chat (embedding page), and where it posts back. Default: same origin only
streamingFocusManagement?booleanMoves focus to Stop while streaming and to the last reply's Copy when done (WCAG 2.4.3). Default true

Also optional: onScreenShare, onVoiceCall, eventBus, browse, suppressChatErrorToast, isOnline, enableSupportPhone, defaultSupportPhoneNumber, maximumCharacterSizeToCopy, exploreMentorsPublicFallback, showMessageActionsWhenLoggedOut.

ChatProps, ChatConfig, ChatFeatures, ChatLabels, ChatSlots and ChatBrowseBridge are exported as types from @iblai/iblai-js/web-containers/next.

Known issues & host workarounds

Two SDK defects were found against web-containers@1.6.14: voice "Processing…" hangs after any remount (Chat's own dictation hook resets its ref on setup in 2.36.2, so the root cause is gone there, but the useVoiceChat exported by @iblai/iblai-js/web-utils (web-utils 2.8.0) still never sets its ref back to true; vibe-starter still sets reactStrictMode: false and never remounts <Chat> except through its key) and the prompt-gallery dialog can leave the app unclickable (not re-checked on 2.36.2; mount RadixPointerEventsGuard once at the root — vibe-starter ships it as components/radix-pointer-events-guard.tsx). Full analysis and the guard's source: references/known-issues.md.

Step 7: Verify

Run /iblai-vibe-ops-test before telling the user the work is ready, and give every page, control and state this skill added its own checkpoint — one Playwright test titled <ID> · … in e2e/journeys/, listed in e2e/coverage.json; pnpm e2e:coverage must pass. Then:

  1. pnpm build — must pass with zero errors. (Watch for Module not found on the Step 3 peers, esp. @iblai/agent-ai.)
  2. pnpm test — host unit suite still green (esp. any slices you renamed in the Brownfield step).
  3. pnpm dev — open the route, sign in, and walk:
    • agent name + greeting, "Ask anything" textarea, the + menu (Upload File / Camera / Memory), Canvas pill, screen share / voice input / voice call (screen share when the agent enables it), and Send;
    • send a message → "I Accept" the User Agreement → your bubble + "Thinking…" and a Stop Streaming button, then the reply with its action row (Copy, thumbs, Share, Download, Report, Read aloud, Retry; some depend on sign-in and agent settings) and follow-up prompt chips;
    • voice: record → transcription clears "Processing…" (if it hangs, the StrictMode workaround isn't applied or <Chat> is remounting);
    • prompt gallery (+ menu → Prompts, when the agent has prompts): open then close → app still clickable (guard working);
    • resume/new (if wired): history link loads the conversation; "new chat" starts empty.

Brand guidelines: BRAND.md

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Iblai Vibe Agent Chat làm được gì?

Add the in-process Chat SDK component (full agent surface — message stream, canvas, file attach, voice, prompts) to a Next.js app

Vì sao nên dùng Iblai Vibe Agent Chat trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Iblai Vibe Agent Chat là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Iblai Vibe Agent Chat trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/iblai/vibe/tree/main/skills/agents/iblai-vibe-agent-chat. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Iblai Vibe Agent Chat?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Iblai Vibe Agent Chat với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Iblai Vibe Agent Chat với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Iblai Vibe Agent Chat có miễn phí không?

Có. Kỹ năng này được iblai phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇