Hi everyone,
Do you know what Just Bash is?
Just Bash has implemented a virtual Bash using TypeScript. It supports most Unix-like commands.
I built AI SDK X as a wrapper around Just Bash:
Docs: AI SDK X
It make it easier to use as an AI SDK agent runtime, especially in serverless and embedded environments where local disk may be temporary, process memory may disappear, and runtime state often needs to be stored externally.
ai-sdk-x adds several agent-oriented features:
- Workspace: a mounted working directory for task files and deliverables.
- Memory: persistent notes for user preferences, project context, and daily memory.
- Skills: install, import, search, and load reusable agent instructions.
- Patch: an
x-patchcommand for structured file edits. - Git: built-in Git support powered by
just-git. - Feature registration: custom commands, mounts, env vars, and execution hooks.
- AI SDK integration:
getTools()generates an AI SDK-compatible Bash tool.
I also added several filesystem wrappers to make the runtime more useful in serverless scenarios.
Example:
const cachedFS = new CachingFs({
cache,
fs,
});
const x = X.init({
fs: cachedFS,
git: true,
patch: true,
memory: true,
skills: true,
workspace: true,
});
const tools = await x.getTools();
const result = await generateText({
model,
tools,
stopWhen: stepCountIs(20),
prompt: `
Inspect the workspace.
Create a small snake game.
Use x-patch to edit files.
Save a short summary into memory.
`,
});
It will automatically inject the current environment and each individual feature into the tool description.
We have created two examples for Local and Serverless(Cloudflare Workers).
Local, use Nextjs: GitHub - Niapya/x-next: A Minimal Agent Powered by Next and AI SDK X. · GitHub
Cloudflare Worker, use VIte: GitHub - Niapya/x-worker: Agent on Cloudflare Workers, Powered By AI SDK X. · GitHub
I’m still improving the project and would love feedback from the AI SDK / Vercel community.