> 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/reference/level-1-api.md).

# Level 1 API

World Protocol Level 1 defines discovery, entity reads and a discovery action. The repository includes an [OpenAPI 3.1 document](https://github.com/KobotAI/world-protocol/tree/main/docs/reference/openapi.yaml) for GitBook, client generators and API tooling. The contracts in `@worlddevkit/spec` remain the protocol source of truth.

Examples below use the local starter at `http://localhost:8787`. Production clients should start from a world origin and discover its API endpoint.

## Discovery

```http
GET /.well-known/world.json
```

```sh
curl http://localhost:8787/.well-known/world.json
```

## List entities

```http
GET /api/world/v0/entities/{type}?limit=20&cursor={opaqueCursor}
```

```sh
curl --get 'http://localhost:8787/api/world/v0/entities/wp%3Aplace' \
  --data-urlencode 'limit=2' \
  --header 'accept: application/json'
```

## Get an entity

```http
GET /api/world/v0/entities/{type}/{id}
```

Both type and ID are URL path components and must be encoded.

## Discover entities

```http
POST /api/world/v0/actions/wp%3Adiscover
Content-Type: application/json

{
  "input": {
    "types": ["wp:place"],
    "text": "garden",
    "limit": 20
  }
}
```

## Errors

Non-success responses contain a stable `code` and human-readable `message`. SDK consumers receive these as `WorldHttpError` with `status`, `code`, `details` and `url`.

## Versioning

The current protocol is `world/0.1` and the Level 1 route is `/api/world/v0`. Do not substitute `/api/v1`; follow the discovery document.


---

# 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/reference/level-1-api.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.
