Managing Files and Output in the Devin AI Tool: Workflows and Best Practices
When Devin was first evaluated on the SWE-bench coding benchmark, it resolved approximately 14% of issues unassisted, establishing a new baseline for autonomous software agents. However, teams deploying the Devin AI tool face a common hurdle: Devin's cloud Devbox environment is fundamentally ephemeral. This guide explains how to extract files via web download UI, Git push, and external storage mounts, and shows how to automate multi-file outputs using the Devin API and Fastio workspaces.
How the Devin AI Tool Sandbox Filesystem Works
When Devin was first evaluated on the SWE-bench coding benchmark, it resolved approximately 14% of issues unassisted, establishing a new baseline for autonomous software agents [Cognition AI blog introducing Devin]. While this figure proved that agents could handle complex software engineering tasks, it also highlighted a massive operational challenge: managing the files and workspace environments where these agents perform their work.
The Devin AI tool relies on a virtual workspace filesystem where it writes code, outputs build artifacts, and runs test configurations that can be retrieved by users. When a developer starts a new run, Devin boots into a clean, cloud-hosted Linux container. The codebase lives in /workspace, environment configurations are loaded in /home, and temp files are written to /tmp. This container isolates Devin's operations to protect user infrastructure, but the disk state is ephemeral. When the run finishes, the container is destroyed. Any data not written to external storage disappears.
This temporary state means that developer workflows must proactively manage files and outputs to prevent data loss. Relying on Devin's local virtual disk for persistence is a mistake. Developers must instruct the agent to move files to a persistent storage location or commit them to source control before closing a session. By default, Devin is designed to work with Git repositories for code changes, but non-code files require external persistent workspaces.
Three Practical Methods to Download Files from Devin
To retrieve output from the Devin AI tool, developers can use three primary methods. First, files can be downloaded directly from the web interface. Second, code modifications can be pushed to connected repositories. Third, external cloud folders can be mounted as local sync directories. Managing devin ai file outputs through these three methods ensures that teams can recover logs and build binaries without losing work. Understanding these delivery channels is critical because Devin's virtual Devbox container will shut down and delete all local files once the session is marked complete. By selecting the correct extraction method, engineering teams can integrate the agent's work into their standard deployment processes, ensuring that no generated configurations or build results are lost.
Web Download UI
For manual, ad-hoc file retrieval, the Devin web interface provides inline file previews. When Devin generates visual files, such as HTML reports, PDF documentation, or SVG images, these files are displayed in the session sidebar. A download button is available in the toolbar of each preview panel. Users can click this button to save individual files to their local disk. While convenient for quick checks, this manual process does not scale for continuous deployment pipelines where hundreds of build artifacts are generated automatically.
Git Repository Integration
The standard method for persisting source code changes is through Git. Devin connects to platforms like GitHub and GitLab. When the agent completes a software task, it commits the changes and opens a pull request. This ensures that the primary codebase remains versioned and secure. However, Git is not suitable for non-code artifacts. Database dumps, compiled binaries, test reports, and large media files will bloat a code repository, making this method impractical for rich media workflows.
Mounting External Storage
For local terminal sessions, developers using the Devin CLI can mount cloud-based storage folders. Since the CLI runs on the host machine, standard utility tools like rclone can mount remote storage directories (such as Amazon S3, Google Drive, or Dropbox) locally. By pointing Devin to the local mount path, the agent reads and writes files directly to cloud storage. This configuration is helpful for devin tool workflows that require large file reads.
Automating Multi-File Outputs via the Devin API
While manual downloads and Git commits work for simple tasks, automated workflows require a programmatic way to download files from devin. The Devin API allows organizations to list and retrieve files generated during sessions. Competitor gaps exist because other agent tools fail to detail multi-file delivery methods and automated exports, which are critical for continuous deployment. When managing complex deployments, developers cannot rely on manual web triggers or single-file repository commits. Instead, they must establish automated pipelines that query the agent's active sessions, retrieve output logs, and verify build artifacts. The following section explains how to use the attachments endpoints to build programmatic retrieval loops.
Querying Session Attachments
Every file generated or uploaded during a session is tracked as an attachment. The Devin API provides endpoints to manage these assets. First, developers must retrieve a list of attachments associated with a specific session ID. The HTTP request must include an authorization header with a service token, which is generated under Organization Settings in the web interface and starts with a cog_ prefix.
The endpoint to retrieve the list of attachments uses the following URL structure:
GET https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_id}/attachments
This request returns a JSON response containing an array of attachment objects. Each object includes a unique uuid and the file name.
Downloading Attachment Files Programmatically
Once the attachment UUID is known, developers can download the file. The API exposes a download endpoint:
GET https://api.devin.ai/v1/attachments/{uuid}/{name}
When this endpoint receives a valid request, it returns a 307 Temporary Redirect status code. The response directs the client to a presigned URL. This presigned URL provides temporary access to the file and expires after 60 seconds. The client must immediately follow the redirect to download the file contents.
Here is a Python script that automates listing and downloading all files in a session:
import os
import requests
def download_all_artifacts(org_id, devin_id, api_token, target_folder):
headers = {"Authorization": f"Bearer {api_token}"}
list_url = f"https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_id}/attachments"
response = requests.get(list_url, headers=headers)
if response.status_code != 200:
raise Exception(f"Failed to list attachments: {response.text}")
attachments = response.json().get("attachments", [])
os.makedirs(target_folder, exist_ok=True)
for item in attachments:
file_uuid = item["uuid"]
file_name = item["name"]
# The download API redirects to a presigned storage link
download_url = f"https://api.devin.ai/v1/attachments/{file_uuid}/{file_name}"
file_res = requests.get(download_url, headers=headers, allow_redirects=True)
if file_res.status_code == 200:
output_path = os.path.join(target_folder, file_name)
with open(output_path, "wb") as f:
f.write(file_res.content)
print(f"Downloaded: {file_name}")
else:
print(f"Failed to download {file_name}: {file_res.status_code}")
In addition to the attachments API, teams can export entire session conversations and logs. Using the Devin CLI, running the devin command with the --export flag followed by a target file path saves the run history in ATIF format. This is useful for auditing and troubleshooting run failures.
Automate Devin build persistence
Set up a shared, organization-owned workspace with automatic version history and MCP-native search for your developer agents. Starts with a 14-day free trial.
Why Ephemeral Devin Tool Workflows Need Fastio Persistent Workspaces
While object storage systems like Amazon S3 or Google Drive provide basic storage, they lack features built for agentic workflows. They do not index files automatically, track detailed version history for concurrent agents, or support visual automation pipelines. To solve these limitations, teams can connect the Devin AI tool to Fastio workspaces. An intelligent workspace acts as a collaborative bridge where both human developers and autonomous agents can read, write, and organize files in real time. Rather than relying on simple, disconnected cloud drives that treat files as static blobs, teams gain a shared workspace environment that automatically structures and manages agent outputs.
Shared Workspace Organization
Fastio provides organization-owned workspaces where humans and AI agents collaborate on project assets. Instead of managing individual files, teams share structured folders with granular permissions. Fastio maintains a complete per-file version history. When Devin modifies a design layout or a configuration file, Fastio saves the change as a new version. If the agent makes a mistake, developers can restore the previous version instantly. This version control occurs automatically, making concurrent developer and agent activities fully auditable. Fastio tracks this activity in an append-only audit log, which records every file modification, access event, and share link generation.
Structured Extraction with Metadata Views
When Devin outputs test logs, build reports, or database structures, developers must extract key metrics. Fastio features Metadata Views to turn documents into structured databases. By navigating to the Metadata Views page, users can define custom schemas using fields like build success, error count, or deploy date. Fastio automatically processes incoming files, parses the data, and populates a filterable spreadsheet. This structured layer differs from Intelligence Mode, which focuses on text search and summarization. Metadata Views provide the structured extraction layer that Devin or human team members can query using MCP tools, turning raw logs into searchable data.
Architecting a Continuous Delivery Pipeline for Devin Output
Integrating Devin into a production pipeline requires connecting its sandbox environment to Fastio. This setup enables automated file indexing, ownership transfer, and sharing. By establishing a direct connection between the agent and a persistent organization workspace, developers can build a reliable handoff system. The agent can write its build files, run its tests, and store its logs directly in Fastio, where they are immediately available for review. The following subsections detail the technical steps required to establish this connection using the Model Context Protocol and explain how to configure sharing controls for team members. This setup ensures that final delivery is clean, version-controlled, and ready for integration into your main application deployment branch.
MCP Connection Setup
To interface with Fastio, the Devin AI tool uses the Model Context Protocol (MCP). Fastio exposes action-based MCP tools that allow agents to manage files, create folders, and run search queries. Access is available via Streamable HTTP at the /mcp endpoint or legacy SSE at /sse. The specific tools and implementation guides are detailed in the Fast.io MCP server guide. For onboarding, the developer documentation is hosted in the agent onboarding guide. Devin reads this guide, connects to the MCP server, and writes build outputs directly to Fastio workspaces.
When files arrive in the workspace, Fastio's Intelligence Mode indexes them for semantic search. Devin can query the index to locate relevant deployment files, referencing specific sections using citations. When the session finishes, Devin can initiate an ownership transfer, handing the workspace over to a human team lead while keeping access for future runs.
Branded Shares and Subscription Details
Fastio supports branded shares to distribute outputs safely. Teams can configure Send, Receive, or Exchange links. These shares can have expiration dates or custom access permissions.
Fastio has no permanent free plan and no free agent tier. The platform requires a paid subscription for organizational work. The Starter plan is priced at $29/mo, the Business plan at $99/mo, and the Growth plan at $299/mo. Pricing details are available on the pricing page. Every organization account starts with a 14-day free trial, which requires a credit card. This trial allows teams to configure workspaces, test Devin MCP tool connections, and evaluate automated workflows before any charges occur. Fastio provides these workspace security features without claiming formal compliance certifications.
Frequently Asked Questions
How do I get files out of Devin AI?
You can download files from Devin AI using three main methods: downloading them directly through the web interface toolbar, committing and pushing changes to a connected Git repository, or mounting external storage directories locally to write outputs directly to a persistent cloud provider.
Can Devin AI tool write files to my local system?
The Devin AI tool cannot write files directly to your local system filesystem because it runs inside a cloud-hosted virtual machine sandbox. However, you can use the Devin CLI on your local terminal to establish bidirectional directory synchronization, which automatically syncs changes between the cloud sandbox and your local directory.
How can I automate downloading files from Devin sessions?
You can automate file downloads using the Devin API by making an authorized request to list the session attachments and then querying the individual attachment download endpoints. The API redirects requests to temporary, presigned S3 download links that remain active for 60 seconds.
Related Resources
Automate Devin build persistence
Set up a shared, organization-owned workspace with automatic version history and MCP-native search for your developer agents. Starts with a 14-day free trial.