/iblai-vibe:iblai-vibe-agent-apifrom ibl.ai vibe
Adds an agent API tab to Next.js apps for managing API keys (list, add, edit, delete) used for programmatic agent access. Keys are organization-scoped and shown once on creation.
Ships in ibl.ai vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Add the agent API tab -- the API keys an app uses to call the agent from
code. Scope: per organization. The tab sits in the agent's settings, but
the keys are the organization's Platform API Tokens (platform_key-scoped):
the same list shows on every agent, and a key works for any agent the key's
owner can use. The tab is a paged table (10 keys per page) with Add API
Key and a pencil and a bin per row. This is one tab in the agent-settings
family indexed by /iblai-vibe-agent; it shares the AgentSettingsProvider
wrapper with every other tab. The organization's settings list the same keys
on their API page (/iblai-vibe-account).
Keys -- name, Permission Mode, created and expiry dates ("N/A" when a
key never expires). The list and the buttons need the user's /apitokens/
grants (Step 2).

Add API Key -- a name (letters, numbers, hyphens and underscores), an optional expiry date, and a Permission Mode: Owner permissions (the key can do what you can do) or Token policies (it can do only what the policies and groups you pick allow). The pencil edits the same fields.

API Key -- Add API Key shows the secret once, with a copy button. It cannot be retrieved again; the list then jumps back to page 1.

Delete API Key -- the trash icon asks for confirmation. Anything using the key stops working at once.

Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
/iblai-vibe-auth, or vibe-starter).AgentSettingsProvider wraps the route (/iblai-vibe-agent §1).@iblai/iblai-js@^3.6.0 (resolves @iblai/web-containers 2.6.0). Check with
pnpm why @iblai/web-containers.Look for iblai.env in the project root with PLATFORM, DOMAIN, and
TOKEN. If it is missing, tell the user:
"You need an iblai.env with your platform configuration. Download the
template and fill in your values:
curl -o iblai.env https://raw.githubusercontent.com/iblai/vibe/refs/heads/main/iblai.env"
AgentApiTabThe table and buttons are gated on the RBAC grants /apitokens/#list and
/apitokens/#create, read from the provider's rbacPermissions -- even with
enableRBAC={false}. Without them the tab says "You do not have permission
to view API keys." (or "No API keys yet.") and Add API Key never shows.
Load the grants and pass them to a nested provider:
// app/(app)/agents/[mentorId]/api/page.tsx
"use client";
import { useEffect, useState } from "react";
import {
AgentApiTab,
AgentSettingsProvider,
useAgentSettings,
} from "@iblai/iblai-js/web-containers/next";
import { useGetRbacPermissionsMutation } from "@iblai/iblai-js/data-layer";
export default function AgentApiPage() {
const settings = useAgentSettings();
const [grants, setGrants] = useState<object>({});
const [getRbacPermissions] = useGetRbacPermissionsMutation();
useEffect(() => {
getRbacPermissions({
requestBody: {
platform_key: settings.tenantKey,
resources: ["/apitokens/"],
},
})
.unwrap()
.then((permissions) => setGrants({ ...permissions }))
.catch(() => {});
}, [settings.tenantKey, getRbacPermissions]);
return (
<div className="flex h-full flex-col bg-white">
<AgentSettingsProvider {...settings} rbacPermissions={grants}>
<AgentApiTab />
</AgentSettingsProvider>
</div>
);
}
If your layout already loads /apitokens/ grants into the provider, mount
<AgentApiTab /> directly. To put create and delete behind a paywall or
trial check, pass executeGatedAction on the provider; the tab runs both
through it.
The tab renders with the default agent-facing copy (AGENT_API_TAB_LABELS,
localized through the SDK's i18n). Pass a partial labels object to change
any string:
import { AgentApiTab } from "@iblai/iblai-js/web-containers/next";
<AgentApiTab
labels={{
header: { title: "API keys" },
actions: { createNew: "New key" },
}}
/>;
Label groups (ApiTabLabels): header (title, description), infoBox,
disclaimer (lineOne, lineTwo), table (column headings, emptyState,
noPermission, deleteAriaLabel, notAvailable), actions.createNew,
createModal (title, field labels, validation messages, buttons, toasts),
deleteModal (title, confirmation, warning, buttons, toasts), and
apiKeyModal (the one-time reveal: title, descriptions, copy button labels).
get_component_info("AgentApiTab")
get_component_info("AgentSettingsProvider")
<AgentApiTab> PropsImport from @iblai/iblai-js/web-containers/next.
| Prop | Type | Required | Description |
|---|---|---|---|
labels | DeepPartial<ApiTabLabels> | No | Override user-visible strings |
Identity, grants and the gate come from AgentSettingsProvider (tenantKey,
username, rbacPermissions, executeGatedAction).
From @iblai/iblai-js/web-containers/next:
AGENT_API_TAB_LABELS -- the default label bundle.AgentApiTabProps, ApiTabLabels, ApiKey -- types.| Action | Request |
|---|---|
| Load | GET /api/core/platform/api-tokens/?platform_key={org}&page=…&page_size=10 |
| Add API Key (create) | POST /api/core/platform/api-tokens/ with name, platform_key, and expires_in (seconds until the chosen date, rounded up to whole days; omitted for no expiry), plus mode and, for Token policies, policies_to_add / groups_to_add. The tab also sends username, key, created, and expires, which the server ignores |
| Pencil (edit) | PATCH /api/core/platform/api-tokens/{name}?platform_key={org} with only what changed: the name, expires_in, mode, and the policies and groups to add or remove |
| Delete | DELETE /api/core/platform/api-tokens/{name}?platform_key={org} |
Keys are addressed by name. Deleting the last key on a page steps back a page.
| Hook | Purpose |
|---|---|
useGetApiKeysQuery | The paged key list |
useCreateApiKeyMutation | Create a key (returns the secret once) |
useGetApiKeyQuery, useUpdateApiKeyMutation | Read one key with its policies and groups, and edit it |
useGetApiKeyFieldPermissionsQuery | Which of mode and the policy / group fields this person may write |
useDeleteApiKeyMutation | Delete a key by name |
useGetRbacPermissionsMutation | Load the /apitokens/ grants (Step 2) |
REST twin: /iblai-api-token
(Platform API Tokens, mode and token-scoped policies).
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:
pnpm build -- must pass with zero errors.pnpm test -- vitest must pass./agents/<uuid>/api in the browser as /iblai-vibe-ops-test says, signed in
as an org admin: the key table and Add API Key render; add a key, copy it, then
delete it; read the console; check the phone width.IBLAI_API_KEY in .env.local), never in
client code or git./apitokens/ grants are missing (Step 2).AgentSettingsProvider once at the layout
level (/iblai-vibe-agent §1). The nested provider in Step 2 replaces
rbacPermissions for this tab with the /apitokens/ grants; spread in the
layout's grants if you have any.sonner and @iblai/iblai-web-mentor
(pnpm add sonner @iblai/iblai-web-mentor).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub iblai/base --plugin iblai-vibe166 skills in this plugin
/iblai-api-agent-accessManage role-based access to an ibl.ai agent via the platform API — list role policies, search users/groups, and grant/revoke editor, chat, or analytics_viewer roles for users, groups, and emails. Use when controlling who can edit, chat with, or view analytics for an agent./iblai-api-agent-auditRead an ibl.ai agent's audit log via the platform API — a who-changed-what trail filterable by action, actor email, and date range. Read-only. Use when investigating configuration changes to an agent./iblai-api-agent-chatSet up live chat with a deployed ibl.ai agent by wiring the hosted iblai-api-agent-chat MCP server into the project (.mcp.json / claude mcp add) using the .env Api-Token and a chosen agent's unique id, or by signing in from claude.ai, ChatGPT or Claude Desktop with only the URL. Use to enable runtime conversations with an agent, and to list or disconnect the apps a user has connected. The actual chatting then happens through the MCP server's tools.Other plugins' skills for the same job