8000 human-in-the-loop · Issue #378 · openai/openai-agents-python · GitHub
[go: up one dir, main page]

Skip to content 8000
human-in-the-loop #378
Closed as not planned
Closed as not planned
@jleva12

Description

@jleva12

Human Review/Approval Step for Agent Tool Execution

Problem Statement

When using AI agents with tool execution capabilities, we currently don't have a way to intercept the tool execution and have a human review before allowing the action to proceed. I need a mechanism to:

  1. Pause the agent's execution before the tool is called
  2. Display what the agent is about to do to a human user
  3. Present an approval UI for the human to accept or reject
  4. Continue execution only after approval (or abort if rejected)

Current Limitations

  • We can't rely on prompt-based solutions as they're not reliable for this use case
  • Need an architectural solution that intercepts tool execution at the system level
  • Want to avoid simply terminating the entire run - we need to gracefully pause and resume

Desired Implementation

I'm looking for a pattern/architecture that would allow:

  • Agent begins a run and determines it needs to use a tool
  • System intercepts the tool call before execution
  • Human user receives a notification/message showing the intended action
  • A UI component displays the details and provides Accept/Reject buttons
  • On Accept: tool executes and agent continues normally
  • On Reject: agent is informed the tool call was rejected and can choose alternate approaches

Questions

  • Is this possible with the current agent architecture?

  • Are there examples of similar implementations?

  • What's the recommended approach for intercepting tool calls?

  • What's the best way to design the human approval UI flow?

  • How should we handle timeouts if a human doesn't respond promptly?

  • human-in-the-loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDKstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0