Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to have multiple agents? #412

Unanswered
NickRimmer asked this question in Q&A
Discussion options

Hi, I tried to find the answer but without success. I hope someone can answer me (;

In examples and documentation this is simple way to add agent into application - builder.AddAgent<...>() and then endpoint with app.MapPost("/api/messages", async (HttpRequest request, HttpResponse response, IAgentHttpAdapter adapter, IAgent agentApp, IServiceProvider sp, CancellationToken cancellationToken)

I would like to expose multiple endpoints for multiple Azure Bots, and when my agent answers, I want to know which Azure Bot asking by endpoint. My idea to have multiple AI models behind with own instructions in one hosted application.

Is it possible to have multiple endpoints like /api/agent1/messages and /api/agent2/messages and then answer to messages based on which endpoint used for sending messages?

Thanks in advance.

You must be logged in to vote

Replies: 2 comments

Comment options

Will it understand by injected type of agent like in this example?
https://github.com/microsoft/Agents-for-net/blob/main/src/samples/MultiAgent/Program.cs

You must be logged in to vote
0 replies
Comment options

That sample is demonstrates how to do this using a different endpoint for each Azure Bot and injected AgentApplication types. Note that TokenValidation section in appsettings, and include the AppId of each Azure Bot in the Audiences array, and the ConnectionsMap to map an Audience to a Connection.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /