Summary
Replace the current agent-interpreted workflow execution model with a server-driven navigation engine that enforces workflow fidelity deterministically.
Problem
Currently, agents interpret workflow schemas (.toon files) and are responsible for:
- Parsing and understanding workflow structure
- Maintaining execution state
- Enforcing checkpoints and loop semantics
- Following step sequences
This leads to workflow fidelity issues where agents:
- Batch operations instead of executing step-by-step
- Skip checkpoints or assume responses
- Optimize for speed over process compliance
- Interpret semantics inconsistently across invocations
Proposed Solution
Implement a navigation-based workflow engine where:
- Engine owns semantics - Server-side enforcement of checkpoints, loops, and transitions
- Agent traverses landscape - Agent receives valid actions, chooses from options, reports completion
- Opaque state tokens - State is encoded/compressed so agents cannot interpret or be biased by it
- Stateless engine - State passed in/out on each call; agent stores for resumption
Key API Changes
start_workflow(workflow_id) → returns position, available actions, opaque state
get_position(workflow_id, state) → returns current position
get_available_actions(workflow_id, state) → returns required/optional/blocked actions
complete_step(workflow_id, state, step_id, summary) → validates and advances state
respond_to_checkpoint(workflow_id, state, checkpoint_id, option_id) → records response, advances
Benefits
- Deterministic workflow execution
- Checkpoints cannot be skipped
- Loops cannot be batched
- State is tamper-resistant
- Resumption is reliable
Acceptance Criteria
Summary
Replace the current agent-interpreted workflow execution model with a server-driven navigation engine that enforces workflow fidelity deterministically.
Problem
Currently, agents interpret workflow schemas (.toon files) and are responsible for:
This leads to workflow fidelity issues where agents:
Proposed Solution
Implement a navigation-based workflow engine where:
Key API Changes
start_workflow(workflow_id)→ returns position, available actions, opaque stateget_position(workflow_id, state)→ returns current positionget_available_actions(workflow_id, state)→ returns required/optional/blocked actionscomplete_step(workflow_id, state, step_id, summary)→ validates and advances staterespond_to_checkpoint(workflow_id, state, checkpoint_id, option_id)→ records response, advancesBenefits
Acceptance Criteria