LaserData Cloud
Laser SDK

Laser SDK

One connection and eight primitives: Log, Views, Changes, State, Graph, Memory, Context, and Fabric.

Stream, store, query, and coordinate distributed systems and AI agents on one durable foundation. Use the same typed SDK with Laser Stack locally or LaserData Cloud in production.

Laser SDK uses one durable log as its source of truth. It derives query, state, graph, memory, and agent services from that log. Every operation follows one form: object.verb(input).

The SDK has three clients. Rust is the reference implementation. Python binds the Rust core. TypeScript is a native client. All three pass the same wire fixtures and BDD scenarios.

AGDX defines the shared data model. It covers typed records, managed data operations, and agent envelopes on a durable partitioned log. Laser SDK implements AGDX on Apache Iggy.

All three clients use VSR (Viewstamped Replication Revisited). Classic Iggy framing is unsupported. Laser Stack runs the LaserData Iggy fork and laser-plane locally. It supports the same SDK examples as LaserData Cloud.

One grammar, eight primitives

Each primitive has an accessor on the connected client. Each action is a verb on that primitive.

#PrimitiveAccessorDescriptionBuilt for
1Loglaser.stream("shop").topic("orders")Everything starts as a message. An event or command is still a message. The log records it once, then services can read it live, resume from an offset, or replay it from the beginning.Event-driven services, audit trails, live feeds
2Viewslaser.query("orders_v1")Ask the stream a question. A view is a query already kept up to date. Filter, aggregate, paginate, or search without moving events into another database.Dashboards, order books, analytics APIs
3Changeslaser.watch()Stop re-querying blind. Poll a lightweight advancement feed, then query only when the view has moved. It uses the connection you already have.Live UIs, cache invalidation, reactive pipelines
4Statelaser.kv("profiles")Keyed state, with branches. Point reads, compare-and-swap, and TTLs live next to the log. Forks create copy-on-write data branches you can promote or discard.Sessions, feature flags, what-if simulations
5Graphlaser.graph("kg")Follow the relationships. Turn entities in your messages into nodes and edges. Traverse them now, search by meaning, or ask what was true at an earlier time.Knowledge graphs, recommendations, entity resolution
6Memorylaser.memory("customer:42")Remember what matters. Remember, recall, improve, and forget on an auditable log. Add a vector backend or reranker when recall should search by meaning.Assistants that remember users, agents that learn
7Contextlaser.context(conversation)One conversation, assembled. Context binds messages and working memory to one conversation, then assembles a bounded prompt-ready history. Shared knowledge graphs remain cross-conversation.Multi-turn agents, support copilots, session replay
8Fabriclaser.agent("triage")Agents that retry after failure. Agents discover capabilities, delegate work, and receive uncommitted tasks again after failure. Contracts carry deadlines. Workflows carry budgets and compensation.Multi-agent systems, durable pipelines, approvals

Laser SDK ships in independently adoptable layers:

  • Streaming - the open Apache Iggy VSR foundation, on by default.
  • Managed platform - views, state, graph, change feed, and forks on Laser Stack or LaserData Cloud.
  • Agentic - the fabric: reliable consumers, memory, contracts, workflows.

Use one layer or all of them. They share the one connection.

Install

npm install @laserdata/laser-sdk
cargo add laser-sdk
pip install laser-sdk

Package registries: crates.io · PyPI · npm

Source and issues: github.com/laserdata/laser-sdk

Get started

The eight primitives

Supporting topics

On this page