-
Notifications
You must be signed in to change notification settings - Fork 340
Agents - Integrate support to AI Evaluation Tool #6859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nikolakukrika
merged 18 commits into
main
from
features/IntegrateAgentTestsInAITestToolkit
Feb 27, 2026
+914
−20
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6bae233
First implementation
nikolakukrika 8d7dc56
Implementing the copilot credits, agent tasks and fixing libraries
nikolakukrika de61e6c
Slight refactoring
nikolakukrika ee9ba0b
Code review feedback and AL cop
nikolakukrika 46176ad
Merge branch 'main' of https://github.com/microsoft/BCApps into featu…
nikolakukrika a59c056
Moving Agent User ID to the AI Evals Tool
nikolakukrika a5cd9d7
Extracting the agent functionality to page extensions
nikolakukrika 6260cb9
Small refactoring
nikolakukrika 18cabdb
Refactoring
nikolakukrika deaa57e
Removing the dynamic visibility and a fix on typing the agent
nikolakukrika bfdf7f8
Adding count for tasks on the history page
nikolakukrika 74e88aa
Polishing code
nikolakukrika a35be3f
Polishing code
nikolakukrika d880459
Polishing code
nikolakukrika acea678
Polishing code
nikolakukrika 69250bf
Code review feedback
nikolakukrika dc2f4a0
Fixing typo
nikolakukrika 05da8d3
Fixing feedback
nikolakukrika File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/Tools/AI Test Toolkit/src/Agent/AgentLogEntries.PageExt.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| // ------------------------------------------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
| // ------------------------------------------------------------------------------------------------ | ||
|
|
||
| namespace System.TestTools.AITestToolkit; | ||
|
|
||
| pageextension 149030 "Agent Log Entries" extends "AIT Log Entries" | ||
| { | ||
| layout | ||
| { | ||
| addafter("Tokens Consumed") | ||
| { | ||
| field("Copilot Credits"; CopilotCredits) | ||
| { | ||
| ApplicationArea = All; | ||
| AutoFormatType = 0; | ||
| Caption = 'Copilot credits'; | ||
| ToolTip = 'Specifies the total Copilot Credits consumed by the Agent Tasks for this log entry.'; | ||
| Editable = false; | ||
| } | ||
| field("Agent Task IDs"; AgentTaskIDs) | ||
| { | ||
| ApplicationArea = All; | ||
| Caption = 'Agent tasks'; | ||
| ToolTip = 'Specifies the comma-separated list of Agent Task IDs related to this log entry.'; | ||
| Editable = false; | ||
|
|
||
| trigger OnDrillDown() | ||
| var | ||
| AgentTestContextImpl: Codeunit "Agent Test Context Impl."; | ||
| begin | ||
| AgentTestContextImpl.OpenAgentTaskList(AgentTaskIDs); | ||
| end; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| trigger OnAfterGetRecord() | ||
| begin | ||
| UpdateAgentTaskMetrics(); | ||
| end; | ||
|
|
||
| local procedure UpdateAgentTaskMetrics() | ||
| begin | ||
| CopilotCredits := AgentTestContextImpl.GetCopilotCreditsForLogEntry(Rec."Entry No."); | ||
| AgentTaskIDs := AgentTestContextImpl.GetAgentTaskIDsForLogEntry(Rec."Entry No."); | ||
| end; | ||
|
|
||
| var | ||
| AgentTestContextImpl: Codeunit "Agent Test Context Impl."; | ||
| CopilotCredits: Decimal; | ||
| AgentTaskIDs: Text; | ||
| } |
90 changes: 90 additions & 0 deletions
90
src/Tools/AI Test Toolkit/src/Agent/AgentRunHistory.PageExt.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| // ------------------------------------------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
| // ------------------------------------------------------------------------------------------------ | ||
|
|
||
| namespace System.TestTools.AITestToolkit; | ||
|
|
||
| pageextension 149032 "Agent Run History" extends "AIT Run History" | ||
| { | ||
| layout | ||
| { | ||
| addafter("Tokens - By Version") | ||
| { | ||
| field("Copilot Credits - By Version"; Rec."Copilot Credits") | ||
| { | ||
| ApplicationArea = All; | ||
| AutoFormatType = 0; | ||
| Visible = ViewBy = ViewBy::Version; | ||
| Caption = 'Copilot credits'; | ||
| ToolTip = 'Specifies the total Copilot Credits consumed by the Agent Tasks in the current version.'; | ||
| Editable = false; | ||
| } | ||
| field("Agent Task Count - By Version"; AgentTaskCountByVersion) | ||
| { | ||
| ApplicationArea = All; | ||
| Visible = ViewBy = ViewBy::Version; | ||
| Caption = 'Agent tasks'; | ||
| ToolTip = 'Specifies the number of Agent Tasks related to the current version.'; | ||
| Editable = false; | ||
|
|
||
| trigger OnDrillDown() | ||
| var | ||
| AgentTestContextImpl: Codeunit "Agent Test Context Impl."; | ||
| begin | ||
| AgentTestContextImpl.OpenAgentTaskList(Rec."Agent Task IDs"); | ||
| end; | ||
| } | ||
| } | ||
| addafter("Tokens - By Tag") | ||
| { | ||
| field("Copilot Credits - By Tag"; Rec."Copilot Credits - By Tag") | ||
| { | ||
| ApplicationArea = All; | ||
| AutoFormatType = 0; | ||
| Visible = ViewBy = ViewBy::Tag; | ||
| Caption = 'Copilot credits'; | ||
| ToolTip = 'Specifies the total Copilot Credits consumed by the Agent Tasks for the tag.'; | ||
| Editable = false; | ||
| } | ||
| field("Agent Task Count - By Tag"; AgentTaskCountByTag) | ||
| { | ||
| ApplicationArea = All; | ||
| Visible = ViewBy = ViewBy::Tag; | ||
| Caption = 'Agent tasks'; | ||
| ToolTip = 'Specifies the number of Agent Tasks related to the tag.'; | ||
| Editable = false; | ||
|
|
||
| trigger OnDrillDown() | ||
| var | ||
| AgentTestContextImpl: Codeunit "Agent Test Context Impl."; | ||
| begin | ||
| AgentTestContextImpl.OpenAgentTaskList(Rec."Agent Task IDs - By Tag"); | ||
| end; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| trigger OnAfterGetRecord() | ||
| begin | ||
| UpdateAgentTaskCounts(); | ||
| end; | ||
|
|
||
| trigger OnAfterGetCurrRecord() | ||
| begin | ||
| UpdateAgentTaskCounts(); | ||
| end; | ||
|
|
||
| local procedure UpdateAgentTaskCounts() | ||
| begin | ||
| AgentTaskCountByVersion := AgentTestContextImpl.GetAgentTaskCount(Rec."Agent Task IDs"); | ||
| AgentTaskCountByTag := AgentTestContextImpl.GetAgentTaskCount(Rec."Agent Task IDs - By Tag"); | ||
| end; | ||
|
|
||
| var | ||
| AgentTestContextImpl: Codeunit "Agent Test Context Impl."; | ||
| AgentTaskCountByVersion: Integer; | ||
| AgentTaskCountByTag: Integer; | ||
|
|
||
| } | ||
|
|
43 changes: 43 additions & 0 deletions
43
src/Tools/AI Test Toolkit/src/Agent/AgentRunHistory.TableExt.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // ------------------------------------------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
| // ------------------------------------------------------------------------------------------------ | ||
|
|
||
| namespace System.TestTools.AITestToolkit; | ||
|
|
||
| tableextension 149030 "Agent Run History" extends "AIT Run History" | ||
| { | ||
| fields | ||
| { | ||
| field(15; "Copilot Credits"; Decimal) | ||
| { | ||
| DataClassification = SystemMetadata; | ||
| AutoFormatType = 0; | ||
| Caption = 'Copilot credits'; | ||
| ToolTip = 'Specifies the total Copilot Credits consumed by the Agent Tasks in the current version.'; | ||
| Editable = false; | ||
| } | ||
| field(16; "Agent Task IDs"; Text[2048]) | ||
| { | ||
| DataClassification = SystemMetadata; | ||
| Caption = 'Agent tasks'; | ||
| ToolTip = 'Specifies the comma-separated list of Agent Task IDs related to the current version.'; | ||
| Editable = false; | ||
| } | ||
| field(25; "Copilot Credits - By Tag"; Decimal) | ||
| { | ||
| DataClassification = SystemMetadata; | ||
| AutoFormatType = 0; | ||
| Caption = 'Copilot credits'; | ||
| ToolTip = 'Specifies the total Copilot Credits consumed by the Agent Tasks for the tag.'; | ||
| Editable = false; | ||
| } | ||
| field(26; "Agent Task IDs - By Tag"; Text[2048]) | ||
| { | ||
| DataClassification = SystemMetadata; | ||
| Caption = 'Agent tasks'; | ||
| ToolTip = 'Specifies the comma-separated list of Agent Task IDs related to the tag.'; | ||
| Editable = false; | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.