Skip to content

Commit ce3d50d

Browse files
fix(hooks): clarify that hooks is accessible through agent object (#203)
1 parent b332a72 commit ce3d50d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/user-guide/concepts/agents/hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ agent = Agent()
2929
def my_callback(event: BeforeInvocationEvent) -> None:
3030
print("Custom callback triggered")
3131

32-
hooks.add_callback(BeforeInvocationEvent, my_callback)
32+
agent.hooks.add_callback(BeforeInvocationEvent, my_callback)
3333
```
3434

3535
### Creating a Hook Provider

0 commit comments

Comments
 (0)