Pi Coding Agent is a TypeScript coding agent with seven built-in tools (read, write, edit, bash, grep, find, ls). Mirage provides an extension factory that swaps Pi’s host-backed operations forDocumentation Index
Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
Use this file to discover all available pages before exploring further.
Workspace operations.
Node only. Pi is a CLI agent; it uses
process.cwd(), agent directories, and other Node-only APIs.Install
Usage
Exports
| Symbol | Purpose |
|---|---|
mirageExtension(ws, opts?) | Returns an ExtensionFactory that registers all 7 Pi tools against ws. |
mirageOperations(ws) | Lower-level: returns the { read, write, edit, bash, grep, find, ls } operation bundle if you want to register tools manually. |
buildSystemPrompt | Generates a system prompt that describes mounted paths to the model. |
mirageExtension accepts { cwd?: string }, defaults to '/', which tells Pi the working directory inside the mounted workspace.
Examples
examples/typescript/agents/pi/ram_pi.ts, RAM-only sandbox.examples/typescript/agents/pi/s3_pi.ts, Pi exploring an S3 bucket through Mirage.