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

# Workspaces

> One data model and one agent, versioned and published together — the surface where you build and ship an analytics agent.

## What is a Workspace?

A Workspace is where you build one analytics agent. It combines, in a single versioned surface:

* **The Data Model** — which tables and columns the agent can see, what they mean, and who can query what (row-level security)
* **The agent's context** — knowledge base files, skills, system prompts, per-user memory, and golden assets
* **Testing** — a Playground where you chat with the agent as one of your project users
* **Deployment** — an embed snippet and preview links for putting the agent in your product

The Data Model and the agent are no longer separate concepts with separate version histories. A workspace *is* its data model — you create one workspace per agent, and the workspace publishes the schema and the agent's context together, so the two can never drift apart.

<Frame>
  <img src="https://mintcdn.com/upsolve/AQuHHtApbrMXROxw/images/ai-agent-builder/workspaces/workspace-create-dialog.png?fit=max&auto=format&n=AQuHHtApbrMXROxw&q=85&s=a6a6296439c309ab5303b86cd92e947e" alt="The New workspace dialog: a name, an optional description, and a required connection" width="1600" height="1000" data-path="images/ai-agent-builder/workspaces/workspace-create-dialog.png" />
</Frame>

## Creating a Workspace

Workspaces live inside a project. Open your project and you'll see **Your Workspaces** — the list replaces the separate Data Models and Agents tabs.

<Frame>
  <img src="https://mintcdn.com/upsolve/AQuHHtApbrMXROxw/images/ai-agent-builder/workspaces/workspace-project-overview.png?fit=max&auto=format&n=AQuHHtApbrMXROxw&q=85&s=e899da7cebb234740677de9fd8ab27cf" alt="A project page listing its workspaces with version and production badges, and a New workspace button" width="1600" height="1000" data-path="images/ai-agent-builder/workspaces/workspace-project-overview.png" />
</Frame>

1. Click **New workspace**
2. Enter a **name** (and an optional description)
3. Select the **connection** to base it on
4. Click **Create workspace**

<Note>
  A connection is required and cannot be added later. The workspace's schema is read from it, so a workspace without one has nothing to model. If your project has no connections yet, add one in Project settings first.
</Note>

Creating the workspace introspects the connection immediately, so its catalog of tables and columns is ready to curate right away.

## The Workspace Sidebar

Opening a workspace swaps the app sidebar to the workspace's own sections, grouped by the part of the lifecycle they belong to:

| Section            | What it's for                                    |
| ------------------ | ------------------------------------------------ |
| **Data Model**     | Tables, columns and row-level security           |
| **Knowledge Base** | Context files the agent can search and read      |
| **Skills**         | Reusable, on-demand know-how                     |
| **System Prompts** | Instructions the agent runs under                |
| **Memory**         | What the agent remembers about each user         |
| **Assets**         | Golden questions the agent must answer correctly |
| **Playground**     | Chat with this workspace's agent                 |
| **Deploy**         | Embed this workspace in your product             |
| **Chat History**   | Every conversation in this workspace             |

The first six are the context you give the agent; Playground and Deploy are how you try it and ship it; Chat History is the record of what it did. Workspace settings sits at the foot of the sidebar rather than among the pages.

<Frame>
  <img src="https://mintcdn.com/upsolve/AQuHHtApbrMXROxw/images/ai-agent-builder/workspaces/workspace-settings.png?fit=max&auto=format&n=AQuHHtApbrMXROxw&q=85&s=358dac999fd83f0074a5f938a0c48f68" alt="Workspace settings with General, Connection, Data access and Danger zone tabs" width="1600" height="1000" data-path="images/ai-agent-builder/workspaces/workspace-settings.png" />
</Frame>

The header is a breadcrumb — **Project / workspace** — and both steps are switchers: the workspace picker also offers **Create workspace**, and the project picker **Create project**, so you never have to navigate back to make the next thing.

## Draft, Publish and Production

The version bar lives on the workspace, above every page, and it is the one place that says where your work stands:

* **Draft** — every page edits the same working copy, and edits **autosave**. There is no Save button; the version selector shows when the draft was last written.
* **Publish** — stages the draft as a new numbered version. Publishing captures the schema, the prompts, the skills and the assets together.
* **Promote to production** — a published version can be promoted, and production is what deployed users and embeds are served. This replaces the old "set this data model version / agent version as production" two-step: one workspace, one production switch.
* **Discard / Reset** — throw away draft changes and return the working copy to the published version.

Selecting a published version in the bar makes every page read-only for that version, so you can inspect exactly what shipped. **View changes** beside the selector diffs the draft against the latest published version across the whole workspace.

## Deploying a Workspace

The **Deploy** page produces everything you need to put the agent in your product:

<Frame>
  <img src="https://mintcdn.com/upsolve/AQuHHtApbrMXROxw/images/ai-agent-builder/workspaces/workspace-deploy.png?fit=max&auto=format&n=AQuHHtApbrMXROxw&q=85&s=bf4b4166a08dfc958b2b64996ac2affb" alt="The Deploy page: a status strip saying which version the embed serves, numbered steps for frontend setup, the iframe embed code, and a preview link generator" width="1600" height="1000" data-path="images/ai-agent-builder/workspaces/workspace-deploy.png" />
</Frame>

1. **Set up your frontend** — a one-time setup per product, with the backend and frontend guides.
2. **Embed the iframe** — point it at `/share/workspace/{projectId}/{workspaceId}?jwt=<projectUserToken>`, passing a short-lived project-user token minted by your backend.
3. **Preview it as one of your users** — generate a real, short-lived preview link (valid for one hour) and open the embed exactly as a project user would see it, before writing any integration code.

A status strip at the top answers the first question you'll have: which version the embed currently serves. Until a version is production, the embed has nothing behind it.

See [Deploy & Expose](/ai-agent-builder/deploy-agents/overview) for the full setup.

## Legacy Agents

Projects that were built before workspaces keep their existing agents on a legacy page, where they remain fully readable and editable. New agents cannot be created there — new work should happen in a workspace, where the data model and the agent ship together.

## Next Steps

* [Curate the workspace's Data Model](/ai-agent-builder/data-models) — select tables, add descriptions, and configure security
* [Encode Your Context](/ai-agent-builder/encode-your-context) — prompts, golden assets, skills, knowledge base and memory
* [Follow the Complete Setup Guide](/ai-agent-builder/setup-guide) — from a blank project to production
