docs/en/documentation/configuration/pre-post-processing/_index.md
Pre- and post- processing allow developers to intercept and modify interactions between the agent and its tools or the user.
{{< notice note >}}
These capabilities are typically features of orchestration frameworks (like LangChain, LangGraph, or Agent Builder) rather than the Toolbox SDK itself. However, Toolbox tools are designed to fully leverage these framework capabilities to support robust, secure, and compliant agent architectures.
{{< /notice >}}
Pre-processing occurs before a tool is executed or an agent processes a message. Key types include:
Post-processing occurs after a tool has executed or the model has generated a response. Key types include:
While processing logic can be applied at various levels (Agent, Model, Tool), this guide primarily focuses on Tool Level processing, which is most relevant for granular control over tool execution.
Wraps individual tool executions. This is best for logic specific to a single tool or a set of tools.
It is helpful to understand how tool-level processing differs from other scopes:
logger.info("ACTION_SUCCESS: <id>")).Error: Database timeout, please try again).