Skip to main content
The Vercel AI SDK (ai) drives tool-calling agents around any provider in its registry. Mirage ships a tool factory that exposes a Workspace as five typed tools (execute, readFile, writeFile, editFile, ls) for generateText / streamText / agent loops.

Install

@struktoai/mirage-agents/vercel is runtime-agnostic. Pair it with @struktoai/mirage-node for Node or @struktoai/mirage-browser for the browser.

Usage

Exports

Tool reference

writeFile always succeeds for new paths and overwrites existing ones; if you want create-only semantics (error when the file exists), wrap it yourself.

Examples