Package-level declarations

Types

Link copied to clipboard
interface Action<I : Any, O : Any>
Link copied to clipboard
data class Agent<I : Any, O : Any>(val platform: Platform?, val customSystemPromptBuilder: SystemPromptBuilder?, val model: Model, val task: Task, val contexts: List<Context>, val tools: Map<ToolName, Tool>, val responseParameter: Parameter? = null, val tags: List<RunTag>)
Link copied to clipboard
data class AgentRun<O : Any>(val startedAt: Instant, val finishedAt: Instant, val messages: List<Message>, val outcome: Outcome<O>, val modelRequests: List<ModelRequestInfo>, val exampleRunIds: List<RunId> = emptyList()) : Run<O>
Link copied to clipboard
interface Attachment
Link copied to clipboard
interface Context
Link copied to clipboard
data class Instruction(val text: String)
Link copied to clipboard
sealed class Run<O : Any>
Link copied to clipboard
value class RunId(val value: String)
Link copied to clipboard
value class RunTag(val value: String)
Link copied to clipboard
data class Task(val description: String, val instructions: List<Instruction>)
Link copied to clipboard
data class TokenUsage(val inputTokens: Int, val outputTokens: Int, val thinkingOutputTokens: Int, val cachedInputTokens: Int)
Link copied to clipboard
Link copied to clipboard
data class WorkflowRun<O : Any>(val startedAt: Instant, val finishedAt: Instant, val messages: List<Message>, val outcome: Outcome<O>, val modelRequests: List<ModelRequestInfo>, val agentRuns: List<AgentRun<*>>) : Run<O>

Functions

Link copied to clipboard
Link copied to clipboard
inline suspend fun <I : Any, O : Any> executeAction(action: Action<I, O>): Pair<State, Outcome<O>>
Link copied to clipboard
inline suspend fun <I : Any, O : Any> executeToolCalls(agent: Agent<I, O>, toolCalls: List<ToolCall>): List<ToolExecutionResult>
Link copied to clipboard
fun <O : Any> Run<O>.inputTokens(): Int
Link copied to clipboard
Link copied to clipboard
fun <O : Any> Run<O>.outputTokens(): Int
Link copied to clipboard
inline suspend fun <I : Any, O : Any> Agent<I, O>.start(vararg attachments: Attachment): AgentRun<O>
inline suspend fun <I : Any, O : Any> Agent<I, O>.start(input: I? = null, vararg attachments: Attachment): AgentRun<O>
Link copied to clipboard
Link copied to clipboard