AI SDK X

AI SDK X

Your AI SDK may only need this tool.

Agent REPL
you>
Shell REPL
$ls ~/workspace
project.md notes.md plan.md
$echo "hello from virtual bash"
hello from virtual bash
$printf "remember this" | x-memory add reminder
/home/user/memory/daily/2026-05-24/reminder.md
$js-exec -c 'const x = 2 ** 10; print(x)'
1024
$

Bash is everything

In the age of AI agents, Bash is everything — so we built a virtual Bash.

  • curl networking — call any HTTP endpoint from the agent shell
  • js-exec (QuickJS WASM) — fast, sandboxed JavaScript without Node.js
  • Full POSIX shell — ls, cat, grep, sed, awk, pipes, redirects
  • Composable — register your own commands alongside the built-ins

Built on any Backend

These can be virtual file systems mounted by different file systems, such as local disks, Amazon S3, or any unified interface.

AI SDK X
📁Workspace
x-patch
🧠Memory
x-memory add
🔧Skills
x-skills install
node:fs
AWS S3
caching-fs
Vercel Blob

Integrate with AI SDK

AI SDK X is built on top of Vercel AI SDK. Callbash.getTools()and pass the result directly intogenerateText,streamText.

  • Works with every model provider in the AI SDK
  • Multi-step tool calls via maxSteps
  • Memory and Skills available as shell commands inside each call
agent.ts
import { X } from "ai-sdk-x";
import { ToolLoopAgent } from "ai";

const bash = X.init();
const tools = await bash.getTools();

const agent = new ToolLoopAgent({
  model: "gpt-5.5",
  tools,
  stopWhen: stepCountIs(20),
});

await agent.generate({
  prompt: `
    First, search and install "frontend-design" Skills.

    Then, read it and implement a "Snake game" in the Workspace.

    Finally, summarise into Memory.`
});

Runs wherever your stack lives

It runs on Node.js, Vercel, Cloudflare Workers, and even in embedded environments.

NodeJS

Runs in-process on Node.js

Vercel

Edge & Serverless Functions, no cold-start penalty

Cloudflare Workers

Edge-native, bring KV / R2 / D1 as your storage

Any JS runtime

Bun, Deno, AWS Lambda — pure ESM, no platform lock-in

Ready to give your agent a shell?

Drop npm i ai-sdk-x into your project and hand the AI a virtual Bash in three lines of code.