Tutorial: Add Human Approval to Your AI Agent

This tutorial walks you through adding human approval tool to an existing AI agent. We'll also run and test the AI agent with the new tool.

Before You Begin

This tutorial builds on the AI agent we created in Tutorial: Build and Run Your First AI Agent. If you don't yet have an AI agent, complete the steps in that tutorial or create your own.

Background

In the first tutorial, we created a simple AI agent for expense reimbursement. Any expense that is less than $50 USD can be automatically approved. Any expense more than $50 was rejected.

For this second tutorial, we are adding a human approval tool so that any expense above $50 USD must get a manager's approval instead of being automatically rejected.

There are two tools in this AI agent:
  • Auto Approve Expense Report
  • Request Human Approval

What do You Need?

What Do I Learn from this Tutorial?

This tutorial walks you through performing the following tasks:
  • Creating a human approval form
  • Creating a human approval workflow
  • Creating a human approval integration
  • Registering the human approval integration as a tool to use in the AI agent
  • Adding the human approval tool to the AI agent
  • Modifying the agent so the AI agent calls the human approval tool
  • Running and testing the AI agent with two tools

Next Step: Steps to Build and Run a Human Approval Tool.