Workflows API¶
Generated from the typed public surface.
tesserix_adk.workflows.Activities¶
Stability: alpha · Kind: Protocol
The two execution points. Everything else on the workflow path is arithmetic.
class Activities(Protocol) {model_call(self, request: 'ModelCallInput') -> 'ModelCallResult'; tool_call(self, request: 'ToolCallInput') -> 'ToolCallResult'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ActivityContext¶
Stability: alpha
Who an activity is acting for, carried on every input rather than looked up.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.AgentWorkflow¶
Stability: alpha
The run loop, on the workflow path.
class AgentWorkflow(object) {run(self, state: 'WorkflowState', *, context: 'ActivityContext') -> 'WorkflowState'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.Cancellation¶
Stability: alpha · Kind: Protocol
What the workflow needs of a cancellation token, satisfied by the runtime's own.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.CompensatingActivity¶
Stability: alpha
One reversal, bound to the name of the forward tool it takes back.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.Compensations¶
Stability: alpha
Which reversal belongs to which forward tool.
class Compensations(object) {irreversible(self, tool: 'str') -> 'bool'; of(self, tool: 'str') -> 'CompensatingActivity | None'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.Continuation¶
Stability: alpha
What crosses from one execution to the next, and nothing else.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ContinuationPolicy¶
Stability: alpha
When an execution has run long enough to be worth starting again.
class ContinuationPolicy(AdkModel) {due(self, journal: 'Journal', *, history_bytes: 'int' = 0) -> 'bool'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.DEFAULT_CONTINUATION¶
Stability: alpha
When an execution has run long enough to be worth starting again.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.DeterministicIds¶
Stability: alpha
Ids derived from the run and the call's position, never from randomness.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.Journal¶
Stability: alpha
What is already done, by step id.
class Journal(AdkModel) {with_model(self, step: 'str', result: 'ModelCallResult') -> 'Journal'; with_tool(self, step: 'str', result: 'ToolCallResult') -> 'Journal'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ModelCallInput¶
Stability: alpha
One model call, as the activity receives it.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ModelCallResult¶
Stability: alpha
What a model activity returned.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.PAYLOAD_LIMIT_BYTES¶
Stability: alpha
int([x]) -> integer int(x, base=10) -> integer
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.Patches¶
Stability: alpha
Which changes in the workflow's logic this history already knows about.
class Patches(AdkModel) {applied(self, name: 'str') -> 'bool'; applying(self, name: 'str') -> 'Patches'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.RULES¶
Stability: alpha
Built-in immutable sequence.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.RecordedHistory¶
Stability: alpha
A run's command sequence, committed as a fixture and replayed in CI.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ReplayFinding¶
Stability: alpha
One refusal, where it is, and what to do about it.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ReplayReport¶
Stability: alpha
What the guard found across everything it read.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ReplayRule¶
Stability: alpha
One thing that cannot happen on a workflow path.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.STREAMING_UNSUPPORTED¶
Stability: alpha
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.Saga¶
Stability: alpha
A scope whose applied work comes back off when something inside it fails.
class Saga(object) {apply(self, tool: 'str', *, key: 'str', call: 'Callable[[], Awaitable[str]]', arguments: 'Mapping[str, JsonValue] | None' = None, branch: 'str' = '', approved: 'bool' = False) -> 'str'; unwind(self, cause: 'str', *, branch: 'str | None' = None) -> 'CompensatedFailure | CompensationIncomplete'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ToolCallInput¶
Stability: alpha
One tool call, as the activity receives it.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.ToolCallResult¶
Stability: alpha
What a tool activity returned.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.WORKFLOW_MARKER¶
Stability: alpha
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.WorkflowClock¶
Stability: alpha
Time as the run recorded it, not as the worker's clock reads it now.
class WorkflowClock(AdkModel) {advanced(self, seconds: 'float') -> 'WorkflowClock'; now(self) -> 'float'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.WorkflowState¶
Stability: alpha
Everything the workflow decides, and nothing it fetches.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.activity_policy_for¶
Stability: alpha
The policy for one activity, narrowed by a declared timeout.
def activity_policy_for(activity_class: 'ActivityClass', *, timeout: 'float | None' = None, base: 'ActivityPolicy | None' = None) -> 'ActivityPolicy'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.assert_replays¶
Stability: alpha
Check that the current code issues the commands the history recorded.
Typed errors: NonDeterminismError
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.attempts_for_tool¶
Stability: alpha
How many attempts this tool gets, from what it declared about repeating it.
def attempts_for_tool(tool: 'Tool[Any, Any]', *, keyed: 'bool' = False, base: 'ActivityPolicy | None' = None) -> 'int'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.compensating_activity¶
Stability: alpha
Pair a reversal with the forward tool it undoes.
def compensating_activity(forward: 'str', *, irreversible: 'bool' = False) -> 'Callable[[Callable[[Applied], Awaitable[str]]], CompensatingActivity]'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.compensation.CompensatingActivity¶
Stability: alpha
One reversal, bound to the name of the forward tool it takes back.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.compensation.Compensations¶
Stability: alpha
Which reversal belongs to which forward tool.
class Compensations(object) {irreversible(self, tool: 'str') -> 'bool'; of(self, tool: 'str') -> 'CompensatingActivity | None'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.compensation.Saga¶
Stability: alpha
A scope whose applied work comes back off when something inside it fails.
class Saga(object) {apply(self, tool: 'str', *, key: 'str', call: 'Callable[[], Awaitable[str]]', arguments: 'Mapping[str, JsonValue] | None' = None, branch: 'str' = '', approved: 'bool' = False) -> 'str'; unwind(self, cause: 'str', *, branch: 'str | None' = None) -> 'CompensatedFailure | CompensationIncomplete'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.compensation.compensating_activity¶
Stability: alpha
Pair a reversal with the forward tool it undoes.
def compensating_activity(forward: 'str', *, irreversible: 'bool' = False) -> 'Callable[[Callable[[Applied], Awaitable[str]]], CompensatingActivity]'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.continuation.Continuation¶
Stability: alpha
What crosses from one execution to the next, and nothing else.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.continuation.ContinuationPolicy¶
Stability: alpha
When an execution has run long enough to be worth starting again.
class ContinuationPolicy(AdkModel) {due(self, journal: 'Journal', *, history_bytes: 'int' = 0) -> 'bool'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.continuation.DEFAULT_CONTINUATION¶
Stability: alpha
When an execution has run long enough to be worth starting again.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.continuation.continued¶
Stability: alpha
Build the frontier a fresh execution starts from.
def continued(state: 'WorkflowState', *, tenant: 'str', agent_name: 'str', model: 'str' = '', user: 'str' = '', scopes: 'tuple[str, ...]' = ()) -> 'Continuation'
Typed errors: ConfigurationError
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.continued¶
Stability: alpha
Build the frontier a fresh execution starts from.
def continued(state: 'WorkflowState', *, tenant: 'str', agent_name: 'str', model: 'str' = '', user: 'str' = '', scopes: 'tuple[str, ...]' = ()) -> 'Continuation'
Typed errors: ConfigurationError
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.deterministic.DeterministicIds¶
Stability: alpha
Ids derived from the run and the call's position, never from randomness.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.deterministic.Patches¶
Stability: alpha
Which changes in the workflow's logic this history already knows about.
class Patches(AdkModel) {applied(self, name: 'str') -> 'bool'; applying(self, name: 'str') -> 'Patches'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.deterministic.WorkflowClock¶
Stability: alpha
Time as the run recorded it, not as the worker's clock reads it now.
class WorkflowClock(AdkModel) {advanced(self, seconds: 'float') -> 'WorkflowClock'; now(self) -> 'float'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.deterministic.stable¶
Stability: alpha
Return a registry's entries in an order that cannot change between executions.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.Activities¶
Stability: alpha · Kind: Protocol
The two execution points. Everything else on the workflow path is arithmetic.
class Activities(Protocol) {model_call(self, request: 'ModelCallInput') -> 'ModelCallResult'; tool_call(self, request: 'ToolCallInput') -> 'ToolCallResult'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.ActivityContext¶
Stability: alpha
Who an activity is acting for, carried on every input rather than looked up.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.AgentWorkflow¶
Stability: alpha
The run loop, on the workflow path.
class AgentWorkflow(object) {run(self, state: 'WorkflowState', *, context: 'ActivityContext') -> 'WorkflowState'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.Cancellation¶
Stability: alpha · Kind: Protocol
What the workflow needs of a cancellation token, satisfied by the runtime's own.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.Journal¶
Stability: alpha
What is already done, by step id.
class Journal(AdkModel) {with_model(self, step: 'str', result: 'ModelCallResult') -> 'Journal'; with_tool(self, step: 'str', result: 'ToolCallResult') -> 'Journal'}
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.ModelCallInput¶
Stability: alpha
One model call, as the activity receives it.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.ModelCallResult¶
Stability: alpha
What a model activity returned.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.PAYLOAD_LIMIT_BYTES¶
Stability: alpha
int([x]) -> integer int(x, base=10) -> integer
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.STREAMING_UNSUPPORTED¶
Stability: alpha
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.ToolCallInput¶
Stability: alpha
One tool call, as the activity receives it.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.ToolCallResult¶
Stability: alpha
What a tool activity returned.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.durable.WorkflowState¶
Stability: alpha
Everything the workflow decides, and nothing it fetches.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.guard¶
Stability: alpha
Read every Python file under paths and report what cannot replay.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.guard_source¶
Stability: alpha
Read one module and return what cannot replay.
Typed errors: SyntaxError
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.policies.activity_policy_for¶
Stability: alpha
The policy for one activity, narrowed by a declared timeout.
def activity_policy_for(activity_class: 'ActivityClass', *, timeout: 'float | None' = None, base: 'ActivityPolicy | None' = None) -> 'ActivityPolicy'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.policies.attempts_for_tool¶
Stability: alpha
How many attempts this tool gets, from what it declared about repeating it.
def attempts_for_tool(tool: 'Tool[Any, Any]', *, keyed: 'bool' = False, base: 'ActivityPolicy | None' = None) -> 'int'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.policies.policy_for_tool¶
Stability: alpha
The policy for a tool activity, taking the tool's own declared timeout.
def policy_for_tool(tool: 'Tool[Any, Any]', *, base: 'ActivityPolicy | None' = None) -> 'ActivityPolicy'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.policy_for_tool¶
Stability: alpha
The policy for a tool activity, taking the tool's own declared timeout.
def policy_for_tool(tool: 'Tool[Any, Any]', *, base: 'ActivityPolicy | None' = None) -> 'ActivityPolicy'
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.RULES¶
Stability: alpha
Built-in immutable sequence.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.RecordedHistory¶
Stability: alpha
A run's command sequence, committed as a fixture and replayed in CI.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.ReplayFinding¶
Stability: alpha
One refusal, where it is, and what to do about it.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.ReplayReport¶
Stability: alpha
What the guard found across everything it read.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.ReplayRule¶
Stability: alpha
One thing that cannot happen on a workflow path.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.WORKFLOW_MARKER¶
Stability: alpha
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.assert_replays¶
Stability: alpha
Check that the current code issues the commands the history recorded.
Typed errors: NonDeterminismError
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.guard¶
Stability: alpha
Read every Python file under paths and report what cannot replay.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.replay.guard_source¶
Stability: alpha
Read one module and return what cannot replay.
Typed errors: SyntaxError
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].
tesserix_adk.workflows.stable¶
Stability: alpha
Return a registry's entries in an order that cannot change between executions.
Typed errors: None declared.
Runnable recipe: examples/durable_run.py — durable effects are replay-safe and idempotent. Install tesserix-adk[temporal].