Declarative Agent

Declarative Agent with an API plugin that secured by Entra ID that validates its own tokens

This sample demonstrates how to build a declarative agent for Microsoft 365 Copilot that answers questions about repairs. The agent uses an API plugin to connect to an API secured with OAuth. The project contains an Azure Function that validates tokens using an open source library.

Copilot agent generating a simulated image from an XBOX game
Sample type
Declarative Agent
Last updated
Contributors
1
License
MIT

About this sample

This sample demonstrates how to build a declarative agent with no tools except what's built into Windows, MacOS, or Linux

Setup and usage

Sample documentation

Summary

This sample is a declarative agent that is a master of XBOX games. Using the live XBOX gaming web site, it is able to answer questions, make recommendations, and even create graphics in the style of XBOX games.

picture of the app recommending games picture of the app generating a simulated game image

Frameworks

No frameworks

This app requires no tooling and can be developed using utilities that are built into any modern operating system such as a text editor, a web browser, and the ability to create a Zip archive file.

Prerequisites

Version history

Version Date Author Comments
1.0 January 9, 2025 Bob German Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone or download this repository, or just download this sample
  • Navigate to the sample's appPackage folder on your computer
  • (Optional: View or modify the files in the appPackage folder)
  • Create a Zip file containing the contents of the appPackage folder at the root
  • In Microsoft Teams click "Apps" 1️⃣ , "Manage yor apps"2️⃣ , "Upload an app" 3️⃣ , and then Upload a custom app 4️⃣ . Upload the zip file and follow the prompts to use your new agent in Copilot.

Uploading a Teams application

NOTE: If you want to make a second app, just copy and edit the files however be sure to generate a new "id" value in manifest.json. This can be any Globally Unique ID (GUID) as long as it's unique; you can generate one using the online GUID generator

Features

This declarative agent includes:

  • Ability to answer questions and make recommendations about XBOX games
  • Grounded in the online XBOX game catalog at https://www.xbox.com
  • Able to generate images based on XBOX games
  • Shows how to use the WebSearch and GraphicArt capabilities for declarative agents