> ## 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.

# Case Demos and Workspace Seed

> How caseDemos binds to real sessions and renders on the detail page, and why workspaceSeed currently does nothing

Both fields live under the "content" group of Expert configuration, but their maturity differs sharply: **case demos are fully wired**, from configuration through to detail-page rendering; **workspace seed is currently dead configuration** — the data is stored and published, but the runtime never reads it.

This page states the real status of both so you do not spend time configuring something that has no effect.

<Note>
  Verified 2026-08-11. Sources listed at the bottom of this page.
</Note>

***

## Case demos (`caseDemos`)

### What it is

Case demos let you surface **conversations that actually happened** in the "Use Cases" section of your Expert's detail page. Buyers see how your Expert really works, which is more persuasive than any description.

The key property is that it stores a **reference, not a copy**:

```json theme={null}
[
  {
    "showcaseId": "<chat_session.id>",
    "title": "Sorting out 2025 VAT filing for a cross-border seller",
    "description": "From raw statements to a complete return, with three common pitfalls flagged",
    "coverImageFileId": "<optional custom cover>",
    "sortOrder": 1
  }
]
```

`showcaseId` points at `chat_session.id` — a real session record.

### Field behavior

| Field              | Required | Behavior                                                                                  |
| ------------------ | -------- | ----------------------------------------------------------------------------------------- |
| `showcaseId`       | Yes      | Points to a real session; **the whole entry is filtered out if the session is not found** |
| `title`            | No       | Falls back to the session's own title when empty                                          |
| `description`      | No       | Returns null when empty; no fallback                                                      |
| `coverImageFileId` | No       | Custom cover; falls back to the session cover, then to null                               |
| `sortOrder`        | Yes      | Display order, ascending                                                                  |

Only the cover has a three-step fallback chain:

```
custom cover -> session's own cover -> null
```

### Silent filtering

The detail endpoint looks up the referenced sessions and **removes any it cannot find**:

```ts theme={null}
const sc = byId.get(demo.showcaseId);
if (!sc) return null;   // entry filtered out, no error raised
```

<Warning>
  This is silent. Configure five demos, delete two of the underlying sessions, and the detail page shows three with no error anywhere.

  So **do not delete sessions that are in use as case demos**. Before publishing, open the detail page and count the entries to confirm the number matches what you configured.
</Warning>

### Configuration advice

* Pick sessions with a **complete arc**. The value is in showing the working method; a half-finished conversation demonstrates nothing.
* Do not reuse the session's original title. Session titles are usually auto-generated; a title that states *what problem was solved* converts better.
* Use `description` to add what the session itself does not show — what special approach was used, whether the result was adopted.
* Use `sortOrder` to put your strongest case first. Buyers usually read only the first two.

***

## Workspace seed (`workspaceSeed`)

### Intended design

Per the database column comment, this field was meant to let creators pre-seed files into the sandbox workspace, unpacked on the **first sandbox provision for that user plus that Expert**, and skipped on subsequent provisions so user edits are never overwritten. The shape is:

```json theme={null}
{
  "agent_md": "...",
  "files": [{ "path": "templates/report.md", "content": "..." }],
  "setup_commands": ["npm install"]
}
```

### Actual current status

<Warning>
  **This field produces no runtime effect today.**

  Only half the pipeline exists: `workspaceSeed` is saved, snapshotted into the release at publish time, and restored by the version rollback script — but **it is never sent to the runtime**. The Expert invoke pipeline (`invoke-lifecycle`) does not reference it anywhere, and sandbox provisioning does not read it.

  The normalization module named in the column comment (`workspace_instructions.py`) does not in fact handle this field; that comment has drifted from the implementation.

  So configuring it today means the data is stored and nothing appears in the sandbox.
</Warning>

### What to do instead

To pre-load material or initialize an environment, use a path that actually works today:

| What you want                            | What works now                                                                                    |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Give the Expert a template or standard   | Package it as a **skill** and install it on the Expert; skill content enters the prompt           |
| Let the Expert read reference material   | Use a **knowledge connector**, or ship the material as skill resources                            |
| Make the Expert follow a fixed procedure | Write it into the **agent layer** — see [Prompt Layers](/en/creators/expert-config/prompt-layers) |
| Install dependencies before working      | Let the Expert run sandbox tools itself during the conversation                                   |

This page will be updated once the field is wired to the runtime.

***

## Limits and failure modes

<AccordionGroup>
  <Accordion title="The detail page shows fewer case demos than I configured">
    Some referenced sessions were deleted or are no longer reachable, and those entries were silently filtered. Check that each `showcaseId` still resolves to an existing session.
  </Accordion>

  <Accordion title="The case demo title is not the one I wrote">
    Your `title` was empty or unset, so it fell back to the session's own title. Provide a non-empty `title` to override.
  </Accordion>

  <Accordion title="The cover is a session screenshot, not the image I uploaded">
    `coverImageFileId` is unset or the file is no longer valid, so it fell back to the session cover.
  </Accordion>

  <Accordion title="I configured workspaceSeed but the sandbox is empty">
    This is the known current state, not a configuration error. See above.
  </Accordion>

  <Accordion title="I edited case demos but the detail page did not change">
    A live Expert's public detail reads from the published release. Changes require "publish new version -> approved".
  </Accordion>
</AccordionGroup>

***

## Verify

After configuring case demos, open the marketplace detail page from a **non-owner account**:

1. Count the entries in the "Use Cases" section against what you configured — a mismatch means entries were silently filtered
2. Confirm the order matches your `sortOrder`
3. Open one and confirm the session content is what you intended to show

`workspaceSeed` needs no verification — no configuration of it has any effect today.

***

## Sources

<Note>
  Verified 2026-08-11. Sources:

  * Case demo enrichment, fallback chain, silent filtering: `services/core/src/db/service/expert.ts` (`enrichCaseDemos`)
  * Type definitions and column comments for both fields: `packages/db/src/schema/marketplace.ts`
  * `workspaceSeed` has no runtime consumer: a repo-wide search finds it only in the schema, Core's read/write paths, and the publish snapshot; `invoke-lifecycle` and agent-runtime reference it zero times
</Note>

***

## Next

<CardGroup cols={2}>
  <Card title="Prompt Layers" icon="layer-group" href="/en/creators/expert-config/prompt-layers">
    Where each of the four fields is injected
  </Card>

  <Card title="Expert Mode" icon="shield-halved" href="/en/creators/expert-config/expert-mode">
    Compatibility versus full mode
  </Card>
</CardGroup>
