fsm_transition
Advance a finite state machine to a new state and record the transition on the blackboard. Ensures state updates are tracked with agent attribution and optional metadata.
Instructions
Advance a named FSM (Finite State Machine) to a new state and record the transition on the blackboard. Transitions are irreversible via this tool — new_state is written directly without validating against a predefined state graph, so the caller must ensure the transition is valid. Returns {ok:true, fsmId, transition:{from, to}, blackboardWritten:true} on success. Returns {ok:false, error:"..."} if fsm_id, new_state, or agent_id is missing, or if metadata_json is not valid JSON. Avoid concurrent transitions to the same FSM from multiple agents; call orchestrator_info first to read the current FSM state before transitioning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fsm_id | Yes | FSM identifier (e.g. "order_pipeline", "code_review_workflow") | |
| new_state | Yes | The state to transition to | |
| metadata_json | No | Optional JSON metadata to attach to the transition | |
| agent_id | Yes | Agent performing the transition (for audit) |