# Agent Artifacts & Workspace — 官方帮助文档存档

> 来源：https://docs.gumloop.com/core-concepts/agent_artifacts.md
> 抓取日期：2026-05-30
> 状态：✅ 完整

---

## Overview

Files created by agents during conversations are automatically exported to cloud storage, versioned, previewed, and displayed as rich cards in chat. No user configuration required.

## Export Pipeline

1. Save to secure cloud storage (GCS)
2. Create versioned artifact record
3. Generate preview thumbnails
4. Display as card in conversation

## Viewing (3 access points)

- **In-Chat Preview**: Card with filename, type icon, thumbnail → side panel preview
- **Dedicated Viewer Page**: Unique shareable URL, full-width preview, metadata
- **Files Sidebar**: Per-conversation file list

## Preview Types

| Type | Preview |
|---|---|
| HTML | Interactive sandboxed |
| Images (.png, .jpg, .gif, .webp, .svg) | Native viewer |
| PDF | PDF viewer |
| Spreadsheets (.csv, .xlsx) | Spreadsheet viewer |
| Presentations (.pptx) | Slide viewer |
| Text/Code (.txt, .md, .py, .js, etc.) | Syntax-highlighted |
| Other / >50MB | Download only |

## Versioning

Same filename in one conversation → auto-versioning (v1, v2, v3...). Never overwrites. Access previous via history panel.

## Sharing

3 General Access levels: Restricted (owner + explicit), Organization, Anyone (public link)
Default File Sharing configurable per agent (Agent Settings → Chat Preferences)
- Default: Team agents → team; Personal agents → restricted
- Can set Organization or Anyone as default for new files

## HTML Artifacts

- Full-screen mode (hides toolbar)
- Security sandbox: blocks session access, cookies, storage, direct network requests, popups
- Safe HTTP methods (GET, HEAD) auto-proxied; unsafe methods require user confirmation

## Interactive Artifacts

HTML files that fetch live data from viewer's integrations on each open.
- Agent creates: HTML file (UI) + Python data scripts (fetchers)
- On open: consent overlay listing integrations + actions → user approves → scripts execute
- Uses VIEWER'S credentials (not creator's)
- Short-lived scoped token (5 min), expires after script completion
- Viewer pays credits for sandbox execution; creator pays nothing

## Workspace Files (Persistent Across Conversations)

Files saved to `/home/user/.workspace/` in agent sandbox persist ACROSS conversations.
- Project members: shared workspace (visible to all members)
- Non-members: isolated private workspace
- Same versioning, preview, sharing as conversation artifacts

## Files Page

Centralized at `gumloop.com/personal/files`: Mine, Shared with me, Organization tabs.
Search, filter by type, sort by date, thumbnail previews.
