Skip to content

Python: Add Handoff + tool approval + checkpointing sample#2346

Merged
moonbox3 merged 8 commits intomicrosoft:mainfrom
moonbox3:handoff-with-checkpoint
Nov 21, 2025
Merged

Python: Add Handoff + tool approval + checkpointing sample#2346
moonbox3 merged 8 commits intomicrosoft:mainfrom
moonbox3:handoff-with-checkpoint

Conversation

@moonbox3
Copy link
Contributor

Motivation and Context

Adding a sample showing how to configure required tool approvals as part of the handoff flow, with checkpointing and resumption after human input.

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@moonbox3 moonbox3 self-assigned this Nov 20, 2025
Copilot AI review requested due to automatic review settings November 20, 2025 10:54
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation python labels Nov 20, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive Python sample demonstrating how to configure required tool approvals within a handoff workflow, with checkpointing and resumption capabilities after human input. The sample shows the two-step pattern for resuming workflows that have both user input requests and tool approval requests.

  • Implements a customer service scenario with triage, refund, and order tracking agents
  • Demonstrates checkpoint-based pause/resume with tool approvals requiring human decisions
  • Shows how to handle both HandoffUserInputRequest and FunctionApprovalRequestContent in the same workflow

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
python/samples/getting_started/workflows/checkpoint/handoff_with_tool_approval_checkpoint_resume.py New comprehensive sample showing handoff workflow with tool approval and checkpoint resume functionality
python/samples/getting_started/workflows/README.md Added entry to checkpoint samples table referencing the new sample

…th_tool_approval_checkpoint_resume.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@moonbox3 moonbox3 enabled auto-merge November 20, 2025 22:54
@moonbox3 moonbox3 disabled auto-merge November 21, 2025 04:13
@moonbox3 moonbox3 merged commit 0781d4b into microsoft:main Nov 21, 2025
23 of 25 checks passed
arisng pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
…#2346)

* Handoff sample

* handoff with tool approval

* add Hanoff sample with tool approval and checkpointing

* Add to README

* Remove unnecessary files

* Update python/samples/getting_started/workflows/checkpoint/handoff_with_tool_approval_checkpoint_resume.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix comment

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants