Skip to content

feat: Implement Tool Safety and Approval MechanismΒ #294

@Dhruv-Maradiya

Description

@Dhruv-Maradiya

To enhance user control and security, we need to implement a mechanism that allows certain tools to be marked as 'unsafe' or 'require_approval'. When such tools are invoked, users should be prompted for explicit approval and given the opportunity to review and edit tool parameters.

Objective:
Develop a system within tool_registry and composio_service to categorize tools by their safety requirements and implement a user-facing approval flow for sensitive operations.

Key Features:

  • Tool Marking: Introduce flags (e.g., unsafe: true, require_approval: true) in tool_registry to designate specific tools.
  • Approval Prompt: When an 'unsafe' or 'require_approval' tool is called, GAIA will pause execution and present a clear approval prompt to the user.
  • Parameter Review & Edit: The approval prompt will display the tool's name and all parameters with their proposed values, allowing users to review and modify them before execution.
  • Safe Mode: Implement a 'Safe Mode' setting in user preferences. When enabled, GAIA will automatically block calls to tools marked as 'unsafe' or 'require_approval' without prompting for approval.
  • Audit Logging: Log all approved and blocked tool calls for transparency and security auditing.

Benefits:

  • Enhanced Security: Prevent unintended or malicious tool executions.
  • Increased User Trust: Give users full transparency and control over GAIA's actions.
  • Customizable Safety: Allow users to tailor their safety preferences with 'Safe Mode'.
  • Compliance: Meet potential regulatory or internal security requirements.

Action Items:

  1. Modify tool_registry schema to include unsafe and require_approval flags.
  2. Update composio_service to check these flags before tool execution.
  3. Design and implement the user-facing approval UI, including parameter display and editing capabilities.
  4. Develop the 'Safe Mode' toggle and its logic for blocking tool calls.
  5. Implement logging for tool approval/denial events.
  6. Conduct thorough testing to ensure the mechanism functions as expected and does not introduce regressions.
  7. Document the new safety features for both developers and end-users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions