Forum Discussion
Is there a way to connect 2 Ai foundry to the same cosmos containers?
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.