Skip to main content
Haystack is deepset’s framework for building LLM applications and agents. The integration is maintained by deepset and lives in their haystack-core-integrations repository, so it installs as its own package rather than as a mirage-ai extra.

Install

mirage-haystack pins an exact mirage-ai version rather than tracking the latest, because Mirage is pre-1.0. Check the integration’s pyproject.toml for which one, since installing it may move an existing mirage-ai in your environment.

Usage

Describe the mounts, wrap the workspace in a tool, hand the tool to an Agent.
The tool exposes a single command parameter, so the model writes ordinary bash and pipes across mounts. Its description is generated from the mount tree, so the model is told which paths exist without you writing a prompt for it.

Guarding what the agent can do

Two controls, and they are not interchangeable. read_only=True on a mount is the write boundary. Mirage refuses every write to that mount whatever command is used, so this is what prevents modification and deletion. allowed_commands restricts which command names may run. It is checked against every command Mirage would execute, including ones nested in $(...), backticks and subshells, so ls "$(rm x)" is rejected unless rm is allowed too. Treat it as steering, not a sandbox: allowing a command that runs other commands (eval, bash, sh, source, xargs) effectively allows anything. Commands never reach the host shell either way. Mirage interprets them itself, so the blast radius is the mounts you attached.

Exports