# Run the React Starter
Source: https://docs.maelstrom-ai.co/dev/getting-started/starter/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Use this starter to try Maelstrom in a new React app. The local walkthrough follows predefined requests. It includes the app and Engine, and needs Bun. You do not need a model account or API key for this walkthrough.

## Clone and run

1.  Open the [React starter repository](https://github.com/maelstrom-co/react-starter). Select **Use this template** to create your own repository, then clone it. To try the example directly:
    
    Terminal window
    
    ```sh
    git clone https://github.com/maelstrom-co/react-starter.git
    cd react-starter
    ```
    
2.  Install dependencies and check the source:
    
    Terminal window
    
    ```sh
    bun install --frozen-lockfile
    bun run typecheck
    ```
    
3.  Start the app and Engine:
    
    Terminal window
    
    ```sh
    bun run dev
    ```
    
4.  Open `http://127.0.0.1:5173`. Expect a task list and launch note.
    

## Try the workflow

1.  Choose **Rearrange the workspace**. The note opens its editor and gets more space. Edit the note directly.
2.  Choose **Run an action**. Expect **Prepare the launch** in the task list. The Engine response names the declared `addTask` action; the React app’s handler changes the data.
3.  Complete a task yourself, then choose **Restore the layout**. The note returns to its preview. Your edited note and task state remain in the app.
4.  Resize the window. Narrow containers stack the components. The added task remains a single item; resizing does not repeat the action.

The same components stay interactive throughout the walkthrough. Local mode accepts the example requests, including a different quoted title in `Add "your task" to my tasks`. Other text returns guidance.

Stop both servers with Ctrl+C. React and CSS edits update in the browser. Server edits restart the Engine. Reloading resets the app’s in-memory task and note data. Restarting the server clears its local history.

For a copy from this documentation build, [download the source archive](https://docs.maelstrom-ai.co/getting-started/starter.zip) and run the same commands from the extracted directory.

## Change one capability

`src/workspace.ts` defines the views, action, and initial layout. `src/App.tsx` owns the React components and application data. `local-planner.ts` selects among the declared capabilities for the walkthrough. `server.ts` hosts the Engine and validates HTTP input.

Change one renderer or declaration and repeat the workflow. Keep data and business rules in the app’s handlers. This local example does not configure production authentication, durable storage, or deployment.

## Use a live model

The optional live mode uses OpenAI’s `gpt-6-luna`. Follow [Connect OpenAI](https://github.com/maelstrom-co/react-starter#connect-openai) in the starter README to create `.env.local` and run `bun run dev:live`. Keep the API key on the server. Live requests send your intent, recent conversation, and workspace structure to OpenAI and can incur API charges. Loading and resizing the workspace make no model calls.

For an existing app, use [Build with an agent](https://docs.maelstrom-ai.co/agents/skills/) to select a first integration and review its plan.
