Skip to content

Conversation

dan-niles
Copy link
Contributor

@dan-niles dan-niles commented Sep 14, 2025

Purpose

Resolves wso2/product-ballerina-integrator#1130

This PR introduces an update to the AGENT_CALL template, allowing it to include fields from the AGENT node template. This allows us to render the agent form in the frontend with agent fields like Role, Instructions, Max Iterations etc as well as agent call related fields like Query, Session ID etc. This updated node template can be used to generate source code for the default model provider + agent definition + agent call.

It also includes support for editing the agent definition in both local and module level scopes in the low code UI.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email [email protected] to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to [email protected] and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@dan-niles dan-niles marked this pull request as draft September 14, 2025 03:53
@dan-niles dan-niles changed the title Migrate the AI Agent creation form to LS [WIP] Migrate the AI Agent creation form to LS Sep 18, 2025
@dan-niles dan-niles force-pushed the refactor-agent-creation-form branch from b8b52d6 to 8a7bf71 Compare September 22, 2025 06:24
@dan-niles dan-niles changed the title [WIP] Migrate the AI Agent creation form to LS Migrate the AI Agent creation form to LS Sep 23, 2025
@dan-niles dan-niles marked this pull request as ready for review September 23, 2025 11:46
@nipunayf nipunayf requested a review from Copilot September 24, 2025 15:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the AI Agent creation form to use the Language Server (LS) approach, implementing a more comprehensive agent configuration interface with additional properties and improved property management.

  • Enhanced agent property handling with support for system prompts, tools, model providers, and advanced configuration options
  • Migrated from basic agent configuration to a full template-based approach using the language server
  • Added support for role and instructions as separate configurable properties instead of being embedded in system prompts

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test JSON files Updated test configurations to reflect the new agent property structure and template-based approach
FlowModelGeneratorService.java Added WorkspaceManager parameter to ModelGenerator constructor calls
AgentsManagerService.java Updated method call to include WorkspaceManager parameter
ParamUtils.java Added utility method for removing string delimiters from values
FlowNodeUtil.java Added comprehensive utility methods for property copying and node building
FileSystemUtils.java Added method to resolve file paths from codedata
CallBuilder.java Enhanced template data handling with additional codedata properties
AgentCallBuilder.java Major refactor to implement full agent creation workflow with property management
NodeBuilder.java Updated template data handling to properly set isNew flag from context
Core classes Updated constructors and method signatures to include WorkspaceManager parameter
Comments suppressed due to low confidence (1)

flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/model/node/AgentCallBuilder.java:1

  • The word 'mutiply' is misspelled. It should be 'multiply'.
/*

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dan-niles dan-niles requested a review from Copilot September 27, 2025 08:04
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Migrate the AI Agent creation form to LS
2 participants