Skip to content

Reference

This section is the API reference, generated from the source code's docstrings. Each module has its own page, listing its classes, functions and constants with their full signatures.

Most applications import from a subpackage, for example from anagrapheus.timeline import ReplayPins. Each subpackage re-exports its public names, but each name is documented on the page of the module that defines it. So ReplayPins is documented under anagrapheus.timeline.replay, not under anagrapheus.timeline. The groups below say which module holds what.

The top-level package adds one function of its own, anagrapheus.register_builtin_events(registry). It registers every event type the library emits, across all subpackages, into an EventTypeRegistry. Call it once when you build your registry. Registering only some subpackages' events leads to an UnknownEventType error later, when a reader reaches an event type that was not registered.

Timeline

anagrapheus.timeline: The append-only event log, its SQLite store, the event-type registry, folds and projections, schema upcasting, the pin ledger, replay and recordings.

Provider

anagrapheus.provider: Model and tool calls sent through the pin ledger, and the call policy that decides when two calls are the same call.

Beliefs

anagrapheus.beliefs: Per-scope beliefs as a fold over the log, belief ids minted only from declared predicates, and the entity index (entity to belief ids) that re-keying reads.

Identity

anagrapheus.identity: Entity identity as decisions recorded in the log, the registry folded from them, and the re-key rows a merge produces.

Chronicle

anagrapheus.chronicle: Consolidation of log ranges into sections that cite the range they cover, read as recent events plus older history.

Assembly

anagrapheus.assembly: Prompts built only from the slices of state a role was granted, with parts that cite their sources and a budget that never sheds a binding part.