/iblai-vibe:iblai-vibe-agent-sandboxfrom ibl.ai vibe
Adds an agent Sandbox tab to Next.js apps with Sandbox Type cards (Calculator, Ephemeral VM, Permanent VM), Claw instance management, and agent prompt file editing for Permanent VMs.
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 Sandbox tab -- choose where the agent runs code and, for a Permanent Virtual Machine, manage its Claw workspace. A Sandbox Type card ("Choose where this agent runs code. The options differ in how long they last and what they cost, and only one can be on at a time.") picks one of three kinds:
Before @iblai/web-containers 2.0.0 they were called Computing Runtime,
Virtual Machine Shell and Claw; the enable_* flags keep their names.
With Permanent Virtual Machine selected, the tab connects the agent to an OpenClaw instance and edits the agent-workspace prompt files (Identity, Soul, User Context, Tools, Agents, Bootstrap, Heartbeat, Memory) backing the agent's runtime behaviour. Push pulls the current configuration onto the connected sandbox; Auto Push on Save pushes after every edit.
With Ephemeral Virtual Machine selected, a Network Access section
appears under the card — the VM's egress profile, its network and its
environment variables. That section has its own skill:
/iblai-vibe-agent-virtual-machine (and
/iblai-vibe-virtual-machine for the organization-wide networks and
environment variables it draws on).
Agent Skills are managed independently of the sandbox — see
/iblai-vibe-agent-skills for the Skills surface (skills catalog,
per-agent assignment, skill resources, and the chat / picker).










Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
AGENTS.md:
references/openclaw-post-installation-setup.md.references/nemoclaw-sandbox.md./iblai-vibe-auth)@iblai/mcp in .mcp.json)mentorId (agent UUID). Do NOT invent one.Before proceeding, check for an iblai.env in the project root. Look for
PLATFORM, DOMAIN, and TOKEN variables. If the file does not exist or
is missing these variables, 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"
SandboxConfig and AgentConfigPrompts are independent
components — neither reads from AgentSettingsProvider. They each
take platformKey and mentorUniqueId as required props. Compose them
on a single page so the user sees Sandbox → Prompts, top to
bottom.
// app/(app)/agents/[mentorId]/sandbox/page.tsx
"use client";
import { useEffect, useState } from "react";
import { useParams } from "next/navigation";
import {
SandboxConfig,
AgentConfigPrompts,
} from "@iblai/iblai-js/web-containers";
export default function AgentSandboxPage() {
const { mentorId } = useParams<{ mentorId: string }>();
const [platformKey, setPlatformKey] = useState("");
const [username, setUsername] = useState("");
useEffect(() => {
try {
const raw = localStorage.getItem("userData");
if (raw) {
const parsed = JSON.parse(raw);
setUsername(parsed.user_nicename ?? parsed.username ?? "");
}
const resolvedTenant =
localStorage.getItem("app_tenant") ??
(() => {
try {
return JSON.parse(localStorage.getItem("current_tenant") ?? "{}").key;
} catch { return undefined; }
})() ??
localStorage.getItem("tenant") ??
"";
setPlatformKey(resolvedTenant);
} catch {}
}, []);
if (!platformKey) return null;
return (
<div className="flex flex-1 flex-col gap-8 bg-white p-6">
<SandboxConfig
platformKey={platformKey}
mentorUniqueId={mentorId}
username={username}
/>
<AgentConfigPrompts
platformKey={platformKey}
mentorUniqueId={mentorId}
/>
</div>
);
}
AgentConfigPrompts self-gates on the connected sandbox config — it
calls useGetClawMentorConfigQuery and short-circuits when no config
exists, so it is safe (and intended) to mount both together. The
Prompts section appears only after the user connects an instance.
SandboxConfig's username prop is optional — if omitted, the
component falls back to getUserName() (which reads from
localStorage.userData). Pass it explicitly when you already have it
to avoid the extra read.
enable_computational_runtime / enable_virtual_machine / enable_claw)The Sandbox Type card at the top of SandboxConfig selects how
the agent runs code. Three boolean flags back it, all read from the
agent's settings and written through the standard agent-settings
update endpoint:
| Kind | Flag | How long it lasts, what it costs |
|---|---|---|
| Calculator | enable_computational_runtime | Small JavaScript snippets with strict memory and time limits; no programs, internet or files. Nothing outlives the reply; the cheapest option |
| Ephemeral Virtual Machine | enable_virtual_machine | A private Linux computer, created when the agent runs a command and deleted when that reply is done. Small files in /workspace come back for later replies in the same chat; installed programs do not. No internet unless Network Access allows it. Costs extra each time it is used |
| Permanent Virtual Machine | enable_claw | A Claw computer that stays on and handles the agent's chats instead of the built-in agent, keeping what it knows between chats. Its chats are billed against your credits. The built-in tools (document search, Calculator, Ephemeral Virtual Machine) don't apply while it is on. Unlocks the OpenClaw sections below |
The kinds are mutually exclusive — only one can be enabled at a
time. The component enforces this client-side: enabling one kind
turns the other two off in the same PUT, and toggling the
active kind off leaves none enabled. Switches flip optimistically and
revert with an error toast if the save fails.
SandboxConfig handles all of this itself (via
useGetMentorSettingsQuery + useEditMentorMutation), so the host
app no longer needs to gate the Sandbox tab on enable_claw — mount
the tab and let users pick a type. Custom UI toggling the flags
directly should mirror the exclusivity:
import { useEditMentorMutation } from "@iblai/iblai-js/data-layer";
const [editMentor] = useEditMentorMutation();
// Select Ephemeral Virtual Machine (turning the other kinds off):
await editMentor({
mentor: mentorUniqueId,
org: platformKey,
userId: username,
formData: {
enable_claw: false,
enable_computational_runtime: false,
enable_virtual_machine: true,
},
}).unwrap();
Pre-existing Claw instances and bound configs are preserved when switching kinds — the flags only affect which sandbox the agent uses and which sections render, not the stored data.
get_component_info("SandboxConfig")
get_component_info("AgentConfigPrompts")
get_component_info("LLMProviderModal")
Both components import from @iblai/iblai-js/web-containers.
<SandboxConfig>| Prop | Type | Required | Description |
|---|---|---|---|
platformKey | string | Yes | Organization key (org slug) |
mentorUniqueId | string | Yes | Agent UUID |
username | string | null | No | Current user. Falls back to getUserName() from localStorage when omitted |
<AgentConfigPrompts>| Prop | Type | Required | Description |
|---|---|---|---|
platformKey | string | Yes | Organization key (org slug) |
mentorUniqueId | string | Yes | Agent UUID |
sandbox-kind-computational-runtime,
sandbox-kind-virtual-machine or sandbox-kind-claw.LLMProviderModal to pick a provider /
model ({provider}/{name}). Writes to the agent config's model
field.Eight rows, each with a (i) info tooltip and an Edit button
that opens a RichTextEditor modal:
| Field | Backed by | Purpose |
|---|---|---|
| Identity | IDENTITY.md | Agent persona, name, creature type, visual description |
| Soul | SOUL.md | Behavioural guidelines, personality, communication style |
| User Context | USER.md | Deployment context, SSH hosts, device names, TTS voices |
| Tools | TOOLS.md | Tool usage notes, device names, API aliases |
| Agents | AGENTS.md | Multi-agent routing, agent ids, workspaces |
| Bootstrap | BOOTSTRAP.md | One-time first-run instructions |
| Heartbeat | HEARTBEAT.md | Periodic task definitions |
| Memory | MEMORY.md | Seed memory, curated long-term facts |
Updates are upserts — the first PATCH bootstraps the row.
From @iblai/iblai-js/web-containers:
SandboxConfig, AgentConfigPrompts — the two section components.useLlmProviderCatalogue — resolves a provider key to its display
name and logo, for custom UI that shows the chosen model (see
/iblai-vibe-agent-llm).From @iblai/iblai-js/web-containers/next:
LLMProviderModal — the LLM tab's provider/model picker
(/iblai-vibe-agent-llm), mountable standalone (e.g. for an "override
default model" flow outside the sandbox). The Model row's own picker is
internal and not exported.LLMProvider, LLMProviderType — types for the picker (LLMProviderType
is the { name, chat_models } provider row; LLMProvider the full row
with display_name and logo).From @iblai/data-layer:
useGetClawMentorConfigQuery,
useCreateClawMentorConfigMutation,
useDeleteClawMentorConfigMutation,
usePushClawConfigMutation — connect / disconnect / push.useGetClawInstancesQuery,
useCreateClawInstanceMutation,
useUpdateClawInstanceMutation,
useDeleteClawInstanceMutation,
useHealthCheckClawInstanceMutation,
useTestConnectivityClawInstanceMutation — instance CRUD + checks.useGetAgentConfigQuery, useUpdateAgentConfigMutation — prompt
fields + model.Skills hooks and types (useGetAgentSkillsQuery, AgentSkill, …)
are documented in /iblai-vibe-agent-skills.
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 errorspnpm test -- vitest must pass/agents/<id>/sandbox in the browser as /iblai-vibe-ops-test says: open it,
use every control this skill added, read the console, check the phone width.mentorReducer and mentorMiddlewareinitializeDataLayer(): 5 args (v1.2+)@reduxjs/toolkit: Deduplicated via webpack aliases in next.config.tssonner and @iblai/iblai-web-mentor must be installed
(pnpm add sonner @iblai/iblai-web-mentor)AgentSettingsProvider: Both components take raw props.
If your app already mounts AgentSettingsProvider for sibling tabs,
read its values via useAgentSettings() in the page wrapper and
forward them.mentorUniqueId vs mentorId: The sandbox endpoints key on the
agent's UUID (called mentorUniqueId in the SDK), not the integer
pk. Pass the same UUID you use everywhere else in the agent-* family.useUpdateClawInstanceMutation itself sends a PATCH that leaves
out an empty gateway_token, which keeps the stored token.usePushClawConfigMutation returns
400 No configuration to push when every agent-config field is
empty. The component mirrors that gate locally — the manual Push
button is disabled until the user has saved at least one prompt.useGetClawMentorConfigQuery 404s when no agent
has been bound to a sandbox — that's the "not connected" state, not
a failure. The component treats isError as null here. Custom
consumers should do the same.SandboxConfig owns the
three flags (enable_computational_runtime, enable_virtual_machine,
enable_claw) and enforces the one-at-a-time rule in each PUT
(see Step 2.5) — host-side tab gating on enable_claw is no longer
required. Custom UI writing the flags directly must clear the other
two when enabling one. Existing Claw instances and configs are
preserved across kind switches.enable_claw and enable_virtual_machine live on
MentorSettings; enable_computational_runtime lives on Mentor —
all three are readable from the settings response and writable
through the same agent-settings update (useEditMentorMutation).For custom UI beyond these three components. All endpoints are
prefixed with ${dmUrl}/api/ai-mentor/orgs/{org}/ where dmUrl is
NEXT_PUBLIC_API_BASE_URL. Auth: Authorization: Token <token>.
| Method | Path | Body |
|---|---|---|
| GET | users/{username}/mentors/{mentor_unique_id}/settings/ | Returns the full settings object, including enable_claw, enable_virtual_machine, and enable_computational_runtime (booleans) |
| PUT | users/{username}/mentors/{mentor_unique_id}/settings/ | e.g. { "enable_virtual_machine": true, "enable_claw": false, "enable_computational_runtime": false } |
The kinds are mutually exclusive by convention, enforced client-side:
when enabling one flag, send the other two as false in the same
request. Only enable_claw unlocks the OpenClaw endpoints below.
| Method | Path | Purpose |
|---|---|---|
| GET | claw/instances/ | List instances |
| POST | claw/instances/ | Register a new instance |
| PATCH | claw/instances/{id}/ | Update name / URL / type / token |
| DELETE | claw/instances/{id}/ | Delete |
| POST | claw/instances/{id}/health-check/ | Run a health probe |
| POST | claw/instances/{id}/test-connectivity/ | Run a connectivity probe |
Create / update body:
{
"name": "acme-support-vm",
"server_url": "https://vm-1.acme-demo.example",
"claw_type": "openclaw",
"gateway_token": "<gateway token>"
}
gateway_token is write-only. Omit on update to keep the existing value.
| Method | Path | Purpose |
|---|---|---|
| GET | mentors/{mentor_unique_id}/claw-config/ | Read current binding (404 = not connected) |
| POST | mentors/{mentor_unique_id}/claw-config/ | Connect — body { "server": <instanceId>, "enabled": true } |
| DELETE | mentors/{mentor_unique_id}/claw-config/ | Disconnect |
| POST | mentors/{mentor_unique_id}/claw-config/push-config/ | Push current agent config to the sandbox |
push-config/ returns 400 No configuration to push when every agent-config
field is empty. Pre-flight by checking the agent config locally.
| Method | Path | Purpose |
|---|---|---|
| GET | mentors/{mentor_unique_id}/agent-config/ | Read prompts + model |
| PATCH | mentors/{mentor_unique_id}/agent-config/ | Upsert — first write bootstraps the row |
Body fields: identity, soul, user_context, tools,
agents, bootstrap, heartbeat, memory (each is the markdown
body of the corresponding *.md workspace file), plus model
("{provider}/{name}").
Agent Skills endpoints (catalog, resources, per-agent assignments)
are documented in /iblai-vibe-agent-skills.
The Ephemeral Virtual Machine kind runs code in a private Linux
computer, created when the agent runs a command and deleted when that reply
is done, with no network by default. What it may reach is chosen per agent through
three settings fields — virtual_machine_egress
(none | registries | public | custom),
virtual_machine_network_policy_id and virtual_machine_secret_ids — and
the organization-wide networks and environment variables they point at
live under /api/ai-account/orgs/{org}/ (virtual-machine-network-policy/,
virtual-machine-secret/).
That whole surface has its own skills:
/iblai-vibe-agent-virtual-machine — the Sandbox tab's Network
Access section: egress profile, network picker, environment
variables, the rules the UI enforces before saving, and the agent
settings fields./iblai-vibe-virtual-machine — organization settings → Network
and Secrets → Environment Variables: the tables, their dialogs,
validation limits, RBAC verbs and the REST endpoints.Billing: VM lifetime is charged to the chatting user's credits,
$1 per 10 minutes by default (an organization can have its own rate),
prorated per second.
404 Not Found on claw-config/ — the agent isn't connected.
Treat as the "not connected" state, not a failure.400 No configuration to push — at least one prompt field must be
populated before pushing.400 Gateway token required — required on instance create; on
edit only when rotating.assets/nemoclaw/bashrc-snippet.sh (opens in a new tab)assets/openclaw/AGENTS.md (opens in a new tab)iblai-vibe-agent-sandbox-actions.png (opens in a new tab)iblai-vibe-agent-sandbox-connected-model.png (opens in a new tab)iblai-vibe-agent-sandbox-connected.png (opens in a new tab)iblai-vibe-agent-sandbox-edit-instance.png (opens in a new tab)iblai-vibe-agent-sandbox-edit-prompt.png (opens in a new tab)iblai-vibe-agent-sandbox-new-instance.png (opens in a new tab)iblai-vibe-agent-sandbox-prompts.png (opens in a new tab)iblai-vibe-agent-sandbox-type-computing.png (opens in a new tab)iblai-vibe-agent-sandbox-type-vm.png (opens in a new tab)iblai-vibe-agent-sandbox.png (opens in a new tab)references/nemoclaw-sandbox.md (opens in a new tab)references/openclaw-install.md (opens in a new tab)references/openclaw-post-installation-setup.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
agent-sandbox, claw, openclaw, virtual-machine, agent-workspace
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