Skip to Content

Playground

Every live playground on one page, and how to run an example app yourself.

A playground is the real conciv panel, playing a scripted session in your browser. Nothing runs on a server. You need no agent CLI. Each one also sits on the page that explains it.

Available playgrounds

First session

A question about the page, a change, and the agent checking the result.

A first session

A scripted session in the real panel. It plays in your browser, with no server.

A first session

  1. You: What is on this page?

    The agent calls page_text

    This is the Vite + React starter page. It has a Get started heading, a counter button at 0, and links to the Vite docs and community.

  2. You: Start the counter at 5.

    The agent calls page_settext

    On the page, the count is 5.

    The button now reads Count is 5. To keep it, change useState(0) to useState(5) in src/App.tsx.

A first session, start to finish.

Ask about the page

The agent reads the open page and names the file that renders it. From Getting started.

Ask about the page

A scripted session in the real panel. It plays in your browser, with no server.

Ask about the page

  1. You: What does the button on this page do?

    The agent calls page_text

    The agent calls page_find

    It is the counter from src/App.tsx. Each click calls setCount, so the label goes up by one: Count is 1, Count is 2, and so on.

Ask about the page you are on.

Send and queue

A message sent while the agent works waits in the queue, then goes next.

Send, then queue the next message

A scripted session in the real panel. It plays in your browser, with no server.

Send, then queue the next message

  1. You: Change the heading to Hello conciv.

    The heading is the h1 in the center section. I will set its text.

    The agent calls page_settext

    On the page, the heading reads “Hello conciv”.

    The heading now says Hello conciv.

  2. You: Then make the button say Clicks.queued

    The agent calls page_settext

    On the page, the button says “Clicks”.

    Done. Your queued message ran as soon as the first one finished.

Send a message, then queue another.

Point and change

Pin an element with the crosshair, then ask for a change to it.

Point at an element and change it

A scripted session in the real panel. It plays in your browser, with no server.

Point at an element and change it

  1. The reader clicks “More composer actions”.

    The reader clicks “Select an element from the page”.

    The reader points at the “Get started” heading on the page.

    You: Make this heading say Welcome.

    The agent calls page_locate

    The agent calls page_settext

    On the page, the heading reads “Welcome”.

    The heading says Welcome now. It is a live change: ask me to keep it and I will edit src/App.tsx line 19.

Point at an element and change it.

Allow once

A risky action asks first. Allow once answers it for this call only.

Allow a change once

A scripted session in the real panel. It plays in your browser, with no server.

Allow a change once

  1. You: Reset the counter and keep it in the source.

    The agent calls edit_file

    A permission card asks first: Allow once. On the page, the count is 0.

    You allowed that edit once. The next edit asks again.

A permission card, answered with Allow once.

Run the tests

A test run streams into the Tests tab, then lands as a card in the thread.

Run the tests live

A scripted session in the real panel. It plays in your browser, with no server.

Run the tests live

  1. You: Run the tests.

    The agent calls test_runner_run

    Two tests pass and one fails: the counter starts at zero expects 0 but the page starts at 5. Open the Tests tab to see the run.

    The reader clicks “Tests”.

A live test run.

Quick terminal

The hotkey opens the quick terminal, and a command runs in your project.

A command from the quick terminal

A scripted session in the real panel. It plays in your browser, with no server.

A command from the quick terminal

  1. You: Click the counter three times.

    The agent calls page_click

    On the page, the count is 1.

    The agent calls page_click

    On the page, the count is 2.

    The agent calls page_click

    On the page, the count is 3.

    Clicked three times. The button reads Count is 3, and your app stayed usable below the sheet.

A command in the quick terminal.

Build errors

The agent reads the dev server's build errors and fixes the source.

Ask the dev server about a build error

A scripted session in the real panel. It plays in your browser, with no server.

Ask the dev server about a build error

  1. You: The hero image is missing. Does the dev server report an error?

    The agent calls page_console

    The agent calls server_resolve

    The agent calls server_resolve

    The server cannot resolve ./assets/hero.webp: that file does not exist. ./assets/hero.png does. Change the import in src/App.tsx to hero.png.

Ask the agent about build errors.

Your first plugin's card

A tool call shows the generic card first, then the card your plugin draws. From Build your first plugin.

Your plugin draws its own card

A scripted session in the real panel. It plays in your browser, with no server.

Your plugin draws its own card

  1. You: Which version is this project?

    The agent calls project_version

    This is vite-project 0.0.0, read from package.json.

The generic card, then your card.

Direct call or code mode

The same tool, called directly and from inside a code-mode script. From Tools and code mode.

A tool called directly, then from code mode

A scripted session in the real panel. It plays in your browser, with no server.

A tool called directly, then from code mode

  1. You: Which version is this project?

    The agent calls project_version

    Called directly: vite-project 0.0.0.

  2. You: Read it again from code mode.

    The agent calls project_version

    From a code mode program.

    Same answer. In code mode the call runs inside a TypeScript program, and its card sits inside the program card.

A direct call next to a code-mode call.

A plugin's permission card

A plugin tool asks for permission, and the card shows its question.

Your tool asks for permission

A scripted session in the real panel. It plays in your browser, with no server.

Your tool asks for permission

  1. You: Ship the release.

    The agent calls release_ship

    A permission card asks first: Allow once.

    Shipped 1.2.0. The tool asked first, and ran only after you allowed it.

The permission card a plugin tool raises.

A panel tab

A plugin adds its own tab to the panel.

Your plugin adds a tab

A scripted session in the real panel. It plays in your browser, with no server.

Your plugin adds a tab

  1. You: Where do I find the shelf?

    Your plugin added a Shelf tab to the pane. Here it is.

    The reader clicks “Shelf”.

A plugin's tab in the panel.

Local development

Prefer a real app? The conciv repo has two example apps with conciv already set up. Clone the repo and install:

Terminal
git clone https://github.com/conciv-dev/conciv.git
cd conciv
pnpm install

Then start an example:

Terminal
pnpm turbo run dev --filter=tanstack-start-example # <- or --filter=nextjs-app
  • The repo pins its pnpm version. It needs Node 26 or newer.
  • The first run builds the conciv packages the example uses. It then prints the address to open.
  • These examples run a real agent CLI, so it must be installed and logged in.

Learn more in Examples.

Write a playground

A playground is one script file and one line of MDX. The script lists what the reader types and what the agent answers:

apps/site/src/playground/scripts/chat/hello.ts
import type {PlaygroundScript} from '../../script'

export default {
  title: 'Say hello',
  screen: 'panel', // <- or 'quick' for the quick terminal
  plugins: [], // <- browser parts to load, such as 'test-runner'
  turns: [
    {
      prompt: 'Rename the heading to Hello.', // <- typed into the real composer
      replies: [
        {
          kind: 'tool',
          name: 'page_settext',
          input: {selector: 'h1', text: 'Hello'},
          result: {ok: true},
          page: {heading: 'Hello'},
        },
        {kind: 'text', text: 'The heading says **Hello** now.'},
      ],
    },
  ],
} satisfies PlaygroundScript

Add it to playground-scripts.ts, then put it on a page:

content/docs/usage/chat.mdx
<Playground page="vite-react" script="chat/hello" caption="Say hello." />

A few things to notice:

  • A tool reply can ask first (ask), change the demo page (page), or run from code mode (mode: 'code').
  • The script is typed. A change to the widget's contract fails the site's typecheck, not the page.
  • Under reduced motion, each step jumps to its end. On a narrow screen, the page shows the transcript only.

Next steps

On this page