Skip to main content
This quickstart uses only concrete code exercised by the pinned source tests. Complete Installation, then run the example from packages/langstate.

Create quickstart.py

Run it with the Poetry environment:

What this demonstrates

  1. OpenAPIReader resolves the Registration component into LangState’s internal Schema model.
  2. StateFactory.create_canonical_state() creates leaf fields addressed by dot-separated paths.
  3. StateFactory.create_interpretive_state() derives candidate values from the canonical state.
  4. InterpretiveFieldState holds a list of value-confidence candidates and one latest inference object.
  5. CanonicalStateSchema and InterpretiveStateSchema are Pydantic root models for transport or validation boundaries.
This does not instantiate LangState; the orchestrator is abstract at the pinned commit. Continue with OpenAPI to state or read the orchestrator contract.