[hooks] prefix so you can see when each hook fires without mixing into the assistant reply.
Source: examples/agent_with_hooks/
What it demonstrates
The sample uses
WithHooks with named hook groups. See Hooks for every hook point and RunMeta fields.
Run
Fromexamples/:
[hooks] lines as each hook fires.
Expected output
stdout (assistant reply):[hooks] lines, interleaved):
"My email is [email protected]..." triggers PII redaction and you’ll see redacted 1 PII items in the hook output.
Temporal
Hooks are Go functions — they run in the process that executes activities (the worker). Register the same hook groups on both the agent starter and the worker viaHookOptions() (or equivalent WithHooks calls). Group names are fingerprinted for drift detection; hook logic consistency is your responsibility.
Learn more
Hooks
Hook points and RunMeta
Observability
OTLP alongside hooks