agentenv-vfs
An agent-env plugin that gives an agent any env's tools through agentvfs: a shell in a Mirage workspace, where each of the env's MCP tools is a command of the same name, instead of MCP tool calls.
$ add_note --title "Budget sync" --body "Q3 budget is flat" --tags finance
{"id": 2, "title": "Budget sync", ...}
$ list_notes | jq -r '.[] | select(.tags | index("finance")) | .title'
Budget sync
It works with any env that serves MCP tools, a plain MCP server or a gateway env, and needs no change to the env, its tasks' other steps or agent-env itself.
Install
uv tool install --python 3.12 agentenv-framework --with agentenv-vfs
agent-env vfs --help
Or pip install agentenv-vfs into an environment of your own, which brings agent-env with it. Pin a release with
agentenv-vfs==<version>: wrap points bundles at the server image of the same version.
You need Docker, as for any local agent-env run.
Use it on a bundle
agent-env vfs wrap my-bundle --out my-bundle-vfs
agent-env run my-bundle-vfs
wrap copies the bundle and, in each task, puts an agentvfs env in front of the agent's envs:
- a
deploy_envofagentvfsnames the envs it fronts (env_params.env, one id or a list) and the agent's role, and waits for those envs, for every tool lock on the role, and for whatever the agent's own deploy waits for; - the agent's
env_idsbecome["agentvfs"], and its built-in tools go off (builtin_tools: {"disable": "*"}); - the agent's instructions gain one paragraph on working through commands (
--no-noteleaves them as they are).
After the steps that send the agent work, a step copies the agentvfs env's log of the agent's shell lines and the tool
calls each made into the run's record, as script_results.agentvfs_calls (--no-call-log leaves it out). Every other
step (other agents, judges, verifiers) is kept as it is. Keep the agent's built-in tools with --keep-builtins (see
Agents for which agents can have them turned off).
Choosing the agents
The agent to wrap is the one the tasks prompt. Name others with --agent, by their agent_name, once per agent:
agent-env vfs wrap my-bundle --out my-bundle-vfs --agent judge --agent judge-b # only the judges work through agentvfs
Any agent a deploy_agent deploys can be wrapped, whatever sends it work:
| The agent | Its paragraph goes in | Its log is copied |
|---|---|---|
prompted by prompt_agent steps |
their system_prompt |
after its prompts |
| a judge for verifier steps | their grading_policy_prompt (a configured system prompt would replace the agent's own) |
after those verifiers |
| sent work some other way, such as by an env's triggers | its deploy_agent system_prompt, if it has one |
at the end of the run |
Each wrapped agent gets its own agentvfs env, so two agents of one role (two judges, say) don't share a workspace.
With one agent wrapped its env is agentvfs and its log agentvfs_calls; with several, each agent's env is
agentvfs-<agent> and its log agentvfs_calls_<agent>.
To wire tasks yourself, add the env with agent-env vfs add-env my-bundle and deploy it after the env it fronts:
{"id": "vfs", "type": "deploy_env", "env_id": "agentvfs", "env_params": {"env": "notes", "role": "alice"},
"depends_on": ["env"]},
{"id": "agent", "type": "deploy_agent", "env_ids": ["agentvfs"], "builtin_tools": {"disable": "*"},
"depends_on": ["vfs"]}
examples/notes is a small bundle to try it on: a notes env, a task, and a check that reads the
notes back. examples/notes-and-contacts gives one agent two envs, which wrap fronts
from one workspace.
Agents
It works with any agent-env agent: agentvfs is an env, and the agent reaches it over MCP as it reaches any env. Pass
wrap --for-agent NAME when you run with agent-env run --agent NAME, so the bundle fits that agent:
| Agent | Built-in tools | Checked with |
|---|---|---|
| claude-code (the default), codex, opencode, antigravity (agent-env 0.9.1650+) | turned off: the shell is the agent's only tool | the notes example; claude-code and codex on a gateway env's tasks too |
| gemini, hermes, letta-code, openhands, pi | kept: agent-env can't turn them off | the notes example; gemini on a gateway env's task too |
| pydantic-ai | kept | not yet: its own coding tools include one named shell, which agent-env adds MCP tools beside without a prefix |
How it works
- One tool. The agent's only tool is
shell, a bash line in its role's workspace./SKILL.mdlists the commands,<command> --helpshows one, and/workspaceand/tmpare its own.python3is CPython in Pyodide, inside the workspace: its standard library, the workspace's files and commands, no network.curlandwgetare refused: the env is reached through its commands. - Commands are the envs' tools. One workspace serves the tools of every env it fronts, each call going to the env
that serves its tool; two envs that serve a tool of the same name are refused. Each tool is a command named as the
tool is, each parameter a flag of the same name
(
--channel_id, or--channel-id); a list or an object is one JSON value. Theshelltool's description lists every command for the role named at deploy, so the agent sees them up front, as it would see MCP tools. - Calls go to the env as the agent. A command's call goes to the fronted env's MCP endpoint with the agent's
AgentEnv-Role, which the agent sends with every call. So the env sees the calls an MCP agent of that role would make: its tool locks, triggers and logs all apply, and each role gets its own workspace. - What a run keeps. The env logs every shell line and every tool call a line makes (role, tool, arguments,
outcome, timing), in order.
data/getofcalls.jsonlreturns it, and the stepwrapadds copies it into the run. - Where it runs. The env is an MCP server env. Its image (Python, Node 24, Mirage's npm packages and Pyodide) is
published at
ghcr.io/earakely-scale/agentenv-vfs, tagged with the plugin's version, for linux/amd64 and linux/arm64. A wrapped bundle pulls it, and keeps its build context inenvs/agentvfs, which a deploy builds only where it can't pull the image (--buildalways builds it). The env reaches the fronted env at the address agent-env gives for its sandbox. Checked locally (Docker) and on Modal (agent-env run --sandbox modal), where the image is pulled and the fronted envs are reached over their Modal tunnels.
Not covered yet
- Python packages beyond the standard library (Pyodide fetches them from the network, which the workspace refuses).
- Mounting an env's data as files: reads are commands, as writes are.
- Waiting for the world: a shell-only agent waits with
sleep. - Remote sandbox providers other than Modal have not been tried.
Development
uv venv && uv pip install -e . 'agentenv-framework>=0.9.1637' pytest
.venv/bin/python -m pytest tests # unit tests
PATH=.venv/bin:$PATH tests/integration/run.sh # the server image against a plain MCP server (Docker)
Releasing
Set version in pyproject.toml, push to main, then tag v<version> and push the tag. The image workflow
publishes ghcr.io/earakely-scale/agentenv-vfs:<version>, which wrap of that version points bundles at, and the
publish workflow publishes the package to PyPI through trusted publishing (no token).
License
Apache-2.0. Parts are adapted from agentvfs/vfs-bench (MIT); see NOTICE.
Metadata
Release files for agentenv-vfs 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentenv_vfs-0.4.2.tar.gz | 61.0 kB | With provenance | Details for agentenv_vfs-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentenv_vfs-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for agentenv_vfs-0.4.2-py3-none-any.whl |
Total release size: 116.1 kB
Release files / agentenv_vfs-0.4.2.tar.gz
| Download URL | agentenv_vfs-0.4.2.tar.gz |
|---|---|
| Size | 61.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
918a55a0f4e2066ad81807d7ad5ede5612175194a1ce084f7029251d95a39bb1
|
|
BLAKE2b-256 checksum How to use checksums |
19db89924ffa72f1dac54e773729c9feecd0abebc79149afb01fe0500635bad4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / agentenv_vfs-0.4.2-py3-none-any.whl
| Download URL | agentenv_vfs-0.4.2-py3-none-any.whl |
|---|---|
| Size | 55.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
161ed6f4d5548c37cba2c44e08f27cfd13be84f29261e5537b0b4065ce025abe
|
|
BLAKE2b-256 checksum How to use checksums |
11aee169622390a72518b6a6e3f1f21dc76c11f23c062187ed5706cb5d3b94d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for agentenv-vfs 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agentenv_vfs-0.4.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.