hooks

command
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command hooks demonstrates the agent's interception points: a policy gate that blocks a tool (BeforeToolCall), an annotation applied to results (AfterToolCall), a model switch between turns across wire protocols (PrepareNextTurn), and a turn guard (ShouldStopAfterTurn).

It drafts and runs tools on DeepSeek (OpenAI-compatible), then answers on MiniMax (Anthropic-compatible). Set both API keys and run from the repo root:

export DEEPSEEK_API_KEY=...
export MINIMAX_CN_API_KEY=...
go run ./example/agent/hooks

Jump to

Keyboard shortcuts

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