feat: add ManagedAgent with evaluations support#1334
Draft
jsonbailey wants to merge 1 commit intojb/aic-1657/js-evaluations-chainfrom
Draft
feat: add ManagedAgent with evaluations support#1334jsonbailey wants to merge 1 commit intojb/aic-1657/js-evaluations-chainfrom
jsonbailey wants to merge 1 commit intojb/aic-1657/js-evaluations-chainfrom
Conversation
4494a66 to
2cad276
Compare
Introduces ManagedAgent class as the agent-mode analogue of TrackedChat. ManagedAgent.run() invokes the provider, tracks metrics, and wires judge evaluations (via aiAgentConfig.evaluator) into ManagedResult.evaluations. Adds LDAIClient.createAgent() to LDAIClientImpl and the LDAIClient interface. Exports ManagedAgent from the public API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3031d7d to
550ee5c
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
ManagedAgentclass as the agent-mode analogue ofTrackedChat(ManagedModel)ManagedAgent.run(prompt)invokes provider, tracks metrics, and wires judge evaluations intoManagedResult.evaluationsaiAgentConfig.evaluator.evaluate(prompt, output)— input is the raw prompt, output is the model responsetracker.trackJudgeResult()is called within the evaluations promise (not blocking run())createAgent()toLDAIClientinterface andLDAIClientImplManagedAgentfrom the public package APITest plan
ManagedAgent.test.tscovers: run() returns ManagedResult, provider called with user message, evaluations wired correctly, trackJudgeResult called on await🤖 Generated with Claude Code