iblai-vibe-agent-sandbox
Skill222 starsChanged 13 days agoMITView on GitHub
Add the agent Sandbox tab to your Next.js app, with the Sandbox Type card (Calculator, Ephemeral Virtual Machine or Permanent Virtual Machine, one at a time), Claw instance management and the agent prompt files for the Permanent Virtual Machine. Use when the user mentions a sandbox, letting an agent run code, a virtual machine for an agent, Claw or OpenClaw instances, or the agent workspace prompts. For the virtual machine's network access see /iblai-vibe-agent-virtual-machine; for skills see /iblai-vibe-agent-skills.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- iblai/vibeword for word, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- iblai/vibe★ 222100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository166 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- iblai-vibe-pr-reviewSkill
- iblai-api-agent-accessSkill
- iblai-api-agent-auditSkill
- iblai-api-agent-chatSkill
- iblai-api-agent-createSkill
- iblai-api-agent-datasetSkill
- iblai-api-agent-disclaimerSkill
- iblai-api-agent-embedSkill
- iblai-api-agent-evalSkill
- iblai-api-agent-historySkill
- iblai-api-agent-llmSkill
- iblai-api-agent-mcpSkill
- iblai-api-agent-memorySkill
- iblai-api-agent-privacySkill
- iblai-api-agent-promptSkill
- iblai-api-agent-safetySkill
- iblai-api-agent-sandboxSkill
- iblai-api-agent-sessionSkill
- iblai-api-agent-settingSkill
- iblai-api-agent-skillSkill
- iblai-api-agent-supportSkill
- iblai-api-agent-toolSkill
- iblai-api-agent-voiceSkill
- iblai-api-inferenceSkill
- iblai-api-searchSkill
- iblai-vibe-agent-accessSkill
- iblai-vibe-agent-analyticsSkill
- iblai-vibe-agent-apiSkill
- iblai-vibe-agent-assistantSkill
- iblai-vibe-agent-auditSkill
- iblai-vibe-agent-billingSkill
- iblai-vibe-agent-chat-sidebarSkill
- iblai-vibe-agent-chatSkill
- iblai-vibe-agent-createSkill
- iblai-vibe-agent-datasetSkill
- iblai-vibe-agent-disclaimerSkill
- iblai-vibe-agent-embedSkill
- iblai-vibe-agent-evalsSkill
- iblai-vibe-agent-graderSkill
- iblai-vibe-agent-historySkill
- iblai-vibe-agent-llmSkill
- iblai-vibe-agent-ltiSkill
- iblai-vibe-agent-mcpSkill
- iblai-vibe-agent-memorySkill
- iblai-vibe-agent-privacySkill
- iblai-vibe-agent-promptSkill
- iblai-vibe-agent-safetySkill
- iblai-vibe-agent-screenshareSkill
- iblai-vibe-agent-searchSkill
- iblai-vibe-agent-settingSkill
- iblai-vibe-agentSkill
- iblai-vibe-agent-skillsSkill
- iblai-vibe-agent-supportSkill
- iblai-vibe-agent-taskSkill
- iblai-vibe-agent-toolSkill
- iblai-vibe-agent-virtual-machineSkill
- iblai-vibe-agent-voiceSkill
- iblai-vibe-incognitoSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Add the agent Sandbox tab -- choose where the agent runs code and, for a Permanent Virtual Machine, manage its Claw workspace.
- Very specific: line 28
Before @iblai/web-containers 2.0.0 they were called Computing Runtime, Virtual Machine Shell and Claw.
- Very specific: line 83
Ask the user for a real mentorId (agent UUID).
- Very specific: line 92
Before proceeding, check for an iblai.env in the project root.
- Distinctive: line 253
Only one can be on at a time: enabling one turns the others off in the same save.
- Distinctive: line 279
Check, with Run Checks and Disconnect actions.
- Very specific: line 347
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 …
- Very specific: line 359
Redux store: Must include mentorReducer and mentorMiddleware
- Very specific: line 365
If your app already mounts AgentSettingsProvider for sibling tabs, read its values via useAgentSettings() in the page wrapper and forward …
- Distinctive: line 494
Treat as the "not connected" state, not a failure.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/iblai-vibe-agent-sandbox
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:
- Calculator — the cheapest option. Quick math, dates and small data tasks while the agent replies; nothing is kept once the reply is done.
- Ephemeral Virtual Machine — a private Linux computer that starts when the agent runs a command and is deleted once the reply is done. It runs real programs and makes files, and costs extra each time it is used.
- Permanent Virtual Machine — a Claw computer that stays on between chats and keeps its own skills and plugins; you are billed for the chats it handles. It works once the agent is connected to a Claw instance, and selecting it reveals the instance management sections below the card.
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).
Image: Sandbox — Permanent Virtual Machine selected, instances list
Image: Sandbox Type — Calculator selected
Image: Sandbox Type — Ephemeral Virtual Machine selected, with Network Access below
Image: Sandbox — Per-row actions
Image: Sandbox — New Instance dialog
Image: Sandbox — Edit Instance dialog
Image: Sandbox — Connected Instance, Auto Push, Push
Image: Sandbox — Connected Instance with Push Configuration and Model
Image: Sandbox — Prompts (Identity, Soul, User Context, Tools, Agents)
Image: Sandbox — Edit prompt dialog
Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
OpenClaw workspace & sandbox runtime
- Post-installation setup — install this repo's skills into the OpenClaw
agent and swap the workspace
AGENTS.md:references/openclaw-post-installation-setup.md. - NemoClaw sandbox hardening — running the agent inside a NemoClaw /
OpenShell sandbox:
references/nemoclaw-sandbox.md.
Prerequisites
- Auth must be set up first (
/iblai-vibe-auth) - MCP server + skills configured (
@iblai/mcpin.mcp.json) - Ask the user for a real
mentorId(agent UUID). Do NOT invent one. - Only for Permanent Virtual Machine: a reachable OpenClaw instance URL plus a Gateway Token to register the first instance. Without one, the Sandbox section sits empty ("Add Instance") and the Prompts section is gated until a config is connected. Calculator and Ephemeral Virtual Machine need no external instance — they are single toggles.
Step 1: Check Environment
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"
Step 2: Mount the two sections
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.
Step 2.5: Sandbox types (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.
Step 3: Use MCP Tools for Customization
get_component_info("SandboxConfig")
get_component_info("AgentConfigPrompts")
get_component_info("LLMProviderModal")Component Props
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 |
What each section renders
Sandbox Type (kind selection)
- Three switch rows — Calculator, Ephemeral Virtual Machine,
Permanent Virtual Machine — each with a sentence on how long it lasts
and what it costs, and an info tooltip with the longer explanation.
Only one can be on at a time: enabling one turns the others off in the
same save; switches update optimistically and revert on failure. A
switch's accessible name is the kind and its state ("Calculator on");
its test id is
sandbox-kind-computational-runtime,sandbox-kind-virtual-machineorsandbox-kind-claw. - Everything below the card (instances, connected card, Auto Push, Push, Model) renders only while Permanent Virtual Machine is on — the claw-config query is skipped entirely for the other kinds.
Sandbox (instance management + connection — Permanent Virtual Machine only)
- Instances table — searchable, paginated (5 per page). Columns: Name, URL, Type, Status (Active / Error), Health (Healthy / Unhealthy with full error in tooltip), Version, Last Check.
- Add Instance — opens a "New Instance" dialog: Name, Type (OpenClaw or IronClaw), Server URL, Gateway Token. The token is write-only — never read back from the API.
- Connect — an outline button beside each row's kebab menu that binds the instance to the current agent; disabled while the row's Status reads Error (tooltip "This instance is unhealthy. …") and while a connect is in progress.
- Per-row actions (kebab menu): Run Checks (health + connectivity ping), Edit (Name, Type, Server URL, Gateway Token; Save stays disabled until the token is entered again), Delete.
- Connected Instance card — once an agent is bound, the table collapses into a card showing Name, URL, Status, Health, Last Check, with Run Checks and Disconnect actions.
- Auto Push on Save — when on, every prompt edit pushes to the sandbox. When off, the user pushes manually.
- Push Configuration — manual Push button + "Last pushed" / "Never pushed" indicator. Disabled when the agent has no populated prompt fields (the API rejects empty pushes server-side and we mirror that locally).
- Model — opens the
LLMProviderModalto pick a provider / model ({provider}/{name}). Writes to the agent config'smodelfield.
Prompts (agent workspace files)
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.
Related Exports
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 (LLMProviderTypeis the{ name, chat_models }provider row;LLMProviderthe full row withdisplay_nameandlogo).
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.
Step 4: 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:
pnpm build-- must pass with zero errorspnpm test-- vitest must pass- Touch test
/agents/<id>/sandboxin the browser as/iblai-vibe-ops-testsays: open it, use every control this skill added, read the console, check the phone width.
Important Notes
- Redux store: Must include
mentorReducerandmentorMiddleware initializeDataLayer(): 5 args (v1.2+)@reduxjs/toolkit: Deduplicated via webpack aliases innext.config.ts- Peer deps:
sonnerand@iblai/iblai-web-mentormust be installed (pnpm add sonner @iblai/iblai-web-mentor) - No
AgentSettingsProvider: Both components take raw props. If your app already mountsAgentSettingsProviderfor sibling tabs, read its values viauseAgentSettings()in the page wrapper and forward them. mentorUniqueIdvsmentorId: The sandbox endpoints key on the agent's UUID (calledmentorUniqueIdin the SDK), not the integer pk. Pass the same UUID you use everywhere else in the agent-* family.- Gateway token write-only: The API never returns the token. Both
instance dialogs require it, so every edit means entering it again.
useUpdateClawInstanceMutationitself sends aPATCHthat leaves out an emptygateway_token, which keeps the stored token. - Push gating:
usePushClawConfigMutationreturns400 No configuration to pushwhen 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. - 404 ≠ error:
useGetClawMentorConfigQuery404s when no agent has been bound to a sandbox — that's the "not connected" state, not a failure. The component treatsisErrorasnullhere. Custom consumers should do the same. - Sandbox kinds are mutually exclusive:
SandboxConfigowns the three flags (enable_computational_runtime,enable_virtual_machine,enable_claw) and enforces the one-at-a-time rule in eachPUT(see Step 2.5) — host-side tab gating onenable_clawis 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. - Flag homes:
enable_clawandenable_virtual_machinelive onMentorSettings;enable_computational_runtimelives onMentor— all three are readable from the settings response and writable through the same agent-settings update (useEditMentorMutation). - Brand guidelines: BRAND.md
Sandbox REST API
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>.
Sandbox type flags (agent settings)
| 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.
Instances (organization-scoped)
| 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.
Sandbox binding (binds an instance to an agent)
| 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.
Agent configuration (prompts + model)
| 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.
Virtual machine networks & environment variables
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.
Common errors
404 Not Foundonclaw-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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

