🌿 XetoBase is coming soon — The secure, AI-powered stack for everything.
Axon Java SDK Python SDK JavaScript SDK CLI

The XetoBase Developer Ecosystem

XetoBase exposes its full capabilities through multiple interfaces. Use Axon for in-platform scripting and Observable triggers. Use the Java, Python, or JavaScript SDKs to integrate XetoBase into external applications. Use the xb CLI for local development, deployments, and automation. All SDKs share the same underlying API and auth model.

Axon — built-in, sandboxed scripting
Java SDK — com.xetobase:sdk
🐍 Python SDK — pip install xetobase
🟨 JS SDK — npm install @xetobase/sdk
⌨️ CLI — xb login, xb deploy
Built-in Language

Axon

XetoBase's native sandboxed scripting language — runs on client and server.

Axon is the language of XetoBase. Every query, every Observable trigger, every ION component function, and every Wooley response handler is written in Axon. It's a functional, expression-based language with a small but powerful standard library.

Because Axon runs inside a hardened sandbox, it's safe to let AI generate and execute Axon scripts — there's no risk of code escaping the runtime. This is what makes the Wooley AI integration possible: Wooley generates valid Axon and the platform executes it safely.

Reading records

// Read all records of a spec type readAll(SiteReading) // Filter and sort readAll(SiteReading) .filter(r => r->temp > 70) .sortBy("ts", "desc") .limit(50) // Read a single record by ID read(SiteReading, "rec-id-here") // Aggregate readAll(SiteReading) .filter(r => r->ts >= today()) .aggregate("temp", "avg")

Observable trigger

// React when a new SiteReading is created observe(SiteReading, "onCreate", rec => { if (rec->temp > 80) { notify("ops", { msg: "High temp at " + rec->site, data: rec }) } })

Calling Wooley from Axon

// Ask Wooley a question result = wooley("Summarize today's high-temp alerts") // Pass context data to Wooley wooley({ prompt: "Generate a dashboard for this data", context: readAll(SiteReading).limit(10), format: "ionComponent" }) // Wooley can also be called with a spec lookup wooley({ prompt: "Explain the ph::WeatherStation spec", format: "markdown" })

Core Axon Functions

Function Description
readAll(Spec) Return all records matching the given xeto spec type
read(Spec, id) Read a single record by spec type and ID
create(Spec, data) Create a new record; validates against spec before writing
update(rec, changes) Update fields on an existing record
delete(rec) Delete a record (audited)
observe(Spec, event, fn) Register an Observable trigger function
wooley(prompt) Call the Wooley AI agent with a prompt or options map
notify(target, msg) Send a notification to a user, team, or webhook
now() Current UTC timestamp as DateTime
today() Start of today as a Date value
ionWidget(opts) Define an ION UI widget component declaratively
.filter(fn) Filter a record set with a predicate function
.sortBy(field, dir) Sort a record set by a field, ascending or descending
.limit(n) Limit a record set to at most n results
.aggregate(field, fn) Aggregate a numeric field: avg, sum, min, max, count

Java SDK

Integrate XetoBase into your Java applications using the official SDK.

Coming Soon

Maven

<!-- pom.xml --> <dependency> <groupId>com.xetobase</groupId> <artifactId>xetobase-sdk</artifactId> <version>1.0.0</version> </dependency>

Gradle

implementation 'com.xetobase:xetobase-sdk:1.0.0'

Usage

import com.xetobase.XetoBaseClient; import com.xetobase.Record; import com.xetobase.RecordSet; XetoBaseClient client = XetoBaseClient.builder() .url("https://my.xetobase.example.com") .apiKey("xb_key_...") .build(); // Query records RecordSet records = client.query( "readAll(SiteReading).filter(r => r->temp > 70)" ); // Get typed records List<Record> recs = client.records("SiteReading"); // Register an observable client.observe("SiteReading", "onCreate", rec -> { System.out.println("New record: " + rec.get("site")); }); // Ask Wooley String answer = client.wooley( "Summarize today's high-temp alerts" );

XetoBaseClient Methods

Method Description
client.query(axon) Execute an Axon expression and return results as a RecordSet
client.records(spec) List all records of a given xeto spec type
client.record(spec, id) Fetch a single record by spec type and ID
client.create(spec, data) Create a new record; server validates against spec
client.update(id, changes) Patch an existing record with a map of field changes
client.delete(id) Delete a record by ID (audited on server)
client.observe(spec, event, fn) Register a local callback for server-side Observable events
client.wooley(prompt) Send a prompt to the Wooley AI agent; returns a string or structured result
🐍

Python SDK

Use XetoBase from Python scripts, Jupyter notebooks, data pipelines, and more.

Coming Soon

Install

pip install xetobase

Usage

from xetobase import XetoBaseClient client = XetoBaseClient( url="https://my.xetobase.example.com", api_key="xb_key_..." ) # Query using Axon records = client.query( "readAll(SiteReading).filter(r => r->temp > 70)" ) # List all records of a spec type site_readings = client.records("SiteReading") # Create a new record client.create("SiteReading", { "site": "Building-A", "temp": 74.2, "ts": "2025-03-18T09:00:00Z" }) # Register an observable callback def on_new_reading(rec): if rec["temp"] > 80: print(f"High temp at {rec['site']}") client.observe("SiteReading", "onCreate", on_new_reading) # Ask Wooley answer = client.wooley( "What was the average temp yesterday?" ) print(answer)

XetoBaseClient Methods

Method Description
client.query(axon) Execute an Axon string and return results as a list of dicts
client.records(spec) Return all records of a given xeto spec type as a list
client.record(spec, id) Fetch a single record by spec type and string ID
client.create(spec, data) Create a new record from a dict; validates on server
client.update(id, changes) Update fields on an existing record with a partial dict
client.delete(id) Delete a record by string ID
client.observe(spec, event, fn) Subscribe to Observable events with a Python callback
client.wooley(prompt) Send a natural language prompt to Wooley; returns string or dict
🟨

JavaScript SDK

Use XetoBase from Node.js, browsers, and modern JS frameworks (React, Vue, Svelte).

Coming Soon

Install

npm install @xetobase/sdk # or yarn add @xetobase/sdk # or pnpm add @xetobase/sdk

Node.js / ESM Usage

import { XetoBaseClient } from '@xetobase/sdk'; const client = new XetoBaseClient({ url: 'https://my.xetobase.example.com', apiKey: 'xb_key_...', }); // Execute an Axon query const records = await client.query( `readAll(SiteReading).filter(r => r->temp > 70)` ); // Get all records of a spec type const readings = await client.records('SiteReading'); // Create a record await client.create('SiteReading', { site: 'Building-A', temp: 74.2, ts: new Date().toISOString(), }); // Subscribe to Observable events (SSE) client.observe('SiteReading', 'onCreate', (rec) => { console.log('New reading:', rec.site, rec.temp); }); // Ask Wooley const answer = await client.wooley( 'Summarize today\'s high-temp alerts' ); console.log(answer);

XetoBaseClient Methods

Method Description
client.query(axon) Execute an Axon string; returns Promise<Record[]>
client.records(spec) List all records of a spec type; returns Promise<Record[]>
client.record(spec, id) Fetch a single record by spec type and ID
client.create(spec, data) Create a record; server validates against xeto spec
client.update(id, changes) Partially update a record with an object of changes
client.delete(id) Delete a record; returns Promise<void>
client.observe(spec, event, fn) Subscribe to Observable events via SSE; calls fn on each event
client.wooley(prompt) Prompt the Wooley AI agent; returns Promise<string | object>

React hook example

import { useXetoBase } from '@xetobase/react'; function Dashboard() { const { data } = useXetoBase( 'readAll(SiteReading).limit(10)' ); return <table>{data.map(...)}</table>; }
⌨️

CLI

The xb command-line tool for local development, deployments, and automation.

Coming Soon

Install

# macOS / Linux curl -fsSL https://get.xetobase.dev | sh # npm global install npm install -g @xetobase/cli # Homebrew (coming soon) brew install xetobase

Authentication

# Log into your XetoBase instance xb login # Log into a specific instance xb login --url https://my.xetobase.example.com # Show current auth status xb whoami

Deployment

# Deploy the current project xb deploy # Deploy to a named environment xb deploy --env production # Deploy with a specific config file xb deploy --config xetobase.config.json

Records

# List records of a spec type xb records list SiteReading # List with a filter xb records list SiteReading --filter "temp > 80" # Export records as JSON xb records export SiteReading --out readings.json # Import records from a file xb records import SiteReading --file readings.json

Observables

# List all observable triggers xb observe list # Add a new observable from an Axon file xb observe add --spec SiteReading --event onCreate \ --file trigger.axon # Remove an observable by ID xb observe remove obs-id-here # Tail observable event log xb observe tail --spec SiteReading

Wooley CLI

# Ask Wooley a question xb wooley ask "What was the average temp yesterday?" # Ask Wooley to generate an Axon script xb wooley ask "Write an Axon query for high-temp sites" \ --format axon # Ask Wooley to explain a xeto.dev spec xb wooley ask "Explain ph::WeatherStation" --format markdown # Interactive Wooley chat mode xb wooley chat

CLI Command Reference

Command Description
xb login Authenticate with a XetoBase instance; stores token locally
xb whoami Display the currently authenticated user and instance URL
xb deploy Deploy the current project (Axon scripts, Observables, ION UIs)
xb records list List records of a given spec type with optional filter
xb records export Export records to a JSON or CSV file for backup or migration
xb records import Import records from a JSON file; validates each record against spec
xb observe list Show all registered Observable triggers in the current project
xb observe add Register a new Observable from an Axon file and spec/event pair
xb observe remove Remove an Observable trigger by its ID
xb observe tail Stream live Observable event logs for a spec type to the terminal
xb wooley ask Send a prompt to Wooley from the terminal; prints the response
xb wooley chat Start an interactive Wooley chat session in the terminal
xb specs list List xeto.dev specs available in the current project's dependencies
xb specs add Add a xeto.dev spec library to the current project
Coming Soon

Ready to build on XetoBase?

Join the waitlist and get early developer access when we launch.