Skip to content

Commit c934153

Browse files
authored
docs: correct naming in registry.py (strands-agents#425)
1 parent c0bc2e8 commit c934153

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/strands/hooks/registry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class HookProvider(Protocol):
8484
```python
8585
class MyHookProvider(HookProvider):
8686
def register_hooks(self, registry: HookRegistry) -> None:
87-
hooks.add_callback(StartRequestEvent, self.on_request_start)
88-
hooks.add_callback(EndRequestEvent, self.on_request_end)
87+
registry.add_callback(StartRequestEvent, self.on_request_start)
88+
registry.add_callback(EndRequestEvent, self.on_request_end)
8989
9090
agent = Agent(hooks=[MyHookProvider()])
9191
```
@@ -183,7 +183,7 @@ def invoke_callbacks(self, event: TInvokeEvent) -> TInvokeEvent:
183183
"""Invoke all registered callbacks for the given event.
184184
185185
This method finds all callbacks registered for the event's type and
186-
invokes them in the appropriate order. For events with is_after_callback=True,
186+
invokes them in the appropriate order. For events with should_reverse_callbacks=True,
187187
callbacks are invoked in reverse registration order.
188188
189189
Args:
@@ -210,7 +210,7 @@ def get_callbacks_for(self, event: TEvent) -> Generator[HookCallback[TEvent], No
210210
"""Get callbacks registered for the given event in the appropriate order.
211211
212212
This method returns callbacks in registration order for normal events,
213-
or reverse registration order for events that have is_after_callback=True.
213+
or reverse registration order for events that have should_reverse_callbacks=True.
214214
This enables proper cleanup ordering for teardown events.
215215
216216
Args:

0 commit comments

Comments
 (0)