The default artifact root is /home/desktop/artifacts. Public artifact methods accept safe relative paths under that root.
Write and read an artifact
Use a separate prefix for each run. This prevents unrelated runs from writing the same file.
Upload and download files
List or delete public artifacts with the same relative paths:
logs/, manifest.ndjson, and traces/actions.ndjson are internal control paths. Read process logs through computer.processes.logs() or computer.processes.stderr().
Read a screenshot artifact
Artifact methods accept the relative path after artifact://. Use them to read or download a
saved screenshot. screenshot.as_bytes() and screenshot.to_base64() require inline image data.
See screenshot storage options to choose
when to save an artifact. Follow the persistence steps to keep
artifacts after the Sandbox terminates.
Understand default storage
Artifact files use the Sandbox filesystem by default. They disappear when the Sandbox terminates.
Mount a Modal Volume v2 when files must remain after termination. Set persist_artifacts=True and call computer.artifacts.sync() before you terminate the Sandbox.
Persist to a Modal Volume v2
The immediate-sync contract requires Modal Volume v2.
An existing reader must reload its Volume view after the writer commits. Avoid concurrent writes to one path because Volume conflict resolution uses the last writer.
Artifact paths and URIs can reveal run details. Do not log them unless your logging policy permits that data.