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

Prerequisites

Before writing code, you need a Worlds API key.
  1. Sign up at the Worlds Console.
  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 fact, and retrieve it deterministically.
1

Install the SDK

Install the canonical TypeScript client.
deno add jsr:@wazoo/worlds-sdk
2

Observe the execution

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).
  4. Query that fact deterministically using SPARQL.
index.ts
import { WorldsSdk } from "@wazoo/worlds-sdk";

// 1. Connect (Drop directly into the cloud engine)
const sdk = new WorldsSdk({
  apiKey: process.env.WORLDS_API_KEY!,
});

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

// 3. Inject a fact (Subject -> Predicate -> Object)
await sdk.worlds.import(
  world.id,
  `<#system> <#status> "operational" .`,
  { format: "turtle" }
);

// 4. Retrieve the fact precisely
const result = await sdk.worlds.sparql(
  world.id,
  `SELECT ?subject ?predicate ?object WHERE { ?subject ?predicate ?object }`
);

console.log("Memory retrieved:", result);
3

Analyze the output

The system executes the query and returns the fact exactly as you injected it, without guessing.
Memory retrieved:
[
  {
    "subject": { "value": "system" },
    "predicate": { "value": "status" },
    "object": { "value": "operational" }
  }
]
You have completed the fundamental loop of interacting with stateful World memory.

Next steps

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

AI agent integration

Grant an AI agent direct access to construct its own Worlds.

Self-hosting

Host the Worlds API infrastructure on your own hardware.