Put simulations to work in your product.

Worlds, populations, lives and agents with a life, through one API. Everything here is generated from the core's own contract, which the server checks itself against on every start: 236 operations in 39 groups, contract version 1.

A glass lattice joined by ribbons to small worlds of different kinds

Connect

A key, a base address, and the contract.

The API is at https://api.livingworldslab.com; your keys come with your access. Send the key as a bearer token; every response names the contract version in its lw-contract header. Keys are server-side only: never in a browser or an app.

Roles: a member key does the work, an admin key designs and manages, a checker key reports verdicts on work it did not do.

curl -H "Authorization: Bearer $LW_KEY" "$LW_URL/contract"

curl -H "Authorization: Bearer $LW_KEY" "$LW_URL/worlds"

The SDK

A turn that carries a self's whole life.

The server-side SDK wraps the same contract: a turn brings the self's own record beside the task, and what happened is written back to it.

import { LivingWorlds } from "@livingworlds/sdk";

const lw = new LivingWorlds();          // LW_KEY; the base address defaults to https://api.livingworldslab.com
const turn = await lw.turn({ self: "concierge", task: question, person: userId });
const answer = await yourModel(turn.wrap(question));
await turn.done(answer);

Reference

39 groups of operations.

11 operationsCalibrationHow a world is held to account by the real one: answers corrected by a few real ones, intervals that keep their coverage, regions, kin, subgroups, and a world corrected as observations arrive. Stateless; nothing is stored.3 operationsUniverseThe laws every world in a project lives under, and the kinds of world it may hold.24 operationsWorldsMake a world, populate it, run it, step it, jump it, branch it, replay it, and open any life in it.13 operationsSimulationPopulations over time: lives stepped month by month, and what came of them.26 operationsSelvesAgents with a life: one record each, a character, a charter, beliefs that move only on evidence.10 operationsPersonasReady characters a self can take on.4 operationsPeopleThe people your selves serve, as your system knows them.4 operationsSwarmsGroups of selves working together under a principal.3 operationsSwarm runsA swarm at work, step by step.11 operationsWorkStanding work a self does on its own schedule.3 operationsTicketsProof of a turn, bound to the person it was for.6 operationsRunsEvery run announced before it starts, with each step written as it happens.4 operationsCheckersRegistered instruments that judge a self's work.1 operationsChecksA checker's verdicts, with the checker's own key.2 operationsProposalsChanges a self proposes to how it works, held until the gate decides.1 operationsLessonsWhat a self has learned and kept.2 operationsObservationsWhat a self has seen.2 operationsSourcesWhere a self reads from.1 operationsEventsWhat happened, as a feed.6 operationsForecastsForecasts, scored against what happened.7 operationsBacktestsA method tried on the past it never saw.1 operationsCalibrationHow well stated chances matched outcomes.9 operationsDesignsEverything a self, a population or a world is made of, declared in one place.3 operationsPacksBundles of design to reuse.4 operationsDimensionsThe forms a world can take.9 operationsProject settingsYour project's models, timezone, vocabulary and programs.1 operationsJobsLong work, followed to the end.3 operationsMCPThe same core over the Model Context Protocol, for agents and tools.1 operationsContractThis document, machine-readable.1 operationsLinksEvery ticket linked to a thing with the outcomes recorded against it, each with its time, and how many of them said it happened. Several outcomes per ticket, at different times, are normal: the decision first, what happened later.7 operationsPrimitivesOne person's years, age by age: household money (income, work, retirement, buffer, borrowing, spending) under an economy that moves between regimes, and the body (height, weight, lean share) under an energy balance and activity. Stateless and seeded; a model with stated parameters, `basis: modelled`, validity echoed.2 operationsMarketsMarket stress scenarios on a capacity market (buyer segments by elasticity, providers by region, cost and capacity, posted, auction or order-book clearing), in their fixed order with variants; the trace fields, the standard market's basis and what is validated.15 operationsComputeThe Ipnops Compute kinds each Living Worlds area calls (climate, driving, robots, cities, health, agents, worlds3d, physics, games, twins), each with its parameters, inputs and outputs, and the machines serving it now. compute_allowed says whether this project may submit jobs (added in contract version 1, additive): a project not listed by the operator is refused with 403 on submission.10 operationsTwinsBuild a twin loop: a twin of a real system (domain weather: station temperature from a global AI weather model against live METAR readings), its subjects and its parameters with their uncertainty (the prior).15 operationsPhysicalEnrol a site, or replace its key: the key the site signs its batches and its command receipts with. Needs the project in LW_PHYSICAL_COMMAND_TENANTS.4 operationsHubShared tools this tenant may call through the core (web and news search first), each with its effect, licence and AI-use terms, today's limit and use. The provider's key stays in the core.1 operationsUsageWhat this tenant used, per day of its own time zone (added in contract version 1, additive): selves (calls, tokens in and out, seconds of model time; per self with by=self), hub (calls and cost in micro-dollars), web_search (used, refused, cost in US dollars), runs (started, and the sum of each number runs were charged under their cost keys), sim_runs (created, by status), compute_jobs (submitted, by kind: their compute units are the compute server's records, not the core's), and totals. The core holds no price per model token, so there is no money figure for selves. When the tenant set ceilings (PATCH /tenant { budgets }, see the note budgets) the report also carries `budgets`: the ceilings and, per self, world and run, each limit with what is used and left.5 operationsWeb-SearchToday's web search allowance (one per tenant, midnight to midnight in Europe/London): the limit, searches used, refused and avoided by the cache, the hit rate and the cost, per kind of caller.1 operationsPlacesConditions for a place on a date: temperature range, rain, wind and cloud from monthly normals (CHELSA V2.1 climatologies 1981-2010 at about 1 km, CC0; basis climatology, source and citation named) and daylight hours computed from the sun. Not a forecast: for days ahead run the compute kind weather.forecast. Added in contract version 1, additive.
Looking up the trunk of the great tree from its foot, lit windows in the bark and the crown above

Which world will you live in?

What grows here is meant to reach the real world. Start with a world of your own.