Skip to content

This Angular-based single-page app demonstrates how to connect to a Copilot Studio agent using only HTTP calls to the Direct Line API with user authentication

License

Notifications You must be signed in to change notification settings

stephenzeng/contoso-agent-app

Repository files navigation

Contoso Agent App

This is a single page application created by Stephen Zeng with Angular standalone components. There is already the highly-customizable web-based client Bot Framework Web Chat component. However, this project aims to demostrate how to connect to a Copilot Studio agent with user authentication only through http calls to the Direct Line API, which gives you more control from your client-side app implementation.

The goal is to keep the code clear, simple and intutive with only essentials. For example, it assumes you can already have a way to obtain, with a staightforward tutorial below to help you.

Prerequisite

To run the app locally and connect it to your Copilot Studio agent, ensure the following are in place:

Launch the app

  • In your agent in Copilot Studio, go to Channels, click Direct Line Speech, copy the Token Endpoint
  • Go to agent.service.ts file, paste the connection string to the variable agentTokenUrl
  • Run from the app folder path in your terminal:
npm install
ng serve -o

Once the server is running, it should open your browser and navigate to http://localhost:4200/.

About

This Angular-based single-page app demonstrates how to connect to a Copilot Studio agent using only HTTP calls to the Direct Line API with user authentication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •