Skip to content

state.get

Operation: state.get
Category: state
Tags: state, storage, persistence

Read a value from persistent workspace state

Type: Native (built-in)
Timeout: 300s
Retries: 3 (ExponentialWithJitter)

NameTypeRequiredDefaultDescription
namespaceStringYesState namespace (e.g., ‘engagement_model’)
keyStringYesKey within the namespace
NameTypeDescription
valueJSONRetrieved state value (null if not found)
foundBooleanWhether the key exists
import { WorkflowBuilder } from "@fabric-platform/sdk";
const workflow = new WorkflowBuilder("my-workflow")
.node("state-get", "tool", (n) =>
n.config({
operation: "state.get",
// ... node-specific config
})
)
.build();
{
"key": "load-model",
"operation": "state.get",
"inputs": [
{ "name": "namespace", "path": "$context.state_ns" },
{ "name": "key", "path": "$context.model_key" }
],
"outputs": [
{ "name": "value", "path": "$context.saved_model" },
{ "name": "found", "path": "$context.model_exists" }
]
}

Cause: The namespace input is not bound or resolves to null

Fix: Bind namespace to a context path that contains a non-empty string

Cause: The key input is not bound or resolves to null

Fix: Bind key to a context path that contains a non-empty string

Cause: State nodes are org-scoped but organization_id was not injected into the run context

Fix: Ensure the workflow run is started via the API (which injects organization_id automatically)