Skip to content

Commit 7517924

Browse files
DeanChensjcopybara-github
authored andcommitted
chore: Update human_tool_confirmation agent to use resumability feature
PiperOrigin-RevId: 816793131
1 parent 03f051d commit 7517924

File tree

1 file changed

+11
-0
lines changed
  • contributing/samples/human_tool_confirmation

1 file changed

+11
-0
lines changed

contributing/samples/human_tool_confirmation/agent.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# limitations under the License.
1414

1515
from google.adk import Agent
16+
from google.adk.apps import App
17+
from google.adk.apps import ResumabilityConfig
1618
from google.adk.tools.function_tool import FunctionTool
1719
from google.adk.tools.tool_confirmation import ToolConfirmation
1820
from google.adk.tools.tool_context import ToolContext
@@ -88,3 +90,12 @@ def request_time_off(days: int, tool_context: ToolContext):
8890
],
8991
generate_content_config=types.GenerateContentConfig(temperature=0.1),
9092
)
93+
94+
app = App(
95+
name='human_tool_confirmation',
96+
root_agent=root_agent,
97+
# Set the resumability config to enable resumability.
98+
resumability_config=ResumabilityConfig(
99+
is_resumable=True,
100+
),
101+
)

0 commit comments

Comments
 (0)