From a0df7dfa590ef5c26063d2d6f9891026e0546251 Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Mon, 9 Feb 2026 12:35:02 +0530 Subject: [PATCH] fix docs --- docs/en/samples/pre_post_processing/js.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/en/samples/pre_post_processing/js.md b/docs/en/samples/pre_post_processing/js.md index 1959e26acb..186d6bcaee 100644 --- a/docs/en/samples/pre_post_processing/js.md +++ b/docs/en/samples/pre_post_processing/js.md @@ -16,11 +16,15 @@ This guide demonstrates how to implement these patterns in your Toolbox applicat {{< tabpane persist=header >}} {{% tab header="ADK" text=true %}} -The following example demonstrates how to use the `beforeToolCallback` and `afterToolCallback` hooks in the ADK `LlmAgent` to implement pre and post processing logic. Specifically, it shows how to intercept tool calls to enforce business policies (blocking invalid actions) and enrich tool outputs (adding loyalty points) before they return to the model. +The following example demonstrates how to use the `beforeToolCallback` and `afterToolCallback` hooks in the ADK `LlmAgent` to implement pre and post processing logic. ```js {{< include "js/adk/agent.js" >}} ``` + +You can also add model-level (`beforeModelCallback`, `afterModelCallback`) and agent-level (`beforeAgentCallback`, `afterAgentCallback`) hooks to intercept messages at different stages of the execution loop. + +For more information, see the [ADK Callbacks documentation](https://google.github.io/adk-docs/callbacks/types-of-callbacks/). {{% /tab %}} {{% tab header="Langchain" text=true %}} The following example demonstrates how to use `ToolboxClient` with LangChain's middleware to implement pre and post processing for tool calls.