Open source · Source-only alpha

Language is fluid.
Your state should
be explicit.

A Python framework for the space between what a user says and what your application knows.

Represent uncertainty. Resolve it on your terms.
Build around state you can inspect.

Start from a pinned source checkout. Installation guide ↗

FROM LANGUAGE TO STATELS / 001
State explorerregistration
NATURAL LANGUAGE INPUT

“Register me as Ada. My full name is Ada Lovelace.”

interpretation
registrant.name2 candidates
Ada Lovelace0.96
Ada0.42
LATEST INFERENCE

The user supplied a full name after a short name.

Possibilities first. Decisions when you’re ready.
BUILT ON EXPLICIT PRIMITIVES

Python OpenAPI schemas Pydantic models Field-level state

01 / THE APPROACH

A conversation is context.
State is something you can work with.

Natural language is partial, ambiguous, and sometimes contradictory. Keep those possibilities visible before they become application decisions.

{ }01

Give uncertainty a structure.

Keep candidate values, confidence, and the latest inference together. Inspect what the system believes before deciding what to accept.

Explore interpretive state
02

Make resolved state explicit.

Store authoritative values at stable field paths. Give downstream validation and business logic a clear representation to work with.

Explore canonical state
03

Evaluate the state change.

Compare expected and actual interpretive states field by field. Test the effect of a mutator beyond the text of its response.

Explore evaluation

02 / THE ARCHITECTURE

Separate the belief
from the decision.

LangState gives interpretation and authoritative data different homes. Your application owns the policy that connects them.

Understand the two-state model
01

Interpretive state

Candidates · Confidence · Latest inference

{…}
Your resolution policyYOU DEFINE
02

Canonical state

Resolved values · Stable field paths

Projector and orchestration contracts are abstract.
Their implementations belong to your application.

03 / START WITH THE PRIMITIVES

Small building blocks.
Room for your architecture.

Read an OpenAPI schema, create canonical state, and derive interpretive state. Start with concrete APIs exercised by the documented source tests.

Walk through the quickstart
i

Early by design. Clear about the boundaries.Source-only alpha. No supported PyPI release; the PyPI name belongs to an unrelated project. See implementation status ↗

quickstart.pyPYTHON
# Run from the documented source checkout
from core.state.factory.state_factory import StateFactory

# schema comes from OpenAPIReader
factory = StateFactory()
canonical = factory.create_canonical_state(schema)

canonical.set_field(
 "registrant.name", "Ada Lovelace"
)

interpretive = factory.create_interpretive_state(
 canonical
)

# A candidate you can inspect
best = interpretive.get_best_value(
 "registrant.name"
)
Concrete state APIs Import reference ↗

MAKE THE IMPLICIT EXPLICIT

Give your next AI application
a state you can reason about.