> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-scavio-google-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Hooks

> Examples for pre-hooks, post-hooks, tool hooks, stream hooks, and agent context management.

| Example                                                                                              | Description                                                                                                                                                |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Post Hook Output](/examples/agents/hooks/post-hook-output)                                          | Example demonstrating output validation using post-hooks with Agno Agent.                                                                                  |
| [Pre Hook Input](/examples/agents/hooks/pre-hook-input)                                              | Example demonstrating how to use a pre\_hook to perform comprehensive input validation for your Agno Agent.                                                |
| [Session State Hooks](/examples/agents/hooks/session-state-hooks)                                    | Example demonstrating how to use a pre\_hook to update the session\_state.                                                                                 |
| [Stream Hook](/examples/agents/hooks/stream-hook)                                                    | Example demonstrating sending a notification to the user after an agent generates a response.                                                              |
| [Tool Hooks](/examples/agents/hooks/tool-hooks)                                                      | Use tool\_hooks to add middleware that wraps every tool call.                                                                                              |
| [Few Shot Learning](/examples/agents/context-management/few-shot-learning)                           | Use additional\_input with an Agent.                                                                                                                       |
| [Filter Tool Calls From History](/examples/agents/context-management/filter-tool-calls-from-history) | Demonstrates `max_tool_calls_from_history` by showing that tool-call filtering only affects model input history while full run history remains in storage. |
| [Instructions With State](/examples/agents/context-management/instructions-with-state)               | Example demonstrating how to use a function as instructions for an agent.                                                                                  |
| [Instructions](/examples/agents/context-management/instructions)                                     | Add the current date and time to the agent's context with add\_datetime\_to\_context and a timezone.                                                       |
| [Introduction Message](/examples/agents/context-management/introduction-message)                     | Use the introduction parameter to set an initial greeting message.                                                                                         |
| [System Message](/examples/agents/context-management/system-message)                                 | Customize the agent's system message and role.                                                                                                             |
| [Custom Datetime Format](/examples/agents/context-management/datetime-format)                        | Customize the datetime format injected into the agent's system context.                                                                                    |
| [Message History Hooks](/examples/agents/hooks/message-history-hooks)                                | Access the current run's message history inside tool pre/post hooks via run\_context.messages.                                                             |
