Skip to content
Dashboard

Introducing bash-tool for filesystem-based context retrieval

agent.ts
import { createBashTool } from "bash-tool";
const { tools } = await createBashTool({
files: { "src/index.ts": "export const hello = 'world';" },
});
const agent = new ToolLoopAgent({ model, tools });

Using bash-tool with an in-memory filesystem

agent.ts
import { createBashTool } from "bash-tool";
import { Sandbox } from "@vercel/sandbox";
const sandbox = await Sandbox.create();
const { tools } = await createBashTool({ sandbox });
const agent = new ToolLoopAgent({ model, tools });

Using bash-tool with a Vercel sandbox

Try bash-tool in your agent

Install the package along with AI SDK v6, and start building your file system agent.

Get started