Edit a saved workflow
writ_update_workflowInspects and edits a saved workflow. No edits returns a compact outline with stable step ids and source hashes; verbose=true reads the full definition. section=contract lists every HTTP operator with its operands and what it does (operator selects one); section=flow + function_name lists nested node paths. function_name reads one function's source, with optional step_id and path (JSON Pointer, e.g. /config/flow or /config/script); offset/max_chars window the source. Targeted edit: function_updates=[{function_name, step_id?, expected_hash?, patch?, json_edits?, script_edits?}]. An api_call step binds config.function_name. patch merges type/config/enabled; json_edits use test/add/replace/remove with path/value to change one nested HTTP action, JSON field or array item without rewriting the program. script_edits use path/old/new and optional expected_hash; old must match exactly once. Function identity is preserved. validate_only=true previews edits and validates HTTP grammar without running JavaScript or making requests. expected_updated_at from a read prevents concurrent overwrite (409: stale read). function_updates is the targeted repair; step_updates merge indexed steps; replace_steps replaces all steps. patch edits settings and metadata; credentials stay in persona/vault. Saving runs nothing; a run on representative inputs, diagnosed by its task_id, proves the edit. regenerate_skill=true rebuilds the agent skill; patch.skill_md edits it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | JSON Pointer into the selected step, e.g. /config/flow/steps/2 or /config/script. | |
| limit | No | ||
| patch | No | Sparse settings patch. Supports every WorkflowUpdate field except credentials and captured recorded_session material, which vault/persona/session management own. human_behavior: 'on' types text using keyboard events every browser run; 'auto' does so on a bot-block retry; 'off' disables the default. | |
| offset | No | ||
| section | No | source reads a source window; flow lists nested node paths; contract lists operators and their semantics without requiring a workflow. | |
| step_id | No | Stable step id that picks one step of a multi-step function. | |
| verbose | No | Edits answer with the full workflow definition instead of the compact step outline (default false). | |
| operator | No | section=contract: one operator, with its operands, semantics and example. | |
| workflow | No | Workflow name (or workflow_id). | |
| max_chars | No | ||
| workflow_id | No | ||
| step_updates | No | ||
| function_name | No | Source of this function only. | |
| replace_steps | No | Complete recorded-step replacement; step_updates is the targeted edit. | |
| validate_only | No | Preview/validate without saving or executing. | |
| function_updates | No | ||
| regenerate_skill | No | Rebuild the workflow's agent skill (SKILL.md) from its current functions, inputs and sign-in, replacing any edited version; the answer carries the new skill_md. Runs after any patch in the same call. | |
| expected_updated_at | No | Workflow timestamp returned by inspection; checked under the row lock. |