Package dev.dokimos.core.agents
Class AgentTrace.Builder
java.lang.Object
dev.dokimos.core.agents.AgentTrace.Builder
- Enclosing class:
AgentTrace
Builder for constructing agent traces.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddReasoningStep(String step) Adds a reasoning step.addToolCall(ToolCall toolCall) Adds a tool call to the trace.build()Builds the agent trace.finalResponse(String finalResponse) Sets the agent's final text response.Adds a metadata entry.Sets all metadata.reasoningSteps(List<String> steps) Sets all reasoning steps.Sets all tool calls.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
finalResponse
Sets the agent's final text response.- Parameters:
finalResponse- the final response- Returns:
- this builder
-
addToolCall
Adds a tool call to the trace.- Parameters:
toolCall- the tool call- Returns:
- this builder
-
toolCalls
Sets all tool calls.- Parameters:
toolCalls- the tool calls- Returns:
- this builder
-
addReasoningStep
Adds a reasoning step.- Parameters:
step- the reasoning step- Returns:
- this builder
-
reasoningSteps
Sets all reasoning steps.- Parameters:
steps- the reasoning steps- Returns:
- this builder
-
metadata
Adds a metadata entry.- Parameters:
key- the metadata keyvalue- the metadata value- Returns:
- this builder
-
metadata
Sets all metadata.- Parameters:
metadata- the metadata map- Returns:
- this builder
-
build
Builds the agent trace.- Returns:
- a new agent trace
-