Package-level declarations

Types

Link copied to clipboard
data class Attempt<RESULT : Any, FEEDBACK : Feedback>(val result: RESULT, val feedback: FEEDBACK)
Link copied to clipboard
data class AttemptHistory<RESULT : Any, FEEDBACK : Feedback>(_attempts: MutableList<Attempt<RESULT, FEEDBACK>> = mutableListOf(), lastResult: RESULT? = null, val timestamp: Instant = Instant.now())

Mutable object. We only bind this once

Link copied to clipboard
interface Feedback
Link copied to clipboard
data class RepeatUntil(val maxIterations: Int = 3)

Primitive for building repeat until workflows.

Link copied to clipboard
data class RepeatUntilAcceptable(val maxIterations: Int = 3, val scoreThreshold: <Error class: unknown class> = 0.9)

Primitive for building repeat until acceptable workflows. See https://www.anthropic.com/engineering/building-effective-agents This is the Evaluator Optimizer pattern

Link copied to clipboard
data class RepeatUntilAcceptableBuilder<RESULT : Any, FEEDBACK : Feedback>(resultClass: Class<RESULT>, feedbackClass: Class<FEEDBACK> = Feedback::class.java as Class<FEEDBACK>, maxIterations: Int = DEFAULT_MAX_ITERATIONS, scoreThreshold: Double = DEFAULT_SCORE_THRESHOLD)

Java friendly builder for RepeatUntil workflow.

Link copied to clipboard
data class RepeatUntilBuilder<RESULT : Any>(resultClass: Class<RESULT>, inputClasses: List<Class<out Any>> = emptyList(), maxIterations: Int = DEFAULT_MAX_ITERATIONS) : WorkFlowBuilderWithInput

Java friendly builder for RepeatUntil workflow.

Link copied to clipboard
data class ResultHistory<RESULT : Any>(_results: MutableList<RESULT> = mutableListOf(), val timestamp: Instant = Instant.now())

Mutable object. We only bind this once

Link copied to clipboard
data class TextFeedback(val score: <Error class: unknown class>, val feedback: String) : Feedback