Build Pega Applications with GitHub Copilot CLI, Pega Infinity AI Plugin & MCP — Branch-Based Agentic Authoring

To work on this experiment, we need the Github Copilot CLI, Pega Infinity Instance, and Pega Infinity AI Plugins (https://github.com/pegasystems/infinity-ai-plugins) . In my case, I have used the Pega Infinity V26.1 Community Edition and here is the Github repository to upload it in the Github Copilot plugin marketplace. For this entire exercise to work well, we need Java 17 or above. 















Windows Command Prompt (Agent-Driven Terminal): Represents the Github Copilot CLI. It shows the active terminal execution where commands like pega-setup, list-skills, list-available-applications etc.

MCP (Model Context Protocol) Orchestrator: Acts as the bridge and mediator between the AI terminal environment (GitHub Copilot) and the Pega platform. It translates natural language directives and agent commands into structured operations and API calls to manage application configurations. Here the name of the MCP server is pega--infinity-authoring

Workflow Directives: Represents the flow of data and instructions moving from the command-line interface, through the MCP orchestrator, into the target Pega application environment.

Pega Application Artifacts (Right Side Graph):

  • Generated Properties (Agent-Configured): Includes individual data structure components such as Property: CustomerInfo and Property: CustomerGroup

  • Rules & Data (Agent-Constructed): Visualizes how individual data nodes and logic activities are connected into a dependency graph.

Final Validation Gate: Highlights the human-in-the-loop requirement at the bottom, ensuring that all agent-generated code, rules, and configurations must be inspected and approved by a developer before final deployment.

The below 5 simple steps are good to go and complete this exercise.

Step 1:

Powershell commands :

  • To install Github copilot CLI: winget install --id GitHub.cli
  • Authenticate your local machine terminal with your GitHub account: gh auth login
  • Check Java version (17 or above) to confirm: java -version
  • To add the infinity-ai-plugins from Github to Copilot plugin marketplace: gh copilot plugin marketplace add https://github.com/pegasystems/infinity-ai-plugins.git
  • Run this command to update the installed plugin: gh copilot plugin install pega-infinity-authoring@Pega
Quit and reopen Copilot CLI afterwards

Step 2:
Run this command Copilot from the Command Line: gh copilot and you will see this screen to run the next set of commands to connect to Pega Infinity Instance

Step 3:
Ask the assistant to run pega-setup. Pls make sure that your Pega Infinity instance must be up & running. Then only the sys allows us in a browser session to login into the Pega instance with the help of SSO login or basic login credentials.

The skill:
  1. checks whether the plugin runtime is available and whether a remote Pega Infinity connection is configured
  2. guides the user through setting up Pega Infinity base URL, optional OAuth client ID, and write-access
  3. verifies the connection after configuration
When setting pega_base_url, use the environment root URL only. Do not include /prweb or any other path segment.

Here is the sample configuration JSON file must be in the path: C:\Users\Admin\.infinity-rules-mcp used at my end. Without this configuration file, we can't execute pega-setup command from Copilot CLI.

config.json file:

{
  "pega_base_url": "https://communityedition.pegace.net",
  "pega_oauth_client_id": "34233104330833666523",
  "pega_infinity_version": "26-1"
}








Note: Use Ctrl+l command to clear the Copilot termial

Step 4:
After successful connection with Pega instance, we can start building the code from the CLI by using the prompt given below.

Use this prompt: list-available-applications from the CLI to get all the applications are associated to your Operator id:

Select the application and case type where you want to create a simple property.


Here is the DemoCopilotProperty was asked by me to create it in Pega Instance and is a String/Text property.
Step 5:

Open the Pega instance and check the application's branch created by Copilot with the above property to validate before merging it to the appropriate Ruleset & version.




Conclusion:

This exercise absolutely falls under the Pega Agent Plugin / agentic development concept.
Pega itself now describes this broader capability as using AI coding agents to build applications through MCP, with Infinity 26 expanding the experience through Infinity Studio and design/runtime MCP.






Popular posts from this blog

Connecting Claude to Pega Infinity 25.1.3 via MCP — Step-by-Step

itextpdf API to generate PDF doc from an image file using Pega PE

Understanding of Hugging Face platform for AI/ML platform