Skip to content

feat: ledger client for accessing interaction records - #1699

Merged
pvlugter merged 3 commits into
feature/governancefrom
pvlugter/push-tunxlrkomumw
Jul 15, 2026
Merged

pvlugter merged 3 commits into
feature/governancefrom
pvlugter/push-tunxlrkomumw

Conversation

@pvlugter

@pvlugter pvlugter commented Jul 7, 2026

Copy link
Copy Markdown
Member

Refs https://github.com/lightbend/akka-runtime/issues/5330

Builds on published runtime snapshot with changes from: https://github.com/lightbend/akka-runtime/pull/5453

The SDK side interaction record includes some helpers such as accessing particular parts of the interaction, total token usage, or creating a transcript, which is useful for passing to a judge agent.

And we can now have a more end-to-end integration test for an evaluation with an evaluator that has triggered an agent's interaction, and then fetching the interaction record using the ledger client.

@github-actions github-actions Bot added the documentation documentation related label Jul 7, 2026

@aludwiko aludwiko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good

public void accessorsFlattenTheRecord() {
var record = record(Optional.empty());

assertEquals("What is 2+2?", record.userText());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my personal preference is to use AssertJ :) teach your claude to use it :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can update this :) I just let Claude use whatever has been used in other tests. And focus on what is being tested.

* The text content of the last model response that produced any, or an empty string if the model
* produced no text (for example an interaction that only made tool calls, or that failed).
*/
public String finalAssistantText() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assistant is it a new notion? Why not Agent?

@pvlugter pvlugter Jul 9, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually thought I'd already updated this. It's the model responses, so I'm just going to update this to be response text. And instead of user messages, I'm going to update that to input, which is the general term that we've started using. And I'll fix all the terms in this file.

@pvlugter
pvlugter force-pushed the pvlugter/push-tunxlrkomumw branch from e1d6fe5 to aa675b4 Compare July 9, 2026 04:02
@pvlugter
pvlugter force-pushed the pvlugter/push-tunxlrkomumw branch from aa675b4 to 5778b4c Compare July 9, 2026 04:17
@pvlugter
pvlugter merged commit ef3b00b into feature/governance Jul 15, 2026
38 checks passed
@pvlugter
pvlugter deleted the pvlugter/push-tunxlrkomumw branch July 15, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants