approval

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

Approval Example

This example combines Agent.Stream with WithToolApprover.

The mock model requests a write tool. The run allows write permission through RunRequest.AllowedPermissions, then the host approver approves the concrete tool call before ActStage executes it.

Run it with:

go run ./examples/approval

Expected output includes:

approval=approval.requested tool=update_draft reason=<nil>
approval=approval.completed tool=update_draft reason=operator approved
tool=update_draft ref=draft:demo
stream=done llm=2 tools=1
Final answer: draft updated after approval.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL