Forum Discussion

hadar123's avatar
hadar123
Icon for Microsoft rankMicrosoft
Feb 11, 2026

Is there a way to connect 2 Ai foundry to the same cosmos containers?

I defined Azure AI Foundry Connection for Azure Cosmos DB and BYO Thread Storage in Azure AI Agent Service by using these instructions:

Integration with Azure AI Agent Service - Azure Cosmos DB for NoSQL | Microsoft Learn

I see that it created 3 containers under the cosmos I provided:

<guid>-agent-entity-store

v-system-thread-message-store

<guid>-thread-message-store

 

Now I created another AI foundry and added a connection for the same AI foundry, and it created 3 different containers under the same DB.

Is there a way that they'll use the same exact containers? I want to use multiple AI foundries, and they will use the same Cosmos containers to manage the data.

 

1 Reply

  • Not through the supported BYO Thread Storage configuration. The Cosmos account can be shared, but the Agent Service storage layout is project-scoped. Each Foundry project’s capability host provisions its own three service-managed containers, and the generated identifiers and container names are not an exposed setting. That isolation prevents agent/thread ID collisions and cross-project access.

     

    If both agents must see the same Agent Service threads, place them in the same Foundry project; agents within one project share its thread, file, and vector-store resources. If the projects must remain separate, keep the service-managed containers separate and create your own application-owned Cosmos container for shared business state or history, then supply the required context to each agent. Avoid reading or writing the Agent Service containers directly because their schema and lifecycle are service-managed.

     

    Also plan throughput per project: standard setup requires three containers at 1,000 RU/s each, so two projects need at least 6,000 RU/s total even when they use the same Cosmos account.