Skip to main content
Wiring your own loop gives you control. Sometimes you would rather hand over a task and get the finished edits back. revise_run_agent delegates to Revise’s native multi-turn agent — the same loop that runs in the Revise product — which plans, reads, and edits until the task is done.

Configure a backend

Per-document configuration overrides the editor-wide default:
The agent backend is the one network dependency in the SDK, and it is entirely yours. The wire protocol is a small HTTP/SSE contract implemented by the public Go package agentcore, so you can run it yourself rather than calling Revise.

Running a task

It is also callable as a tool, so a supervising model can delegate to it the same way it calls anything else:

Streaming, steering, cancelling

steer() injects guidance into a run already in flight rather than queueing a new turn — the difference between correcting the model mid-task and waiting for it to finish doing the wrong thing. The same events are available as a component callback:

Custom transport

To route turns through your own infrastructure — your gateway, your logging, your model — supply a transport instead of a URL:
The editor keeps its tool runtime, tracked changes, and review behaviour; only the model call is yours.

Suggestions by default

Delegated runs respect the document mode: in suggesting, everything the agent does arrives as tracked changes for a human to accept or reject. Pass directMode in the run options to apply edits outright, and every nested tool call in that run inherits it.