Skip to content

feat: add ManagedAgent with evaluations support#1334

Draft
jsonbailey wants to merge 1 commit intojb/aic-1657/js-evaluations-chainfrom
jb/aic-1657/js-agent-evaluations
Draft

feat: add ManagedAgent with evaluations support#1334
jsonbailey wants to merge 1 commit intojb/aic-1657/js-evaluations-chainfrom
jb/aic-1657/js-agent-evaluations

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

Summary

  • Introduces ManagedAgent class as the agent-mode analogue of TrackedChat (ManagedModel)
  • ManagedAgent.run(prompt) invokes provider, tracks metrics, and wires judge evaluations into ManagedResult.evaluations
  • Evaluations use aiAgentConfig.evaluator.evaluate(prompt, output) — input is the raw prompt, output is the model response
  • tracker.trackJudgeResult() is called within the evaluations promise (not blocking run())
  • Adds createAgent() to LDAIClient interface and LDAIClientImpl
  • Exports ManagedAgent from the public package API

Test plan

  • 201 tests pass
  • ManagedAgent.test.ts covers: run() returns ManagedResult, provider called with user message, evaluations wired correctly, trackJudgeResult called on await

🤖 Generated with Claude Code

@jsonbailey jsonbailey force-pushed the jb/aic-1657/js-evaluations-chain branch from 4494a66 to 2cad276 Compare April 28, 2026 23:15
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>
@jsonbailey jsonbailey force-pushed the jb/aic-1657/js-agent-evaluations branch from 3031d7d to 550ee5c Compare April 28, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant