Get started
Menu

← All docs / AI

Work with AI

Connect a model and review its edits.

On this page

Use an OpenAI-compatible provider or local model server. Set its endpoint and model before starting the editor:

export PLAYWEAVE_AI_ENDPOINT=https://your-provider.example/v1
export PLAYWEAVE_AI_MODEL=your-model-id
# Set PLAYWEAVE_AI_KEY securely if your provider requires it.
cargo run -p playweave-cli -- edit ./my-game

Keep credentials outside your project.

  1. Describe an edit in the assistant panel. Select Propose.
The assistant panel with the prompt Increase player movement speed by 20 percent typed in, the Propose button, and the local model name shown at the bottom
Describe the change in plain words. The model runs where you configured it.
  1. Inspect the candidate and check results. It has not changed your saved project.
The Review proposed changes sheet: the request, the checks that passed, and a diff of scripts/main.luau with local speed = 3 removed and local speed = 4 added, above Discard, Play candidate and Accept changes buttons
Every proposal arrives as a diff you can play before you accept it.
  1. Accept or discard it. Playtest accepted changes; use Undo if needed.

Checks cover syntax, references, and 120 idle simulation frames. They do not prove gameplay success. The agent stops after two repair attempts. Failed or cancelled requests do not commit edits.

From the terminal

cargo run -p playweave-cli -- propose ./my-game "Make movement faster" --output candidate.json
cargo run -p playweave-cli -- accept ./my-game candidate.json