Post-hooks
Parameters automatically injected into post-hook functions during an Agent or Team run.
Parameters
Running a post-hook is handled automatically during the Agent or Team run. These are the parameters that will be injected. A hook receives only the parameters its signature declares:
| Parameter | Type | Default | Description |
|---|---|---|---|
agent | Agent | Required | The Agent that is running the post-hook. Only present in Agent runs. |
team | Team | Required | The Team that is running the post-hook. Only present in Team runs. |
run_output | RunOutput or TeamRunOutput | Required | The output of the current Agent or Team run. |
run_context | RunContext | Required | The context of the current run, carrying session_state, dependencies, metadata, and other run-scoped data. |
session | AgentSession or TeamSession | Required | The AgentSession or TeamSession object representing the current session. |
metadata | Optional[Dict[str, Any]] | None | The metadata of the current run. |
user_id | Optional[str] | None | The contextual user ID, if any. |
debug_mode | bool | Resolved entity setting | Per-run override when supplied; otherwise the Agent or Team debug_mode setting (False by default). |