Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Created May 7, 2025 12:43
Show Gist options
  • Save garrytrinder/c3ea39d2672d83384f3f3e24e8ed3c09 to your computer and use it in GitHub Desktop.
Save garrytrinder/c3ea39d2672d83384f3f3e24e8ed3c09 to your computer and use it in GitHub Desktop.
Skillable embed test

Enhance your agent

Let's improve our agent.

First, let's update the name and description.

Continuing in Visual Studio Code:

  1. Open the Explorer view.

  2. In appPackage folder, open declarativeAgent.json file.

  3. Update the name property, replace line 4 with:

        "name": "GitHub Issues",
  4. Update the description property, replace line 5 with:

        "description": "Ask questions about GitHub Issues using natural language",
  5. Save the file.

Next, update the agent icons.

Continuing in Windows:

  1. Navigate to Desktop.
  2. Navigate to icons folder.
  3. Select both color.png and outline.png, copy them to your clipboard

Continuing in Visual Studio Code:

  1. Open File Explorer view from the primary sidebar.
  2. Right-click on appPackage folder, select Reveal in File Explorer.
  3. In File Explorer navigate to the appPackage folder, paste the files from your clipboard.
  4. In the dialog, select Replace the files in the destination.
  5. Close the File Explorer window.

Next, let's update the agent instructions which determine the agents behaviour and responses.

Continuing in Visual Studio Code:

  1. In appPackage folder, open instructions.txt file.

  2. Replace the contents of the file with:

    You are an agent that helps developers manage GitHub Issues by responding to questions.
    
    When you respond you should:
    
    - Include a citation.
    - If ommitted, ask the user if they want to filter by active or closed issues
    - Group issues by repository.
    
    Each issue you reference in your response should display the following information:
    
    - Title
    - Brief summary of issue
    - Author
    - Last modified
    - Assigned to (if not assigned, highlight this to get the users attention)
    
  3. Save the file.

Let's also add the CodeIntepreter capability, this will enhance our agent with the ability to write and execute Python code, which can be useful to create graphs on the fly, as an example.

Continuing in Visual Studio Code:

  1. Open the Explorer view.

  2. In appPackage folder, open declarativeAgent.json file.

  3. Add a new object to the capabilties array, replace lines 7-16 with:

        "capabilities": [        
            {            
                "name": "GraphConnectors",            
                "connections": [                
                    {                    
                        "connection_id": "@lab.LabInstance.Id"
                    }            
                ]       
            },        
            {            
                "name": "CodeInterpreter"        
            }    
        ]
  4. Save the file.

Now we are ready to test the ehanced version of your agent, first provision the changes and then test your changes in Microsoft 365 Copilot.

Continuing in Visual Studio Code:

  1. Open M365 Agents Toolkit view from the primary sidebar.
  2. In the Lifecycle section, select Provision. Wait for the process to complete.

Continuing in a web browser:

  1. Navigate to https://m365.cloud.microsoft/chat to open Microsoft 365 Copilot (if you already have the previous agent open, refresh the page to get the latest changes).
  2. On the right menu, select GitHub Issues to open the declarative agent.
  3. Enter Create a report of bugs that we need to focus on into the text box and send the prompt to the agent. Note the difference in the response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment