-
Notifications
You must be signed in to change notification settings - Fork 1
Implement navigation-based workflow engine with server-side enforcement #34
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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 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, advances
Benefits
- Deterministic workflow execution
- Checkpoints cannot be skipped
- Loops cannot be batched
- State is tamper-resistant
- Resumption is reliable
Acceptance Criteria
- Navigation API implemented with position-aware responses
- State tokens are opaque (compressed/encoded)
- Checkpoints block progression until responded
- Loop iterations enforced sequentially
- Invalid transitions rejected with clear errors
- Existing workflows continue to function
- Documentation updated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request