Package akka.javasdk.ledger
Interface FlowRecord
- All Known Implementing Classes:
ActivityRecord,EvaluationRecord,GuardrailDecisionRecord,InteractionRecord
public sealed interface FlowRecord
permits InteractionRecord, ActivityRecord, GuardrailDecisionRecord, EvaluationRecord
A record of a flow, as
LedgerClient.getFlowRecords(String) returns it. A later SDK
version can add kinds of records.
Not for user extension.
-
Method Summary
Modifier and TypeMethodDescriptionWhen the record was recorded.static Stringtranscript(List<? extends FlowRecord> records) The records rendered as a readable transcript, for example for an LLM judge.
-
Method Details
-
timestamp
Instant timestamp()When the record was recorded. -
transcript
The records rendered as a readable transcript, for example for an LLM judge. The transcript has one block for each record, in the order of the list:- An
InteractionRecordstarts with a line that names the agent component id. When the interaction has aTaskContext, the line also names the instance id, the task name, the task id and the iteration number. Activity lines name the same instance id and task id. The lines ofInteractionRecord.transcript()follow, with one difference: theSystem:line is written the first time a system message appears for an agent component id, and again only when it differs from the last one written for that agent component id. - An
ActivityRecordis one line for each event. Each line names the agent component id and the instance id. A typed event writes its fields, andActivityRecord.Event.Otherwrites its kind. - A
GuardrailDecisionRecordis one line with the guardrail name, the agent component id, the boundary, the tool name when there is one, the decision and the explanation. When the list holds the interaction that the decision was made in, and that interaction has aTaskContext, the line also names the instance id. In a flow, the runtime records a decision while its interaction runs and the interaction when it ends, so the line comes before the block of its interaction. The line saysreport onlywhen the decision did not stop the interaction because the guardrail only reports. For aGuardrailDecisionRecord.Decision.FAILof a guardrail that does not only report, the line gives the fail mode. - An
EvaluationRecordis left out, so a judge does not read the verdicts of other evaluators.
An empty list gives an empty string.
- Parameters:
records- the records to render, such as the records of every page of a flow- Returns:
- the transcript of the records
- An
-