Skip to main content

Notifications

Community site session details

Community site session details

Session Id : cefJb1rZWXDJb1kTIRRnFs
Copilot Studio - Calling Actions from Copilot S...
Unanswered

Sample Code for integrating Azure Bot Framework based Skill bot with Co-Pilot Studio - with support for Proactive Messaging

Like (0) ShareShare
ReportReport
Posted on 30 Jan 2024 07:36:56 by

We have an existing Bot Framework Based bot that can act as a skill bot to other  Bot Framework based Consumer/Parent bots where the end user is on Teams.  The nature of the skill bot is that in response to a message from the user, the bot will generate one or more messages over the next  several minutes.    In other words, it is not a simple request/response type of getWeather bot.   The skill bot is doing some automation, and the every few seconds will send the update of progress or may ask the user to make another choice.  All this works today ( End user on Teams <-> Skill Consumer Bot <-> Our Skill Bot )

 

Now we wish to have a Co-Pilot Studio Bot  invoke our skill bot.

 

This is what we have been able to gather so far by watching the incoming messages from Co Pilot Studio parent

1.  The built it co-pilot studio chat widget presents itself with a service url of direcline.botframework.co and channel id of pva-studio . An AAD ID for the end user is made available

2. If we attach a Teams channel to the Co-pilot studio, the incoming user messages resemble more of the tradition scenario presented in the preamble above.   We are able to send proactive messages back to the end user on Teams from our skill bot.

However the same fails for scenario 1 above and 3 below.

 

3. If we attach a custom web site with an embedded web chat to the co-pilot studio as a channel, the resulting message format changes as well.  Here the messages present themselves with service url of directline but the channelid is now "directline"  We are not able to respond out of box with the existing skill bot at all.   In this case, there is no AAD ID presented for the end user as well.

 

With that background:

 

Is there sample code available to extend a skill bot built with the Azure Bot Framework to handle scenarios 1 and 3 ?

 

For purpose of clarification:
1. We are not trying to send a proactive message from the copilot studio bot to the end user, but from our skill bot  to the end user (via the co pilot studio bot)
2. We are not trying to use the co-pilot studio bot as a skill bot - we are doing the reverse.

 

 

 

Categories:
  • cloudatica Profile Picture
    42 on 09 Jun 2024 at 20:47:25
    Sample Code for integrating Azure Bot Framework based Skill bot with Co-Pilot Studio - with support for Proactive Messaging
    You may want to check out this article
    Also available as a video tutorial
  • HenryJammes Profile Picture
    on 30 Jan 2024 at 10:17:36
    Re: Sample Code for integrating Azure Bot Framework based Skill bot with Co-Pilot Studio - with support for Proactive Messaging

    Hi @ESGAUR2023,

     

    Not sure I fully follow or understand the issue, but using Bot Framework skills in Copilot Studio is documented here: Use Microsoft Bot Framework skills - Microsoft Copilot Studio | Microsoft Learn.

     

    When deploying to a website or custom app, the channel is Direct Line. When deploying to Teams, it is a different one. That said, I would expect the messages sent by your skill to relayed and available in the Teams channel.

     

    I guess the skill can only send messages when it's invoked and can't proactively start or send messages if it hasn't been called as part of your Copilot Studio bot logic. In Copilot Studio, proactive messages are sent using that approach, but this is for Teams: Notify bot users in Teams with proactive messages - Microsoft Copilot Studio | Microsoft Learn.

     

    If the skill was invoked, is there any chance it can retain the conversation id and Direct Line token in order to send events to the Copilot Studio bot? That way it may be able to proactively invoke itself, for e.g. with Event Trigger.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - Calling Actions from Copilot Studio

#1
Ekta Gupta Profile Picture

Ekta Gupta 4

#2
stampcoin Profile Picture

stampcoin 2

Overall leaderboard

Featured topics

Loading started