The API for Agent v2 has two options:
- Provide an
agent_version and use that
- Have a new version of the agent created each time it is run
https://github.com/microsoft/agent-framework/blob/feature-python-foundry-agents/python/packages/azure-ai/agent_framework_azure_ai/_client.py#L192
The second option takes about 2-3 seconds to create a new agent version and after running the agent tens/hundreds of times you would have hundreds of identical versions.
The alternative requires setting a version (e.g. 1) and that requires the agent to have existed before hand.
Neither are ideal. There should be a declarative, idempotent API which doesn't create a new agent version each time.
Also, the agent_version is typed as a string, but it is a number.