[Docs index](/docs.md) / [Sandcastles](/docs/sandcastles/overview.md) / Creating a Sandcastle

---

# Creating a Sandcastle

This guide walks you through building a sandcastle from scratch. Everything happens in chat — you describe what you want, and the AI plans, scaffolds, and iterates until you have a working app.

## Before you begin

- You need to be signed in to an Assist workspace.
- You need access to the AI chat.
- Have a clear idea of what the app should do and what data it should store. The more specific your first prompt, the better the plan.

## Steps

### 1. Describe the app you want

Open the AI chat and describe the app in plain language. Be specific about:

- What the app is for and who will use it.
- What data it should track (these become collections).
- What views or pages it should have.
- Any workflow or status progression the data follows.

Example:

> "Build me a sandcastle called 'Purchase Approvals'. It should track purchase requisitions through a workflow: Requested, Manager Approved, Finance Approved, Ordered, Received. Each requisition has a requester name, description, amount, vendor, priority, and a notes field. I want a kanban view grouped by status, a table view with filters, and a detail page for each requisition where people can add comments and change the status."

### 2. Review the plan

The AI enters **plan mode** — it generates a design document in plain language, not code. The plan describes:

- Which data collections the app needs and what fields each one has.
- Which views to build and what each one shows.
- Which tools the app will call (these become the app's **tool requirements** — e.g., Slack for notifications, a custom ERP tool for lookups).
- The order of implementation.

Read the plan carefully. This is the cheapest moment to change direction. Push back on anything that doesn't match your vision:

> "Add a 'budget_code' field to each requisition. And I want the kanban cards to show the amount and requester, not just the description."

> "The app should call `erp_create_po` when a request moves to 'Ordered'. Add that as a tool requirement."

Iterate until the plan looks right. The plan is a conversation — go back and forth until you agree on the shape. Scaffolding is more work to redo.

### 3. Let the AI scaffold

Once you approve the plan, the AI scaffolds the app. This creates:

- The sandcastle record in your workspace.
- The data collections with their schemas.
- Seed data so you can see the app working immediately.
- A linked subagent with access to the collections.
- The first version of the app code.

Scaffolding takes a few seconds. When it completes, the AI gives you a link to the preview.

### 4. Preview the app

Click the link (or go to **Sandcastles** in the navigation and find your new app). The preview page renders the live app. You should see the seed data populating the views the AI built.

Look at the app critically:

- Does the layout make sense?
- Are the right fields showing on each view?
- Is the status workflow correct?
- Are the filters and sort options useful?

### 5. Iterate

Tell the AI what to change. Each edit creates a new version, so you can always roll back.

> "Move the total amount to the top-right of each kanban card. Make the priority field a colored badge — red for urgent, yellow for high, green for normal."

> "Add a filter bar at the top of the table view. I want to filter by status, priority, and requester."

> "On the detail page, add a comment thread at the bottom. Each comment should store the author name, timestamp, and text."

The AI makes targeted code edits — one feature or view per edit — and you can preview after each one.

### 6. Share with your team

Once the app looks right, share it through the workspace permissions system. Go to **Workspace > Permissions > Resources**, find the sandcastle, and grant access to the people or groups who should use it.

## What was created

After these steps you have:

- A working React app at `/sandcastle/<id>/preview`.
- Persistent data collections that survive across sessions.
- Tool integrations — the app can call any workspace tool you declared as a requirement, directly from the UI, with the user's credentials.
- A linked subagent that can read/write the data, run on a schedule, or be wired to Slack.
- A full version history you can roll back through.

The app is not a mockup. It is a real tool with real data and real integrations. If the problem it solves changes next month, you change the app — or build a new one. That is the point: sandcastles are built for the problem in front of you, not for permanence.

## Next steps

- [Editing a sandcastle](./editing-a-sandcastle.md) — keep refining.
- [Managing sandcastle data](./managing-sandcastle-data.md) — view, edit, and reset collections.
- [Subagents overview](../subagents/overview.md) — wire the linked subagent to a schedule or Slack channel.
- [Troubleshooting](./troubleshooting.md)

---

## Navigation

### In this section: Sandcastles

- [Sandcastles](/docs/sandcastles/overview.md)
- [Use Cases and Playbooks](/docs/sandcastles/use-cases.md)
- [Troubleshooting](/docs/sandcastles/troubleshooting.md)
- **Creating a Sandcastle** (current)
- [Editing a Sandcastle](/docs/sandcastles/editing-a-sandcastle.md)
- [Managing Sandcastle Data](/docs/sandcastles/managing-sandcastle-data.md)

#### Playbooks

- [Playbook: Build a Budget Variance Dashboard](/docs/sandcastles/playbook-budget-variance-dashboard.md)
- [Playbook: Build a Contract Renewal Tracker](/docs/sandcastles/playbook-contract-renewal-tracker.md)
- [Playbook: Build a Purchase Approval Tracker](/docs/sandcastles/playbook-purchase-approval-tracker.md)
- [Playbook: Build a Vendor Performance Scorecard](/docs/sandcastles/playbook-vendor-performance-scorecard.md)

### Other sections

- [MCP Servers](/docs/mcp-servers/overview.md)
- [Tool Creation](/docs/tool-creation/overview.md)
- [Agent Filesystem](/docs/agent-filesystem/overview.md)
- [Chat Sharing](/docs/chat-sharing/overview.md)
- [Scheduled Triggers](/docs/scheduled-triggers/overview.md)
- [Agent Skills](/docs/agent-skills/overview.md)
- [Subagents](/docs/subagents/overview.md)
- [Workspace Permissions](/docs/workspace-permissions/overview.md)

[Back to docs index](/docs.md)
