Skip to main content
The Worlds SDK provides a high-level, type-safe interface for managing worlds, executing SPARQL queries, and performing vector searches.

Installation

Install the SDK via JSR:
deno add jsr:@wazoo/worlds-sdk

Basic usage

Initialize the client with your API key.
import { WorldsSdk } from "@wazoo/worlds-sdk";

const sdk = new WorldsSdk({
  baseUrl: "https://api.wazoo.dev",
  apiKey: "your-api-key",
});

// Run a SPARQL query
const result = await sdk.worlds.sparql(
  "WORLD_ID",
  `
  SELECT ?s ?p ?o WHERE {
    ?s ?p ?o .
  } LIMIT 10
`,
);

console.log(result);
[
  {
    "s": { "termType": "NamedNode", "value": "http://example.org/subject1" },
    "p": { "termType": "NamedNode", "value": "http://example.org/predicate1" },
    "o": { "termType": "Literal", "value": "Object 1" }
  }
]

Neuro-symbolic tools

The @wazoo/worlds-ai-sdk package provides tools that bridge LLMs and structured RDF knowledge, enabling agents to interact with world graphs autonomously. When used together, these tools allow agents to navigate and manipulate knowledge graphs with precision:
  • Schema discovery: Agents can introspect a world to identify available classes and properties. This anchors them in the specific vocabulary of the domain, significantly reducing hallucinations.
  • Hybrid search: Agents can discover nodes via similarity or keyword matching, enabling them to find relevant starting points in large graphs.
  • Safe execution: A restricted SPARQL interface allows agents to execute structural queries safely, ensuring both reasoning integrity and database security.
  • Semantic identification: Utilities for generating consistent identifiers, known as IRIs, ensure that new items and relationships maintain the semantic integrity of the graph.

Framework integration

These tools are compatible with frameworks like the Vercel AI SDK, allowing you to expose them as standard tools during model conversations.

AI SDK integration

Connect Worlds to your preferred agent frameworks.

CLI reference

Manage your worlds from the command line.