> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wazoo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Build a world in 2 minutes

The fastest way to understand Worlds is to interact with it natively. This
quickstart skips the theory and drops you straight into the API to execute your
first neuro-symbolic query.

## Prerequisites

Before writing code, you need a Worlds API key.

1. Sign up at the [Worlds Console](https://console.wazoo.dev).
2. Generate an API key.
3. Save it securely to your `.env` file as `WORLDS_API_KEY`.

## Hello, World!

Follow this sequence to train on the core interaction loop: connect to the cloud
engine, inject a verifiable fact, and retrieve it deterministically.

<Steps>
  <Step title="Install the API">
    Install the canonical TypeScript client.

    <CodeGroup>
      ```bash deno theme={null}
      deno add jsr:@wazoo/worlds-sdk
      ```

      ```bash npm theme={null}
      npx jsr add @wazoo/worlds-sdk
      ```

      ```bash bun theme={null}
      bunx jsr add @wazoo/worlds-sdk
      ```

      ```bash pnpm theme={null}
      pnpm i jsr:@wazoo/worlds-sdk
      ```
    </CodeGroup>
  </Step>

  <Step title="See it in action">
    Run the following self-contained script to execute a complete neuro-symbolic loop:

    1. Connect to the Cloud API.
    2. Create an isolated World.
    3. Inject a semantic fact ([triple](/worlds#facts)).
    4. Query that fact deterministically using [SPARQL](/worlds/query).

    ```typescript index.ts theme={null}
    import { Worlds } from "@wazoo/worlds-sdk";

    // 1. Connect (Drop directly into the cloud engine)
    const worlds = new Worlds({
      apiKey: process.env.WORLDS_API_KEY!,
      baseUrl: "https://api.wazoo.dev",
    });

    // 2. Create an isolated world
    const world = await worlds.create({
      slug: "quickstart-cloud",
      label: "My First World",
    });

    // 3. Inject a mission-critical fact (Subject -> Predicate -> Object)
    await worlds.import(
      "quickstart-cloud",
      `@prefix user: <https://etok.me/#> .
      @prefix wazoo: <https://wazoo.dev/#> .
      user:person wazoo:worksFor wazoo:organization .`,
      { contentType: "text/turtle" },
    );

    // 4. Retrieve the fact with absolute precision
    const result = await worlds.sparql(
      "quickstart-cloud",
      `PREFIX wazoo: <https://wazoo.dev/#>
      SELECT ?wazoo WHERE { <https://etok.me/#person> wazoo:worksFor ?wazoo }`,
    );

    console.log("Verifiable context retrieved:", JSON.stringify(result, null, 2));
    ```
  </Step>

  <Step title="Analyze the output">
    The system executes the query and returns the fact exactly as you injected it, without guessing.

    ```json theme={null}
    Verifiable context retrieved:
    {
      "head": {
        "vars": ["wazoo"]
      },
      "results": {
        "bindings": [
          {
            "wazoo": { "type": "uri", "value": "https://wazoo.dev/#organization" }
          }
        ]
      }
    }
    ```

    You have completed the fundamental loop of interacting with high-stakes verifiable context.
  </Step>
</Steps>

## Next steps

Now that you have securely connected to your cloud instance, integrate the API
directly into your agentic loops.

<CardGroup cols={2}>
  <Card title="AI agent integration" icon="bot" href="/integrations/ai-sdk">
    Grant an AI agent direct access to construct its own Worlds.
  </Card>

  <Card title="Self-hosting" icon="server" href="/contribute/self-host">
    Host the Worlds API infrastructure on your own hardware.
  </Card>
</CardGroup>
