Interface: IWorkflowStore
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:55
Interface implemented by persistence layers capable of storing workflow state.
Methods
appendEvents()
appendEvents(
events):Promise<void>
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:90
Appends workflow events for auditing/streaming purposes.
Parameters
events
Returns
Promise<void>
buildProgressUpdate()
buildProgressUpdate(
workflowId,sinceTimestamp?):Promise<WorkflowProgressUpdate|null>
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:100
Produces a payload representing the current workflow snapshot and optionally recent events.
Parameters
workflowId
string
sinceTimestamp?
string
Returns
Promise<WorkflowProgressUpdate | null>
createInstance()
createInstance(
data,initialTasks):Promise<WorkflowInstance>
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:59
Persists a newly created workflow instance and its initial tasks snapshot.
Parameters
data
initialTasks
Record<string, WorkflowTaskInstance>
Returns
Promise<WorkflowInstance>
getInstance()
getInstance(
workflowId):Promise<WorkflowInstance|null>
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:67
Retrieves a workflow instance by identifier.
Parameters
workflowId
string
Returns
Promise<WorkflowInstance | null>
listInstances()
listInstances(
options?):Promise<WorkflowInstance[]>
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:95
Lists workflow instances matching the supplied filters.
Parameters
options?
Returns
Promise<WorkflowInstance[]>
updateInstance()
updateInstance(
workflowId,patch):Promise<WorkflowInstance|null>
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:72
Applies a partial update to the workflow instance metadata/state.
Parameters
workflowId
string
patch
Partial<Pick<WorkflowInstance, "status" | "updatedAt" | "metadata" | "context" | "roleAssignments" | "agencyState">>
Returns
Promise<WorkflowInstance | null>
updateTasks()
updateTasks(
workflowId,updates):Promise<WorkflowInstance|null>
Defined in: packages/agentos/src/core/workflows/storage/IWorkflowStore.ts:85
Applies updates to one or more tasks within a workflow instance atomically.
Parameters
workflowId
string
updates
Returns
Promise<WorkflowInstance | null>