Skip to content
Dashboard

6 kinds of agents that need a persistent workspace

Content Engineer

Your agent needs a persistent workspace when its next session depends on files created in a previous session. Vercel Drives keeps a working directory available across sandbox environments so the agent can return to code edits or datasets.

Copy link to headingWhen should you choose a persistent workspace?

Persistent workspaces keep editable files available beyond the session that created them. Use one when your agent needs to:

  • Resume unfinished changes.

  • Reuse intermediate results.

  • Inspect the source files behind an earlier conclusion.

Conversation history preserves what you discussed. The workspace holds the files needed to continue the task.

Agent type

Files to retain

What the next session needs to do

Coding

Modified source, patches, test output

Resume an unfinished fix

Data analysis

Datasets, cleaning scripts, charts

Compare another segment or reproduce a result

Deep research

Source documents, citations, notes

Verify or revise a conclusion

Content production

Briefs, drafts, feedback, assets

Apply edits to the reviewed version

Knowledge base

Documentation, policies, source versions

Reuse the collection across sessions

Incident investigation

Log exports, diagnostic scripts, timelines

Compare new evidence with earlier findings

Copy link to heading1. Coding agents that resume unfinished changes

Unfinished coding tasks leave behind source edits, patches, and test output. When the agent resumes, it needs those files to inspect the implementation and decide what to change next.

Your agent fixes an import error but leaves an integration test failure unresolved. The next session needs the exact source version and test output to investigate.

Vercel Sandbox runs generated code and tests in isolation. Vercel Drives retains the working files for later sandbox runs.

Copy link to heading2. Data analysis agents

Retain cleaned tables, scripts, intermediate datasets, and charts so the agent can build on earlier analysis in later sessions.

After the agent analyzes a comma-separated values (CSV) file, you return the next day to compare another customer segment. It can reuse the original input and cleaning script with a different filter.

Keep enough information to reproduce each result:

  • Record the input version, transformation version, and output paths together.

  • Store each chart with the data and script that produced it.

  • Check which derived files need recomputing after source CSV updates.

Copy link to heading3. Deep research agents

Research builds up downloaded documents, citation records, extracted passages, and notes over several rounds of investigation. Retaining those files lets the agent revisit the evidence behind an earlier conclusion.

Copy link to headingFind evidence without loading every source

When a reviewer questions a claim in a vendor comparison, the agent needs the original source, the retrieval date, and the passage in question.

To locate relevant passages, you can use Upstash Search, which combines full-text and semantic search, or pgvector, which adds vector similarity search to Postgres. Link retrieved passages to their source IDs and versions.

Store source files and notes in the workspace, and use retrieval to find relevant passages. Recheck the original source when the task requires current information.

Without the source files, an earlier conclusion may remain available even though the evidence needed to verify or revise it is missing.

Copy link to heading4. Content production agents

Content revisions can span several sessions, with the brief, draft, editorial feedback, references, and assets all tied to the same deliverable.

Copy link to headingResume from the reviewed draft

An editor requests changes to a draft's examples. The agent applies those changes to the reviewed version and saves a new version for approval.

Keep each draft version with its feedback and approval decision. Vercel Workflows can pause the task while it awaits that decision and resume it afterward.

Keep working drafts in the workspace. After publication, treat the content management system (CMS) as the source of truth for the published version.

Copy link to heading5. Knowledge base agents

Knowledge base agents maintain documentation, policies, and product information for other agents to use. Keeping those source files in a persistent workspace lets later sessions reuse the collection without downloading it again.

Copy link to headingUpdate the collection once, then share it across sessions

Support agents use your product documentation to answer customer questions. One agent downloads updated pages and saves them to the workspace. Other sessions read the refreshed collection.

With Vercel Drives, one sandbox updates the collection while other sandboxes read it through read-only snapshots. Mount new snapshots after a refresh so subsequent sessions can read the updated files.

Existing snapshots retain the view captured when they were mounted. Store the collection's version alongside each session's results so you can identify which source material it used.

Copy link to heading6. Incident investigation agents

Incident investigations can continue across handoffs as new evidence arrives. Retained log exports, diagnostic scripts, timelines, and findings give the next session the material it needs to continue.

Copy link to headingContinue analysis as new evidence arrives

Your agent identifies a possible cause in a log export. It can test that explanation against a second export from another team by running the same diagnostic script on both inputs.

Use a separate workspace for each case and limit access to the inputs the investigation needs. Link observations and hypotheses to the evidence that later sessions will need to reassess them.

Copy link to headingChoose between Sandbox persistence and Drives

Persistent Vercel sandboxes save their filesystem when stopped and restore it when resumed. Their snapshots expire 30 days after last use by default, so set a retention policy that covers the time between sessions.

Vercel Drives retains a working directory until the drive is deleted, independently of any sandbox's snapshot retention.

What to compare

Sandbox persistence

Drives

What you retain

The sandbox's saved filesystem

A mounted directory

How you continue

Resume the sandbox

Mount the directory in a later sandbox

When to choose it

Restore the saved environment and files

Reuse working files across different sandbox environments

Each drive supports one read-write sandbox mount at a time. Multiple sandboxes can read snapshots of the drive. To include newer changes, mount a new snapshot.

Copy link to headingFrequently asked questions

Copy link to headingWhen should I use Vercel Drives instead of Sandbox persistence?

Use Sandbox persistence to restore a sandbox's saved filesystem, including its tools and project files. Use Vercel Drives when a working directory needs to persist independently and be reused across sandbox environments.

Copy link to headingDoes every AI agent need a persistent workspace?

No. Persistent workspaces are useful for agents that create, edit, or reuse files across sessions. An agent that only queries records or calls APIs may use a database, retrieval layer, or durable runtime without an editable directory.

Copy link to headingHow is a persistent workspace different from agent memory?

Persistent workspaces retain files that tools can read, edit, or run. Agent memory supplies information for future reasoning, such as preferences or prior decisions. Workspace notes can serve as memory when the application makes them accessible; datasets and scripts also support analysis and execution.

Copy link to headingCan a vector database replace an agent's workspace?

Vector databases help retrieve information, but a retrieval index does not necessarily retain the original editable files. Coding and analysis tasks may still need source trees, datasets, and scripts. When you use both retrieval and a workspace, link indexed passages to their source files and versions.

Copy link to headingDoes a persistent workspace keep sandbox processes running?

No. Workspace persistence retains files, not running processes or their in-memory state. When a task resumes, start the required tools and verify that the files it expects to reuse are present.

Copy link to headingCan several agents write to the same drive at once?

Only one sandbox at a time can mount a given drive read-write. Multiple sandboxes can read its read-only snapshots. Coordinate changes through the writable mount, or use separate workspaces for agents that need to edit files independently.

More Build with AI articles

Ready to deploy?