Documentation menu
On this page

Build a world with the Genesis skill

Describe your world, then let your coding agent build its interface, memory and rules. The included create-world-stream skill takes it through a local preview and a complete project export.

Requires a coding agent that can read local files and run commands, plus Node 20 or later.

Get Genesis ready

Clone the repository and build the local tools:

git clone https://github.com/sequencer-media/genesis.git
cd genesis
npm ci
npm run build

Open the genesis folder in your coding agent. The skill is already included at skills/create-world-stream/SKILL.md. Repo-aware agents can also discover it through AGENTS.md.

Describe your world

Paste this prompt into your agent. Change the setting, interactions and visual style to match your idea.

Read skills/create-world-stream/SKILL.md and use it to build Mosslight, a forest battle worldstream with a cream pixel interface.

Let two players take turns. Have the backend LLM create four moves per encounter. Remember inventory, health and progress.

Start with labeled local fixtures. Validate the project, test the controls, and give me a playable local preview and a complete ZIP export.

The agent chooses a starter, adapts its controls and rules, and checks the result. Tell it which model provider you want when you are ready to connect generation.

Play, refine and export

Open the preview URL your agent returns. Try a turn, switch players and check that inventory and progress carry forward. Ask for changes in the same conversation.

Your agent should give you:

  • A playable preview: Your interface and controls running locally.
  • An editable project: genesis.json, interface.html, controller.js and declared assets.
  • A complete ZIP: A validated bundle to import into a compatible host.

Want to inspect or export the project yourself? Follow the local starter guide.

Connect live generation

Local previews use prepared responses and media. The stock runner includes an arena move fixture; another response format needs a matching local provider fixture.

Choose a connection when you want generated images, audio and video:

Configure your provider and generation budget before requesting live media. Credentials and spending limits belong on the host server.

Skill reference

The skill ships with the Apache 2.0 licensed engine. Download SKILL.md, or expand the full instructions below.

Read the full authoring instructions

Turn the user's idea into a working world, a local preview and a validated exportable bundle. Choose mechanics, presentation and reasonable defaults from the prompt. Ask only for information that blocks the requested behavior. Preserve the user's chosen provider and existing world behavior. Sequencer is the default managed integration when a provider has not been chosen.

Read the package's README and docs/api.md. Use genesis init with the nearest template, then implement the requested world in genesis.json, interface.html and controller.js. Adapt the actual controls, rules and scene context to the idea. Use the local runner's labeled fixtures for an immediate preview; connect live generation when the provider is configured and spending is authorized.

The stock local runner returns the arena move fixture for LLM requests. For a different responseSchema, supply matching fixture data through a local host provider using createLlmProvider; keep preview-only providers outside the portable project. Do not present a fixture response as live generation.

Use window.Genesis for browser actions, state subscriptions, seats and assets. Read actor eligibility from the accepted host view. Keep health, turn order, vote outcomes and permitted state transitions in synchronous onEvent(context). Render LLM names as text; never evaluate model output as HTML or JavaScript.

For generated moves or world choices, request tool.llm.generate with a bounded object responseSchema, a cost ceiling and a guard against stale battle or scene IDs. Consume job.ready's event.data.data. Generate a move set once per encounter. Commit game outcomes before scene.request and wait for actual playback.completed before opening a visual turn. The arena-llm example covers four generated moves and player replacement.

Declare media under assets/ with MIME type and byte size. Export a complete ZIP with genesis export. Use relative paths in portable files; attach them through the host adapter for production. Hosts copy immutable assets and provide runtime URLs. Keep credentials, wallets and prices outside project files.

For Sequencer, use a server-side SequencerClient with SEQUENCER_API_KEY. Read its model catalog and pricing before paid image, audio or video work. Pass a server-enforced maxCostUsd and a stable idempotencyKey to generate; read the resulting media through media(workspaceId, mediaId). Quote private streams for their chosen duration before starting. Save a version-checked draft with complete assets. Saving a draft does not start a stream or publish it. Supply your own authenticated server transport and monetization for custom deployments. For another provider, implement the provider contract and persistent result store described in docs/providers.md.

Run genesis validate, export the complete bundle and open an actual local preview. Exercise the changed custom control, repeat a turn, reject a wrong actor and stale action, and verify mobile layout. Run npm test when changing the runtime or provider contracts. Offline move/video fixtures demonstrate the protocol; describe them as fixtures. Deliver the project location, preview URL and bundle, or the saved draft when requested. Report any untested live-provider behavior. Publish only within the user's authorized scope.