# AI Agent Hooks > Event-driven callbacks that execute custom logic at specific points in an AI agent's lifecycle, such as before/after message processing or tool execution. Category: Architecture Source: https://chipp.ai/ai/glossary/ai-agent-hooks AI agent hooks are event-driven callbacks that allow developers to inject custom logic at specific points in an AI agent's processing pipeline. They follow the same pattern as webhooks and lifecycle hooks in software engineering, but applied to AI agent workflows. Common hook points include: pre-message (before the AI processes a user message), post-message (after the AI generates a response), pre-tool-call (before executing an external action), post-tool-call (after a tool returns results), on-error (when something goes wrong), and on-conversation-end. Hooks enable powerful customizations without modifying the core AI agent logic. For example, a pre-message hook might check for profanity or personally identifiable information (PII) before the message reaches the AI. A post-message hook might log the conversation to an external analytics system or trigger a follow-up workflow. In practice, hooks are used for: content moderation and safety filtering, conversation logging and analytics, custom authentication and authorization, data enrichment (adding context before AI processing), real-time notifications to human operators, and A/B testing different agent behaviors. Hooks can be synchronous (blocking the agent's processing until the hook completes) or asynchronous (running in the background without delaying the response). ## Related Terms - [AI Agent Webhooks](https://chipp.ai/ai/glossary/ai-agent-webhooks.md): HTTP callbacks that notify external systems when specific events occur in an AI agent's lifecycle, such as new messages, completed actions, or user sign-ups. - [AI Agents](https://chipp.ai/ai/glossary/ai-agents.md): Autonomous AI systems that can perceive their environment, make decisions, and take actions to achieve specific goals. - [Function Calling](https://chipp.ai/ai/glossary/function-calling.md): The ability of AI models to identify when a conversation requires calling an external function or API, and to generate the structured parameters needed to make that call. - [AI Orchestration](https://chipp.ai/ai/glossary/ai-orchestration.md): The coordination of multiple AI models, tools, and workflows to accomplish complex tasks that require multiple steps and capabilities. --- This term is part of the [Chipp AI Glossary](https://chipp.ai/ai/glossary), a reference of AI concepts written for builders and businesses. Build AI agents with no code at https://chipp.ai.