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
Click to show internal directories.
Click to hide internal directories.