Skip to main content

Introducing bash-tool for filesystem-based context retrieval

By Steven Van ·

Vercel open-sources bash-tool, letting AI SDK agents run bash, grep, and jq over a local filesystem instead of loading it all into the prompt.

Vercel has open-sourced bash-tool, the Bash execution engine behind its text-to-SQL agent, which was re-architected to cut token usage and improve accuracy and performance. The library lets an agent run bash-like commands, such as find, grep, and jq, over a filesystem of files and get back only the results of those calls, rather than pasting the full content into the prompt.

bash-tool provides bash, readFile, and writeFile tools for AI SDK agents. It runs on top of just-bash, which interprets bash scripts directly in TypeScript without a shell process or arbitrary binary execution. A filesystem of files can be preloaded at startup so the agent can search it on demand, and it can run either in-memory or against a Sandbox-compatible API, such as Vercel Sandbox, for full VM isolation.

Read the original announcement for setup examples.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Original source

Read Introducing bash-tool for filesystem-based context retrieval on Creators Toolbox