Skip to main content

Parameters

Running a pre-hook is handled automatically during the Agent or Team run. These are the parameters that will be injected:
ParameterTypeDefaultDescription
agentAgentRequiredThe Agent that is running the pre-hook. Only present in Agent runs.
teamTeamRequiredThe Team that is running the pre-hook. Only present in Team runs.
run_inputRunInputRequiredThe input provided to the Agent or Team when invoking the run.
sessionAgentSessionRequiredThe AgentSession or TeamSession object representing the current session.
session_stateOptional[Dict[str, Any]]NoneThe session state of the current session.
dependenciesOptional[Dict[str, Any]]NoneThe dependencies of the current run.
metadataOptional[Dict[str, Any]]NoneThe metadata of the current run.
user_idOptional[str]NoneThe contextual user ID, if any.
debug_modeOptional[bool]NoneWhether the debug mode is enabled.