Skip to content

Issue with using AIAgent class and agents in the new Microsoft Foundry #2878

@michelschep

Description

@michelschep

When using an agent in the "old" Foundry I can use the following instructions to chat:

PersistentAgentsClient persistentClient = new("https://xyz.services.ai.azure.com/api/projects/my-project",
        new AzureCliCredential());
IChatClient chatClient = persistentClient.AsIChatClient("asst_my-agent-id");
    
AIAgent agent = new ChatClientAgent(
        chatClient,
        instructions: "You are a helpful AI assistant.",
        name: "MyLeetAgent");

var result = await agent.RunAsync("Can you please help me?");
Console.WriteLine(result.Text); 

However when I try to do the same with agents created in the new Foundry MAF is complaining about the ID.
It expects ids to start with "asst_"

To be able to use MAF agents I cannot migrate my agents to the new Foundry.
Somebody knows when it is possible to create an AIAgent with a new Foundry agent instance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions