> For the complete documentation index, see [llms.txt](https://docs.kobotai.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kobotai.co/world/guides/build-a-world.md).

# Build with a coding agent

The minimal starter is intentionally small enough for a coding agent to change safely. It runs locally without credentials, a database, or Docker.

## Deterministic workflow

Ask the agent to do these steps in order:

1. Read `AGENTS.md` and this guide.
2. Use `examples/minimal-world` as the implementation.
3. Rename the world in `src/world.js`.
4. Choose the public entity types and update `discovery.entityTypes`.
5. Replace the fixture entities while preserving the entity envelope: `ref`, `version`, `updatedAt`, `visibility`, `attributes`, `relationships`, and `capabilities`.
6. Implement `source.list(type)` and `source.get(type, id)`.
7. Leave the HTTP adapter in `src/server.js` unchanged.
8. Preserve `/.well-known/world.json`, the advertised API endpoint, opaque pagination, and `wp:discover`.
9. Add or update conformance tests.
10. Run `pnpm test` and `pnpm typecheck`.
11. Deploy with `WORLD_URL`, `HOST=0.0.0.0`, and the platform-provided `PORT`.
12. Run remote conformance against the public HTTPS origin.

Do not add persistence or authentication until the product requires them. First make the public read model correct and conformant.

## Copyable prompt

```
Read AGENTS.md, docs/getting-started/quickstart.md, and docs/agents/build-a-world.md.

Turn examples/minimal-world into a World Protocol Level 1 world named "<WORLD NAME>" for "<PRODUCT DESCRIPTION>".

Requirements:
- Use only public @worlddevkit/* APIs.
- Keep GET /.well-known/world.json and /api/world/v0 working.
- Define these entity types: <ENTITY TYPES>.
- Replace the synthetic fixtures with representative public data.
- Implement source.list and source.get with stable entity IDs.
- Keep the existing Node server adapter unless a change is strictly required.
- Do not add a database, authentication, Docker, or cloud-specific code.
- Production discovery must use WORLD_URL; never advertise localhost, 0.0.0.0, or a container address in production.
- Add or update conformance tests.
- Run pnpm test and pnpm typecheck and report exact results.
```

## Local verification

Start the world:

```sh
pnpm install --frozen-lockfile
pnpm quickstart
```

Query it from another terminal:

```sh
pnpm --dir examples/client-node quickstart
```

## Deployment contract

Configure the Node host with:

```
HOST=0.0.0.0
PORT=<provided by host>
WORLD_URL=https://your-world.example
```

Route both `/.well-known/world.json` and `/api/world/v0/*` to the process and terminate TLS at the platform or reverse proxy. Then verify:

```sh
node scripts/worldkit/check-live-level1.mjs https://your-world.example
```

See [Deploy a world](/world/guides/deploy-a-world.md) for the full checklist.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kobotai.co/world/guides/build-a-world.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
