For agents
Give an agent a fork and a key for it, review what it did, keep it or throw it away.
An agent is safest with three fences, and PhantomDisk has all three: a key that reaches one drive, a drive that is a fork of the real one, and 30 days of history behind every change.
The fork workflow
- Fork the drive. The fork has every file, and no data is copied, so it takes seconds.
- Make a key for the fork only. The agent cannot see your real drive at all.
- Let the agent work. It reads and writes the fork through MCP, the tool or an SDK.
- Review, then keep or discard. Copy what you want back, or delete the fork. Your drive never changed.
phantomdisk login
phantomdisk drive fork "My Drive" agent-run
# The key is shown once. Give it to the agent.
phantomdisk keys create --label agent --access write --drive agent-run
# Afterwards: look at what it did, or throw the fork away.
phantomdisk ls agent-run:/
phantomdisk drive delete agent-run
A fork counts against your plan like any other files.
If the agent works in your real drive
Nothing it does is final. Every save and delete can be undone for 30 days, one file at a time or a whole folder at once:
phantomdisk rollback /project --at 1h --dry-run # what would change
phantomdisk rollback /project --at 1h # back as it was an hour ago
Rules to give your agent
Paste this into AGENTS.md, CLAUDE.md or your agent’s instructions:
## Files: PhantomDisk
- Your files are in a PhantomDisk drive. Use the phantomdisk tools (or the `phantomdisk`
command) to read and write them. Do not look for them on the local disk.
- Paths start at the drive root, for example /notes/plan.md.
- Read a file before you change it. `write` replaces the whole file; `append` adds
to its end.
- A mistake loses nothing: every save is kept for 30 days. Use `history` and
`restore_version` to go back, and say so when you do.
- `delete` moves a file to Recently Deleted. You cannot delete for good, and should
not try to.
- Before a risky change across many files, ask for a fork of the drive and work there.
- Never print the access key or write it into a file.
For coding agents reading these docs
/llms.txt lists every page here with a one-line summary and the facts an agent gets wrong most often.
Next: HTTP API