External agents in Microsoft Foundry are now generally available
Microsoft Foundry now supports external agents by integrating with OpenTelemetry traces sent to Application Insights. This allows developers to monitor and improve agents built outside of Foundry without migrating them. Production traces are invaluable as they reveal issues missed by traditional testing. The process involves sending traces to Application Insights, registering the agent in Foundry, and then utilizing various tools for analysis and improvement.The first step is to configure the external agent to emit OpenTelemetry traces, ensuring they follow GenAI semantic conventions and include a gen_ai.agent.id attribute. These traces, potentially including sensitive data like prompts and responses, are sent to an Application Insights resource linked to the Foundry project. Once connected, the agent is registered in Foundry, either through the portal or the SDK, using its unique OpenTelemetry ID.After setup, Foundry's trace view allows for step-by-step inspection of individual agent runs, helping to identify the root cause of errors. For broader analysis, Agent Insights processes recent traces to group recurring issues and provide severity assessments and suggested actions. Human experts can then review these insights and provide feedback.This human feedback can be captured through Foundry's "human in the loop" feature, where reviewers annotate traces, rate outputs, and provide expected answers. These annotations can be transformed into test cases for the agent's golden dataset, which is a curated collection of trusted test scenarios. Additionally, general quality criteria can be defined in shared rubrics, ensuring consistent evaluation standards across different agent aspects.Foundry enables continuous evaluation of production traffic by sampling traces at set intervals and scoring them against defined rubrics and evaluators. This allows for tracking agent performance over time, setting alerts for performance drops, and identifying new traces for annotation. Improvements can be made by directly fixing issues identified in the traces or by using features like skill optimization, which proposes updated agent logic based on past performance. The entire process forms a loop of detection, review, testing, and continuous monitoring, enhancing agent reliability.
gen_ai.agent.idattribute. These traces, potentially including sensitive data like prompts and responses, are sent to an Application Insights resource linked to the Foundry project. Once connected, the agent is registered in Foundry, either through the portal or the SDK, using its unique OpenTelemetry ID.After setup, Foundry's trace view allows for step-by-step inspection of individual agent runs, helping to identify the root cause of errors. For broader analysis, Agent Insights processes recent traces to group recurring issues and provide severity assessments and suggested actions. Human experts can then review these insights and provide feedback.This human feedback can be captured through Foundry's "human in the loop" feature, where reviewers annotate traces, rate outputs, and provide expected answers. These annotations can be transformed into test cases for the agent's golden dataset, which is a curated collection of trusted test scenarios. Additionally, general quality criteria can be defined in shared rubrics, ensuring consistent evaluation standards across different agent aspects.Foundry enables continuous evaluation of production traffic by sampling traces at set intervals and scoring them against defined rubrics and evaluators. This allows for tracking agent performance over time, setting alerts for performance drops, and identifying new traces for annotation. Improvements can be made by directly fixing issues identified in the traces or by using features like skill optimization, which proposes updated agent logic based on past performance. The entire process forms a loop of detection, review, testing, and continuous monitoring, enhancing agent reliability.