Hi,
I am using this new agent client for Foundry Agent V2 APIs. But the behavior was a bit different as I expected.
When I create two agents with the same instance of AzureAIClient, only one agent (ie., the first agent) was created in Foundry and versioned. The second one can be used, but not registered in Foundry (e.g., Example 01).
# Example 1
credential = AzureCliCredential()
client =AzureAIClient(async_credential=credential,
project_endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"],
model_deployment_name=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"])
writer = client.create_agent(
instructions=("You are a concise copywriter. Provide a single, punchy marketing sentence based on the prompt."),
name="writer",
)
reviewer = client.create_agent(
instructions=("You are a thoughtful reviewer. Give brief feedback on the previous assistant message."),
name="reviewer",
)
In order to register both in Foundry, I needed to create two instances of AzureAIClient (e.g., Example 01). Is this expected behavior?
# Example 2
writer = AzureAIClient(async_credential=credential,
project_endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"],
model_deployment_name=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"]).create_agent(
instructions=("You are a concise copywriter. Provide a single, punchy marketing sentence based on the prompt."),
name="writer",
)
reviewer = AzureAIClient(async_credential=credential,
project_endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"],
model_deployment_name=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"]).create_agent(
instructions=("You are a thoughtful reviewer. Give brief feedback on the previous assistant message."),
name="reviewer",
Hi,
I am using this new agent client for Foundry Agent V2 APIs. But the behavior was a bit different as I expected.
When I create two agents with the same instance of AzureAIClient, only one agent (ie., the first agent) was created in Foundry and versioned. The second one can be used, but not registered in Foundry (e.g., Example 01).
In order to register both in Foundry, I needed to create two instances of AzureAIClient (e.g., Example 01). Is this expected behavior?