> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Sessions & Workspace

> Understanding the relationship between chat sessions and sandbox workspaces

When you chat with an Expert, you communicate within a **session**. A session can be associated with a **workspace** — an independent cloud environment where the Expert executes code, manages files, and previews websites.

## Sessions

### What Is a Session

A session is an ongoing conversation between you and a specific Expert. It contains all the messages you've sent, the Expert's replies, and all tool calls and results generated during the conversation.

### Key Session Features

<CardGroup cols={2}>
  <Card title="Persistent Storage" icon="floppy-disk">
    Sessions are automatically saved. Close and reopen your browser — your conversation history is still there
  </Card>

  <Card title="Continuous Context" icon="link">
    All messages within the same session share context. The Expert remembers what you said earlier
  </Card>

  <Card title="Parallel Sessions" icon="layer-group">
    You can create multiple sessions with the same Expert, each operating independently
  </Card>

  <Card title="History Browsing" icon="clock-rotate-left">
    View and switch between all historical sessions in the left sidebar
  </Card>
</CardGroup>

### Session Modes

Conversations support two modes:

<Tabs>
  <Tab title="Normal Mode">
    The default mode. The Expert directly fulfills your requests — writing code, generating content, analyzing files. Best for well-defined tasks.
  </Tab>

  <Tab title="Plan Mode">
    Activated from the "+" menu in the input box. The Expert first researches and drafts a plan document. You can discuss and refine the plan in the conversation, then click "Build" to have the Expert execute it. Best for complex tasks.
  </Tab>
</Tabs>

### Temporary Conversations

If you don't want the Expert to remember the content of an interaction, you can select "Temporary Conversation" before starting. Temporary conversations have these characteristics:

* The Expert **will not** read any previous memories
* Conversation content **will not** be extracted as new memories
* Conversation history **will not** appear in the context of future sessions

<Tip>
  Temporary conversations are ideal for handling sensitive information or making simple one-off queries.
</Tip>

## Workspace

### What Is a Workspace

A workspace is an **isolated cloud environment** attached to a session — essentially a sandbox. When the Expert needs to execute code, edit files, or preview websites, the workspace is automatically created and ready to use.

You don't need to manually create a workspace. As long as the Expert you're using has sandbox mode configured, a workspace will be automatically allocated when needed.

### What Can a Workspace Do

<CardGroup cols={2}>
  <Card title="Code Execution" icon="terminal">
    The Expert can write and run code in the workspace, supporting multiple programming languages and frameworks
  </Card>

  <Card title="File Management" icon="folder-open">
    The workspace has a complete file system where all files created by the Expert are stored
  </Card>

  <Card title="Website Preview" icon="globe">
    When the Expert builds a website, you can preview it in real time in the right panel, with hot reload support
  </Card>

  <Card title="Terminal View" icon="rectangle-terminal">
    You can view the commands executed by the Expert and their output
  </Card>
</CardGroup>

### Workspace Persistence

Files in the workspace are **persistently saved**:

* Files don't disappear when the conversation ends
* Next time you open the same session, files are right where you left them
* The workspace uses a persistent cloud file system (CFS) for reliable data storage

<Note>
  Workspaces have storage limits based on your subscription plan. Check the product for current quotas.
</Note>

### Workspace Panel

On the right side of the conversation interface, you can interact with the environment through the workspace panel:

| Panel            | Function                                                |
| ---------------- | ------------------------------------------------------- |
| **Editor**       | View and edit source code files generated by the Expert |
| **Preview**      | Live preview of website output, auto-refreshing         |
| **File Browser** | Browse files and directory structure in the workspace   |
| **Terminal**     | View command execution input and output                 |

## Relationship Between Sessions and Workspace

```
User
 └── Expert A
      ├── Session 1 ──── Workspace (shared)
      ├── Session 2 ──── Workspace (shared)
      └── Session 3 ──── Workspace (shared)
```

**Multiple sessions with the same Expert share the same workspace.** This means:

* Files created by the Expert in Session 1 are also visible in Session 2
* The workspace lifecycle follows the Expert dimension, not individual sessions

This design ensures your work is never lost when creating a new session.

<Warning>
  Workspaces between different Experts are completely isolated. Expert A cannot access Expert B's workspace files.
</Warning>

## Workspace Startup

Workspaces use a **lazy start** strategy:

1. The Expert's development server is not pre-started
2. The development server only starts when the Expert needs to preview a website
3. If the Expert only needs to run scripts or process data, unnecessary services won't be started

This approach saves resources — pure text conversations don't consume sandbox compute resources.

## Next Steps

<CardGroup cols={2}>
  <Card title="Sandbox" icon="cube" href="/en/documentation/concepts/sandbox">
    Learn more about the sandbox environment's technical capabilities and pre-installed tools
  </Card>

  <Card title="Credits" icon="coins" href="/en/documentation/concepts/credits">
    Learn how credits consumed during conversations are calculated
  </Card>
</CardGroup>
