Skip to main content

Module state

Module state 

Source

Modules§

channel
Channel trait and channel types for state field access with checkpoint support
messages
trait_

Structs§

AnyValueReducer
AnyValue reducer: assumes all values are equal
AppendReducer
Append reducer: accumulate all writes
CowState
Copy-on-write state wrapper (default state wrapper)
DeltaChannel
Delta channel: append-heavy optimization with periodic snapshots
EphemeralChannel
Ephemeral channel: value is cleared at the start of each superstep
FieldVersions
Per-field version numbers for state change tracking.
FieldsChanged
Bitmask tracking which fields changed
ImageData
Image data for multimodal content
LastValueAfterFinishChannel
Last-value-after-finish channel: value only available after finish() is called
LastWriteWinsReducer
LastWriteWins reducer: allows multiple writers, last one wins
Message
Message type for LLM conversations.
MessagesState
Built-in state for simple chat agents
MessagesStateUpdate
Update type for MessagesState
NamedBarrierChannel
Named barrier channel: waits for all registered named sources to write
Overwrite
Bypass reducer: overwrite value directly, bypassing normal merge
RemoveMessage
Remove-message identifier for message deletion
ReplaceReducer
Replace reducer: only one writer per superstep (default)
RingBufferChannel
Ring buffer channel for append-heavy fields with bounded size
TokenUsage
Token usage information from LLM API responses
ToolCall
Tool call within a message
TopicChannel
Topic channel: accumulates all published values into a list
UntrackedChannel
Untracked channel: value is not persisted across checkpoints

Enums§

Content
Message content
ContentPart
Content part for multimodal messages
DeltaBlob
Delta blob for representing checkpoint state
ImageSource
Image source for multimodal content
Role
Message role

Constants§

REMOVE_ALL_MESSAGES
Special sentinel: remove all messages

Traits§

Channel
Channel trait for state field access with checkpoint support
FromState
Trait for extracting output schema from full State
IntoState
Trait for converting input schema into full State
Reducer
Reducer trait defining merge semantics for state fields
State
State trait for graph state management

Functions§

messages_reducer
Messages reducer with append+merge+delete semantics