state.get
Operation: state.get
Category: state
Tags: state, storage, persistence
Read a value from persistent workspace state
Runtime
Section titled “Runtime”Type: Native (built-in)
Timeout: 300s
Retries: 3 (ExponentialWithJitter)
Inputs
Section titled “Inputs”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
namespace | String | Yes | — | State namespace (e.g., ‘engagement_model’) |
key | String | Yes | — | Key within the namespace |
Outputs
Section titled “Outputs”| Name | Type | Description |
|---|---|---|
value | JSON | Retrieved state value (null if not found) |
found | Boolean | Whether 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();from fabric_platform import FabricClient
fabric = FabricClient(api_key="fab_xxx")
wf_id = fabric.upsert_workflow("my-workflow", nodes=[ { "key": "state-get", "kind": "tool", },])use fabric_sdk::FabricClient;
let client = FabricClient::new("http://localhost:3001", api_key)?;
let wf_id = client.upsert_workflow("my-workflow", serde_json::json!({ "nodes": [{ "key": "state-get", "kind": "tool" }]})).await?;curl -X POST http://localhost:3001/v1/workflow-definitions \ -H "Authorization: Bearer $FABRIC_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "my-workflow", "nodes": [{ "key": "state-get", "kind": "tool" }] }'Example
Section titled “Example”{ "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" } ]}Common Errors
Section titled “Common Errors”Missing required input: namespace
Section titled “Missing required input: namespace”Cause: The namespace input is not bound or resolves to null
Fix: Bind namespace to a context path that contains a non-empty string
Missing required input: key
Section titled “Missing required input: key”Cause: The key input is not bound or resolves to null
Fix: Bind key to a context path that contains a non-empty string
Missing organization_id in context
Section titled “Missing organization_id in context”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)