Skip to content

Feat: Create Tool from UI#152

Merged
shzdb merged 6 commits into
developfrom
feature/frontend-tool
Feb 20, 2026
Merged

Feat: Create Tool from UI#152
shzdb merged 6 commits into
developfrom
feature/frontend-tool

Conversation

@shzdb
Copy link
Copy Markdown
Collaborator

@shzdb shzdb commented Feb 18, 2026

Add Tool Creation and Editing Functionality + Agent Form Enhancements

Overview

This PR introduces a comprehensive tool creation and editing system for Agent Tool Functions, featuring a JSON-driven template system, dynamic form rendering, and seamless integration with the existing tool selection workflow. Additionally, it adds new agent configuration fields for enhanced conversation management and multi-run capabilities.

Features

1. Tool Creation System

  • Template-Based Creation: Added a "Create New" tab in the Select Tools modal with 5 pre-configured tool templates:

    • Document Operation (CRUD operations on Frappe DocTypes)
    • External API Request (HTTP/GET/POST)
    • Platform Utility (Speech-to-Text, Conversation data, etc.)
    • Run AI Agent (Delegate to other agents)
    • Custom Script/Function (Python functions)
  • JSON-Driven Configuration: Tool templates and form fields are defined in toolTemplates.json, making it easy to add new templates or modify existing ones without code changes.

  • Dynamic Form Rendering: Form fields are rendered dynamically based on the selected template, with conditional field visibility based on operation type.

2. Form Features

  • Core Configuration Section: Tool name, category (Agent Tool Type), operation type, and description
  • Operation Details Section: Conditional fields based on operation type (e.g., Reference DocType for document operations, Base URL for HTTP requests)
  • Child Table Support:
    • Parameters table with card-based UI for adding/editing function parameters
    • HTTP Headers table for API-based tools
    • Both support add, edit, and delete operations

3. Tool Editing

  • Edit Icon: Added edit button to tool cards in the Tools tab
  • Reusable Form Component: ToolCreationForm component works for both create and edit modes
  • Auto Template Detection: When editing, the system automatically determines the correct template based on the tool's operation type
  • Full Field Support: All tool fields are editable, including child tables

4. Workflow Improvements

  • Auto-Add on Creation: When a tool is created, it's automatically:
    • Added to the current agent
    • Refreshed in the tools list
    • Auto-selected in the Tool Library tab
    • User is switched back to the Tool Library view to see the new tool

@shzdb shzdb marked this pull request as ready for review February 20, 2026 12:56
@shzdb shzdb merged commit ab537ee into develop Feb 20, 2026
1 of 3 checks passed
@Sanjusha-tridz Sanjusha-tridz deleted the feature/frontend-tool branch February 25, 2026 08:14
esafwan pushed a commit that referenced this pull request Mar 10, 2026
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.

2 participants