Skip to main content

Crate juncture

Crate juncture 

Source

Modules§

chat
checkpoint
Checkpoint persistence types and traits
client
command
config
Configuration types for graph execution
edge
Edge system for graph routing
error
func
Functional API for defining workflows with plain functions
graph
Graph building, compilation, and topology validation
interrupt
Human-in-the-Loop (HITL) support
llm
LLM integration module.
memory
High-level memory abstractions for Juncture agents.
node
Node system for graph execution
observability
prebuilt
Prebuilt agent patterns for common LLM workflows.
pregel
Pregel execution engine
prelude
runtime
Runtime context for graph execution
send
Send API for dynamic fan-out
state
store
stream
subgraph
Subgraph support for nested graph execution
time
Platform-compatible time abstractions.
tools
Tools module for LLM function calling
tracing_wasm
WASM-compatible tracing helpers.
wasm_send
WASM-compatible Send wrappers.

Macros§

info_span
Create a span (native path).
interrupt
Interrupt macro for human-in-the-loop interactions (task-local version)
interrupt_with_ctx
Interrupt macro for human-in-the-loop interactions (explicit context)
parent_command
Parent command macro for subgraph-to-parent routing
path_map
Construct a PathMap from key-value pairs.

Structs§

AnyValueReducer
AnyValue reducer: assumes all values are equal
AppendReducer
Append reducer: accumulate all writes
BatchTransformer
Transformer that batches events by accumulation.
BudgetConfig
Budget configuration limits
BudgetTracker
Budget tracker for execution limits
BudgetUsage
Current budget usage statistics
CacheConfig
Cache configuration for node results
CacheKeyInput
Cache key input for LLM response caching
CachePolicy
Cache policy controlling how node results are cached
CallOptions
Options for LLM invocations
ChatAnthropic
Anthropic Claude implementation
ChatOllama
Ollama implementation
ChatOpenAI
OpenAI implementation
CheckpointNamespace
Namespace for checkpoint isolation in subgraph execution
CircuitBreakerConfig
Circuit breaker configuration for node execution
CircuitBreakerState
Runtime state of a circuit breaker
Command
Command: node return value combining state update and routing
CompiledGraph
Compiled and validated graph ready for execution
CowState
Copy-on-write state wrapper (default state wrapper)
DeltaChannel
Delta channel: append-heavy optimization with periodic snapshots
DeltaCounters
Delta tracking counters for a channel
DrawableEdge
Drawable edge for visualization
DrawableGraph
Drawable graph representation for export
DrawableNode
Drawable node for visualization
EntrypointConfig
Entry point configuration for graph execution
EphemeralChannel
Ephemeral channel: value is cleared at the start of each superstep
ErrorHandlerNode
Node wrapper that adds error recovery handling
EventEmitter
Event emitter for streaming
ExecutionConfig
Immutable execution configuration
ExecutionContext
Mutable execution context: holds state and version tracking
ExecutionInfo
Execution metadata for a graph run
FieldVersionTracker
Field version tracker for Pregel execution
FieldsChanged
Bitmask tracking which fields changed
FilterFieldsTransformer
Transformer that filters specific fields
Final
Final value distinguishing return value from saved state
FuncRuntime
Runtime context for functional API workflows
GraphClient
Graph-specific client
GraphDrained
Information about graph being drained
GraphInterrupt
Interrupt information from graph execution
GraphOutput
Output from graph execution
GraphOutputMetadata
Metadata about graph execution
HealthStatus
Health status of the graph execution
Heartbeat
Heartbeat mechanism for long-running nodes
HeartbeatWatcher
Watches heartbeats and detects staleness for idle timeout detection
ImageData
Image data for multimodal content
IndexConfig
Vector index configuration
InterruptContext
Interrupt context for managing human-in-the-flow interactions
InterruptInfo
Information about a human-in-the-loop interrupt
InterruptSignal
Signal sent when a node requests interruption
InvokeConfig
Configuration for graph invocation
Item
Stored item
JsonParseTransformer
Transformer that parses JSON strings
JunctureClient
Juncture client for server interaction
JunctureError
Juncture error with backtrace
LastValueAfterFinishChannel
Last-value-after-finish channel: value only available after finish() is called
LastWriteWinsReducer
LastWriteWins reducer: allows multiple writers, last one wins
ManagedValues
Managed values for step tracking
MemoryStore
In-memory store implementation
Message
Message type for LLM conversations.
MessageBatchConfig
Configuration for batching LLM streaming chunks.
MessageChunk
Streaming message chunk
MessagesState
Built-in state for simple chat agents
MessagesStateUpdate
Update type for MessagesState
NamespaceSegment
Single namespace segment with node name and invocation UUID
NodeError
Error information for node execution failures
NodeHealth
Health status of an individual node
NodeMetadata
Metadata stored for each node during graph construction
NopToolInterceptor
No-op interceptor (default implementation)
Overwrite
Bypass reducer: overwrite value directly, bypassing normal merge
ParentCommand
Command wrapper for subgraph-to-parent communication
PathMap
Path mapping for conditional edges
PendingTask
Pending task for execution
PregelLoop
Main Pregel execution loop
ReactAgentConfig
ReAct agent configuration
RemoveMessage
Remove-message identifier for message deletion
ReplaceReducer
Replace reducer: only one writer per superstep (default)
ResourceLimits
Resource limits for graph execution
RetryPolicy
Retry policy for node execution
RetryingNode
Node wrapper that adds retry behavior
RingBufferChannel
Ring buffer channel for append-heavy fields with bounded size
RunControl
Collaborative drain control for graceful shutdown
RunnableConfig
Configuration for graph execution
Runtime
Execution context for graph nodes
Scratchpad
Scratchpad for interrupt handling and transient data storage
SearchItem
Search result item with optional similarity score
SearchQuery
Search query
SearchResult
Search result
Send
Dynamic fan-out target
SendTarget
Send target for dynamic fan-out
StateFilter
Filter for state history queries
StateGraph
Builder for constructing executable Juncture graphs
StateSnapshot
State snapshot
StateUpdate
State update for manual checkpoint modifications
StreamConfig
Configuration for streaming.
StreamHandle
Result of a streaming graph execution.
StreamPart
Unified stream event format – all events carry namespace information.
StreamResumption
Resumption state for streaming
StreamWriter
Writer for streaming events from a node
StructuredOutputModel
Wrapper for structured output from LLMs
SubgraphConfig
Configuration for subgraph execution
SubgraphInfo
Information about a subgraph in a compiled graph
SubgraphMount
A mounted subgraph ready for execution as a node
SubgraphNode
Subgraph node wrapper for type erasure
SubgraphTransformer
Subgraph stream event transformer with namespace and filter
SuperstepResult
Result of executing one superstep
TTLConfig
Configuration for time-to-live (TTL) behavior on MemoryStore.
TaskConfig
Task-level configuration for node execution
TaskOutput
Output from a single completed task
Thread
Thread information
TimeoutPolicy
Node-level timeout policy
TokenUsage
Token usage information from LLM API responses
ToolCall
Tool call within a message
ToolDefinition
Tool definition for function calling
ToolExecutionTrace
Tool execution trace record
ToolNode
Tool node for executing function calls
ToolNodeConfig
Tool node configuration
ToolRuntime
Tool runtime context injected into tool execution
TriggerTable
Trigger table for compiled graph execution
TriggerToNodes
Channel-to-node reverse mapping for efficient scheduling
UntrackedChannel
Untracked channel: value is not persisted across checkpoints

Enums§

AuthConfig
Authentication configuration for client
BubbleUp
Result that bubbles up from subgraph execution
BudgetExceededAction
Action to take when a budget limit is exceeded
BudgetExceededReason
Reason why budget was exceeded
CircuitState
Circuit breaker states
ClientError
Client error types
CommandGoto
Routing command from node to parent or child graph
Content
Message content
ContentPart
Content part for multimodal messages
DebugEvent
Debug event details
DeltaBlob
Delta blob for representing checkpoint state
Durability
Checkpoint durability mode
Edge
Edge in a Juncture graph
ErrorCode
Error code categorizing the error type
FilterExpr
Filter expression for search
Goto
Routing instruction from node
GraphTarget
Target graph for routing
ImageSource
Image source for multimodal content
InvalidUpdateError
Invalid update error variants
LlmError
LLM invocation error types
LoopStatus
Status of the Pregel execution loop
NodeHealthState
Health state of a node
NodeTimeoutError
Node timeout error variants
PregelStreamEvent
Stream event during graph execution
PromptSource
Prompt source for agents
ResumeValue
Value provided when resuming from an interrupt
Role
Message role
RouteResult
Result of routing computation
StoreError
Store error types
StoreOp
Store operation type
StoreResult
Store operation result
StreamEvent
Stream event during graph execution
StreamMode
Stream mode for graph execution
SubgraphPersistence
Checkpoint persistence mode for subgraphs
SyncAsyncFuture
A task result that may be synchronously ready or asynchronously computed.
TaskEventType
Task event type
TaskTrigger
What triggered a task to be scheduled
ToolChoice
Tool selection strategy
ToolError
Tool execution error types
ToolsEvent
Tool execution event
TopologyError
Topology validation errors

Constants§

CHECKPOINT_NS_SEPARATOR
Separator used between namespace segments in checkpoint namespace strings.
END
Sentinel constant for graph termination
HIDDEN_TAG
Tag used to mark interrupt signals that should be hidden from external consumers
REMOVE_ALL_MESSAGES
Special sentinel: remove all messages
START
Sentinel constant for graph entry point

Traits§

Channel
Channel trait for state field access with checkpoint support
ChatModel
Unified ChatModel trait for all LLM providers
CheckpointSaver
Checkpoint persistence interface
EmbeddingFunc
Trait for computing embeddings for vector search.
FromState
Trait for extracting output schema from full State
GraphLifecycleCallback
Callback trait for graph lifecycle events.
IntoNode
Conversion trait for creating nodes from async functions
IntoState
Trait for converting input schema into full State
JsonSchema
Trait for types with JSON Schema support
MetricsCollector
Trait for collecting metrics during graph execution.
Node
Node trait for graph execution
PregelProtocol
Pregel protocol trait for unified graph execution
Reducer
Reducer trait defining merge semantics for state fields
Router
Router trait for conditional edge routing
State
State trait for graph state management
StateSubset
Compile-time constraint for shared-state subgraph mode
StatefulTool
Stateful tool trait for tools that need graph state access
Store
Store trait for cross-thread long-term memory
StreamTransformer
Transformer for stream data
StreamWriterTrait
Non-generic stream writer trait for Runtime integration.
Tool
Unified tool trait
ToolCallTransformer
Tool call transformer trait
ToolInterceptor
Tool call interceptor trait

Functions§

apply_writes
Apply writes from completed tasks to the state
call_llm_streaming
Call an LLM with streaming, forwarding chunks to the event emitter.
compile_entrypoint
Compile a functional workflow entrypoint into an executable graph
compile_entrypoint_with_config
Compile a functional workflow entrypoint with task configuration
compute_next_tasks
Compute the next set of tasks to execute
execute_superstep
Execute a single superstep in parallel
generate_checkpoint_id
Generate a new time-ordered checkpoint ID using UUID v6.
generate_interrupt_id
Generate a deterministic interrupt ID from node name and index
messages_reducer
Messages reducer with append+merge+delete semantics
should_interrupt
Check if execution should interrupt based on the current state
tools_condition
Tools condition router function