# Cockpit

Source: https://docs.scenaro.io/build/cockpit/

Cockpit is Scenaro's authoring environment. Use it to design voice scenarios, configure features and collections, test sessions, and publish to production.

## Workflow

<Steps>
  <Step title="Create a scenario">
    Define the agent prompt, voice stack, language, and behavior in Cockpit.
  </Step>
  <Step title="Configure features">
    Attach features (product search, display, comparison, bucket list, etc.) and link them to tools the agent can call.
  </Step>
  <Step title="Connect collections">
    Bind product or content collections so features can query your catalog data.
  </Step>
  <Step title="Test locally">
    Use the live test page (`/scenarios/[id]/live`) or the public embed preview to validate voice and tool behavior.
  </Step>
  <Step title="Publish">
    Publish the scenario to obtain a **publication UUID** for production embeds.
  </Step>
</Steps>

## What you get after publishing

| Artifact | Used by |
|----------|---------|
| Publication UUID | Frontend `useScenaroSession({ scenario })` |
| Feature config | Sent by agent on `config` data topic at session start |
| Collections metadata | Passed to feature handlers and UI components |

## Testing before production

- **Cockpit live page** — internal test with full feature registry (platform-spa)
- **Public embed** — `/public/[uuid]` route for stakeholder review
- **Experience apps** — brand-specific Vite apps in the monorepo (`experiences/*`)

## Environment alignment

Ensure your test and production frontends point to the correct API:

| Environment | API URL |
|-------------|---------|
| Local dev | `https://localhost:8443` or bootstrap default |
| Staging | Your staging API host |
| Production | `https://api.scenaro.io` |

## Next steps

- [React integration](/build/react-integration) — wire the publication UUID in your app
- [Feature registry](/build/feature-registry) — map Cockpit features to frontend components
