Deployment
Temporal Worker
Run agent sessions as durable Temporal workflows.
The Temporal worker target turns sessions into durable Temporal workflows: prompts become signals, tool calls become activities, child tasks become child workflows, approvals become signal waits.
Build the worker artifact
fh build --target temporal-workerOutput:
.fabricharness/build/temporal-worker/
dist/worker.mjs
manifest.json
README.temporal-worker.mdRun the worker
You can run the prebuilt artifact:
node .fabricharness/build/temporal-worker/dist/worker.mjsOr run a worker against the live workspace (great for development):
fh temporal-worker --task-queue fabric-harness --address localhost:7233Drive an agent on the worker
fh run ask --target temporal-worker --id ask-001 --prompt "What is Temporal?"The CLI:
- Connects to Temporal,
- Starts (or resumes) the session workflow with id
ask-001, - Signals it with the prompt,
- Streams output back.
Workflow model
graph LR
A[AgentSessionWorkflow] --> M[ModelCallActivity]
A --> T[ToolExecutionActivity]
A --> S[SandboxCommandActivity]
A --> V[ResultValidationActivity]
A --> C[CompactionActivity]
A --> CT[Child Task Workflow]
CT --> M
CT --> TConfiguration
.fabricharness/config.ts:
export default {
temporal: {
address: 'localhost:7233',
taskQueue: 'fabric-harness',
namespace: 'default',
workflowIdPrefix: 'fabric',
promptWorkflowMode: 'hybrid',
apiKeyEnv: 'TEMPORAL_API_KEY', // for Temporal Cloud
tls: { /* ... */ },
},
};Environment overrides:
| Variable | Purpose |
|---|---|
FABRIC_TEMPORAL_ADDRESS | host:port |
FABRIC_TEMPORAL_TASK_QUEUE | task queue name |
FABRIC_TEMPORAL_NAMESPACE | namespace |
Temporal Cloud
Set address to your Temporal Cloud endpoint, configure mTLS or API key, and the worker connects normally:
export default {
temporal: {
address: 'my-namespace.tmprl.cloud:7233',
namespace: 'my-namespace',
apiKeyEnv: 'TEMPORAL_API_KEY',
tls: { serverName: 'my-namespace.tmprl.cloud' },
},
};Operational notes
- Workers are stateless. Run several behind your task queue for throughput.
- Approval waits are signal-driven and consume no worker time.
- Use Temporal's UI or
temporal workflow showto inspect history independently offh inspect. - Live model + Temporal tests are opt-in in CI; treat real workflow execution like any other production workload.