Skip to content

feat: Add UserFeedback tool for dynamic user interaction (#532)#1499

Open
sudabg wants to merge 3 commits into
TransformerOptimus:mainfrom
sudabg:feat/user-feedback-tool
Open

feat: Add UserFeedback tool for dynamic user interaction (#532)#1499
sudabg wants to merge 3 commits into
TransformerOptimus:mainfrom
sudabg:feat/user-feedback-tool

Conversation

@sudabg
Copy link
Copy Markdown

@sudabg sudabg commented Mar 16, 2026

Description

Implements the UserFeedback tool as described in #532, enabling agents to request user input at decision points while operating in autonomous mode.

What's Added

superagi/tools/user_feedback/:

  • tools.pyUserFeedbackTool class with schema and execution logic
  • prompts/user_feedback.txt — Prompt template for formatting feedback requests
  • __init__.py — Package init

Tool Behavior

  1. Agent identifies a need for user input (ambiguity, confirmation, missing context)
  2. Agent calls UserFeedbackTool with a question and optional context
  3. Tool formats a clear feedback request message
  4. Message is logged and returned to the agent execution feed
  5. SuperAGI framework presents it to the user and captures response

Use Cases

  • Decision points: "Should I proceed with deploying to production?"
  • Ambiguous requirements: "What time zone should I use for the deadline?"
  • Safety gates: "Confirm you want to delete these 50 files?"
  • Missing context: "What is the API endpoint URL?"

Integration

Works alongside existing modes:

  • God Mode: Agent calls tool autonomously at key milestones
  • Restricted Mode: Complements permission checks with proactive questions
  • Human-in-the-Loop: Natural pause points for user guidance

Example

# Agent execution
result = UserFeedbackTool()._execute(
    question="Which database schema should I use?",
    context="Found 3 possible schemas: users_v1, users_v2, users_v3"
)
# Returns formatted request awaiting user response

Closes #532

sudabg added 3 commits March 16, 2026 09:37
Allows agents to request user input at decision points.
Useful for ambiguous requirements, confirmation of actions,
and gathering additional context the agent cannot determine.

Addresses TransformerOptimus#532
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Addition of a "UserFeedback" tool

1 participant