Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions agents/agents-core/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,42 @@ val agent = AIAgent(
// Run the agent
val result = agent.execute("Calculate the square root of 16")
```


### Standard Feature Events

Features in the Koog ecosystem consume standardized Feature Events emitted by agents-core during agent execution. These events are defined in this module under the package `ai.koog.agents.core.feature.model.events`.

- Agent events:
- AgentStartingEvent
- AgentCompletedEvent
- AgentExecutionFailedEvent
- AgentClosingEvent

- Strategy events:
- GraphStrategyStartingEvent
- FunctionalStrategyStartingEvent
- StrategyCompletedEvent

- Node execution events:
- NodeExecutionStartingEvent
- NodeExecutionCompletedEvent
- NodeExecutionFailedEvent

- LLM call events:
- LLMCallStartingEvent
- LLMCallCompletedEvent

- LLM streaming events:
- LLMStreamingStartingEvent
- LLMStreamingFrameReceivedEvent
- LLMStreamingFailedEvent
- LLMStreamingCompletedEvent

- Tool execution events:
- ToolExecutionStartingEvent
- ToolValidationFailedEvent
- ToolExecutionFailedEvent
- ToolExecutionCompletedEvent
Comment on lines +87 to +117
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 It would be nice to create a diagram with entities emitting and consuming particles events
🐈📦🏴‍☠️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The list of events is pretty straightforward. They just inherited from the DefinedFeatureEvent base class. Thos are events defined inside the library. We can check with @markomitos if we need a diagram here, but from my vision, the only types are important here for an end user are final event classes produced by agent execution (listed here in the MD file).


These events are emitted by the agents-core runtime and consumed by features such as Tracing, Debugger, and EventHandler to enable logging, tracing, monitoring, and remote inspection.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public abstract class AIAgentNodeBase<TInput, TOutput> internal constructor() {
/**
* Executes the node operation using the provided execution context and input, bypassing type safety checks.
* This method internally calls the type-safe `execute` method after casting the input.
* The lifecycle hooks `onBeforeNode` and `onAfterNode` are invoked before and after the execution respectively.
*
* @param context The execution context that provides runtime information and functionality.
* @param input The input data to be processed by the node, which may be of any type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ internal class GenericAgentEnvironment(
)
}

pipeline.onToolExecutionStarting(content.runId, content.toolCallId, tool, toolArgs)
pipeline.onToolCallStarting(content.runId, content.toolCallId, tool, toolArgs)

val toolResult = try {
@Suppress("UNCHECKED_CAST")
Expand All @@ -135,7 +135,7 @@ internal class GenericAgentEnvironment(
} catch (e: Exception) {
logger.error(e) { "Tool \"${tool.name}\" failed to execute with arguments: ${content.toolArgs}" }

pipeline.onToolExecutionFailed(content.runId, content.toolCallId, tool, toolArgs, e)
pipeline.onToolCallFailed(content.runId, content.toolCallId, tool, toolArgs, e)

return toolResult(
message = "Tool \"${tool.name}\" failed to execute because of ${e.message}!",
Expand All @@ -146,7 +146,7 @@ internal class GenericAgentEnvironment(
)
}

pipeline.onToolExecutionCompleted(content.runId, content.toolCallId, tool, toolArgs, toolResult)
pipeline.onToolCallCompleted(content.runId, content.toolCallId, tool, toolArgs, toolResult)

logger.trace { "Completed execution of ${content.toolName} with result: $toolResult" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
import ai.koog.agents.core.feature.handler.streaming.LLMStreamingFrameReceivedHandler
import ai.koog.agents.core.feature.handler.streaming.LLMStreamingStartingContext
import ai.koog.agents.core.feature.handler.streaming.LLMStreamingStartingHandler
import ai.koog.agents.core.feature.handler.tool.ToolCallCompletedContext
import ai.koog.agents.core.feature.handler.tool.ToolCallEventHandler
import ai.koog.agents.core.feature.handler.tool.ToolCallFailedContext
import ai.koog.agents.core.feature.handler.tool.ToolCallFailureHandler
import ai.koog.agents.core.feature.handler.tool.ToolCallHandler
import ai.koog.agents.core.feature.handler.tool.ToolCallResultHandler
import ai.koog.agents.core.feature.handler.tool.ToolExecutionCompletedContext
import ai.koog.agents.core.feature.handler.tool.ToolExecutionEventHandler
import ai.koog.agents.core.feature.handler.tool.ToolExecutionFailedContext
import ai.koog.agents.core.feature.handler.tool.ToolExecutionStartingContext
import ai.koog.agents.core.feature.handler.tool.ToolCallStartingContext
import ai.koog.agents.core.feature.handler.tool.ToolValidationErrorHandler
import ai.koog.agents.core.feature.handler.tool.ToolValidationFailedContext
import ai.koog.agents.core.tools.Tool
Expand Down Expand Up @@ -123,7 +123,7 @@
* Map of tool execution handlers registered for different features.
* Keys are feature storage keys, values are tool execution handlers.
*/
protected val toolExecutionEventHandlers: MutableMap<AIAgentStorageKey<*>, ToolExecutionEventHandler> = mutableMapOf()
protected val toolCallEventHandlers: MutableMap<AIAgentStorageKey<*>, ToolCallEventHandler> = mutableMapOf()

/**
* Map of LLM execution handlers registered for different features.
Expand Down Expand Up @@ -367,9 +367,9 @@
* @param tool The tool that is being called
* @param toolArgs The arguments provided to the tool
*/
public suspend fun onToolExecutionStarting(runId: String, toolCallId: String?, tool: Tool<*, *>, toolArgs: Any?) {
val eventContext = ToolExecutionStartingContext(runId, toolCallId, tool, toolArgs)
toolExecutionEventHandlers.values.forEach { handler -> handler.toolCallHandler.handle(eventContext) }
public suspend fun onToolCallStarting(runId: String, toolCallId: String?, tool: Tool<*, *>, toolArgs: Any?) {
val eventContext = ToolCallStartingContext(runId, toolCallId, tool, toolArgs)
toolCallEventHandlers.values.forEach { handler -> handler.toolCallHandler.handle(eventContext) }
}

/**
Expand All @@ -389,7 +389,7 @@
) {
val eventContext =
ToolValidationFailedContext(runId, toolCallId, tool, toolArgs, error)
toolExecutionEventHandlers.values.forEach { handler -> handler.toolValidationErrorHandler.handle(eventContext) }
toolCallEventHandlers.values.forEach { handler -> handler.toolValidationErrorHandler.handle(eventContext) }
}

/**
Expand All @@ -400,15 +400,15 @@
* @param toolArgs The arguments provided to the tool
* @param throwable The exception that caused the failure
*/
public suspend fun onToolExecutionFailed(
public suspend fun onToolCallFailed(

Check warning on line 403 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `onToolCallFailed` coverage is below the threshold 50%
runId: String,
toolCallId: String?,
tool: Tool<*, *>,
toolArgs: Any?,
throwable: Throwable
) {
val eventContext = ToolExecutionFailedContext(runId, toolCallId, tool, toolArgs, throwable)
toolExecutionEventHandlers.values.forEach { handler -> handler.toolCallFailureHandler.handle(eventContext) }
val eventContext = ToolCallFailedContext(runId, toolCallId, tool, toolArgs, throwable)
toolCallEventHandlers.values.forEach { handler -> handler.toolCallFailureHandler.handle(eventContext) }
}

/**
Expand All @@ -419,15 +419,15 @@
* @param toolArgs The arguments that were provided to the tool
* @param result The result produced by the tool, or null if no result was produced
*/
public suspend fun onToolExecutionCompleted(
public suspend fun onToolCallCompleted(
runId: String,
toolCallId: String?,
tool: Tool<*, *>,
toolArgs: Any?,
result: Any?
) {
val eventContext = ToolExecutionCompletedContext(runId, toolCallId, tool, toolArgs, result)
toolExecutionEventHandlers.values.forEach { handler -> handler.toolCallResultHandler.handle(eventContext) }
val eventContext = ToolCallCompletedContext(runId, toolCallId, tool, toolArgs, result)
toolCallEventHandlers.values.forEach { handler -> handler.toolCallResultHandler.handle(eventContext) }
}

//endregion Trigger Tool Call Handlers
Expand Down Expand Up @@ -867,16 +867,16 @@
*
* Example:
* ```
* pipeline.interceptToolExecutionStarting(interceptContext) { eventContext ->
* pipeline.interceptToolCallStarting(interceptContext) { eventContext ->
* // Process or log the tool call
* }
* ```
*/
public fun <TFeature : Any> interceptToolExecutionStarting(
public fun <TFeature : Any> interceptToolCallStarting(
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ToolExecutionStartingContext) -> Unit
handle: suspend TFeature.(eventContext: ToolCallStartingContext) -> Unit
) {
val handler = toolExecutionEventHandlers.getOrPut(interceptContext.feature.key) { ToolExecutionEventHandler() }
val handler = toolCallEventHandlers.getOrPut(interceptContext.feature.key) { ToolCallEventHandler() }
handler.toolCallHandler = ToolCallHandler(
function = createConditionalHandler(interceptContext, handle)
)
Expand All @@ -899,7 +899,7 @@
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ToolValidationFailedContext) -> Unit
) {
val handler = toolExecutionEventHandlers.getOrPut(interceptContext.feature.key) { ToolExecutionEventHandler() }
val handler = toolCallEventHandlers.getOrPut(interceptContext.feature.key) { ToolCallEventHandler() }
handler.toolValidationErrorHandler = ToolValidationErrorHandler(
function = createConditionalHandler(interceptContext, handle)
)
Expand All @@ -913,16 +913,16 @@
*
* Example:
* ```
* pipeline.interceptToolExecutionFailed(interceptContext) { eventContext ->
* pipeline.interceptToolCallFailed(interceptContext) { eventContext ->
* // Handle the tool call failure here
* }
* ```
*/
public fun <TFeature : Any> interceptToolExecutionFailed(
public fun <TFeature : Any> interceptToolCallFailed(
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ToolExecutionFailedContext) -> Unit
handle: suspend TFeature.(eventContext: ToolCallFailedContext) -> Unit
) {
val handler = toolExecutionEventHandlers.getOrPut(interceptContext.feature.key) { ToolExecutionEventHandler() }
val handler = toolCallEventHandlers.getOrPut(interceptContext.feature.key) { ToolCallEventHandler() }
handler.toolCallFailureHandler = ToolCallFailureHandler(
function = createConditionalHandler(interceptContext, handle)
)
Expand All @@ -942,11 +942,11 @@
* }
* ```
*/
public fun <TFeature : Any> interceptToolExecutionCompleted(
public fun <TFeature : Any> interceptToolCallCompleted(
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ToolExecutionCompletedContext) -> Unit
handle: suspend TFeature.(eventContext: ToolCallCompletedContext) -> Unit
) {
val handler = toolExecutionEventHandlers.getOrPut(interceptContext.feature.key) { ToolExecutionEventHandler() }
val handler = toolCallEventHandlers.getOrPut(interceptContext.feature.key) { ToolCallEventHandler() }
handler.toolCallResultHandler = ToolCallResultHandler(
function = createConditionalHandler(interceptContext, handle)
)
Expand All @@ -966,7 +966,7 @@
imports = arrayOf("ai.koog.agents.core.feature.handler.agent.AgentStartingContext")
)
)
public fun <TFeature : Any> interceptBeforeAgentStarted(

Check warning on line 969 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptBeforeAgentStarted` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend (ai.koog.agents.core.feature.handler.AgentStartContext<TFeature>) -> Unit
) {
Expand All @@ -985,7 +985,7 @@
)
)
)
public fun <TFeature : Any> interceptAgentFinished(

Check warning on line 988 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptAgentFinished` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ai.koog.agents.core.feature.handler.AgentFinishedContext) -> Unit
) {
Expand All @@ -1004,7 +1004,7 @@
)
)
)
public fun <TFeature : Any> interceptAgentRunError(

Check warning on line 1007 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptAgentRunError` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(ai.koog.agents.core.feature.handler.AgentRunErrorContext) -> Unit
) {
Expand All @@ -1023,7 +1023,7 @@
)
)
)
public fun <TFeature : Any> interceptAgentBeforeClose(

Check warning on line 1026 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptAgentBeforeClose` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(ai.koog.agents.core.feature.handler.AgentBeforeCloseContext) -> Unit
) {
Expand All @@ -1042,7 +1042,7 @@
)
)
)
public fun <TFeature : Any> interceptStrategyStart(

Check warning on line 1045 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptStrategyStart` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend (ai.koog.agents.core.feature.handler.StrategyStartContext<TFeature>) -> Unit
) {
Expand All @@ -1061,7 +1061,7 @@
)
)
)
public fun <TFeature : Any> interceptStrategyFinished(

Check warning on line 1064 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptStrategyFinished` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend (ai.koog.agents.core.feature.handler.StrategyFinishedContext<TFeature>) -> Unit
) {
Expand All @@ -1080,7 +1080,7 @@
)
)
)
public fun <TFeature : Any> interceptBeforeLLMCall(

Check warning on line 1083 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptBeforeLLMCall` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ai.koog.agents.core.feature.handler.BeforeLLMCallContext) -> Unit
) {
Expand All @@ -1099,7 +1099,7 @@
)
)
)
public fun <TFeature : Any> interceptAfterLLMCall(

Check warning on line 1102 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptAfterLLMCall` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ai.koog.agents.core.feature.handler.AfterLLMCallContext) -> Unit
) {
Expand All @@ -1111,57 +1111,57 @@
* Updates the tool call handler for the given feature key with a custom handler.
*/
@Deprecated(
message = "Please use interceptToolExecutionStarting instead. This method is deprecated and will be removed in the next release.",
message = "Please use interceptToolCallStarting instead. This method is deprecated and will be removed in the next release.",
replaceWith = ReplaceWith(
expression = "interceptToolExecutionStarting(interceptContext, handle)",
expression = "interceptToolCallStarting(interceptContext, handle)",
imports = arrayOf(
"ai.koog.agents.core.feature.handler.tool.ToolExecutionStartingContext"
"ai.koog.agents.core.feature.handler.tool.ToolCallStartingContext"
)
)
)
public fun <TFeature : Any> interceptToolCall(

Check warning on line 1122 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptToolCall` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ai.koog.agents.core.feature.handler.ToolCallContext) -> Unit
) {
interceptToolExecutionStarting(interceptContext, handle)
interceptToolCallStarting(interceptContext, handle)
}

/**
* Intercepts the result of a tool call with a custom handler for a specific feature.
*/
@Deprecated(
message = "Please use interceptToolExecutionCompleted instead. This method is deprecated and will be removed in the next release.",
message = "Please use interceptToolCallCompleted instead. This method is deprecated and will be removed in the next release.",
replaceWith = ReplaceWith(
expression = "interceptToolExecutionCompleted(interceptContext, handle)",
expression = "interceptToolCallCompleted(interceptContext, handle)",
imports = arrayOf(
"ai.koog.agents.core.feature.handler.tool.ToolExecutionCompletedContext"
"ai.koog.agents.core.feature.handler.tool.ToolCallCompletedContext"
)
)
)
public fun <TFeature : Any> interceptToolCallResult(

Check warning on line 1141 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptToolCallResult` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ToolExecutionCompletedContext) -> Unit
handle: suspend TFeature.(eventContext: ToolCallCompletedContext) -> Unit
) {
interceptToolExecutionCompleted(interceptContext, handle)
interceptToolCallCompleted(interceptContext, handle)
}

/**
* Sets up an interception mechanism to handle tool call failures for a specific feature.
*/
@Deprecated(
message = "Please use interceptToolExecutionFailed instead. This method is deprecated and will be removed in the next release.",
message = "Please use interceptToolCallFailed instead. This method is deprecated and will be removed in the next release.",
replaceWith = ReplaceWith(
expression = "interceptToolExecutionFailed(interceptContext, handle)",
expression = "interceptToolCallFailed(interceptContext, handle)",
imports = arrayOf(
"ai.koog.agents.core.feature.handler.tool.ToolExecutionFailedContext"
"ai.koog.agents.core.feature.handler.tool.ToolCallFailedContext"
)
)
)
public fun <TFeature : Any> interceptToolCallFailure(

Check warning on line 1160 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptToolCallFailure` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ToolExecutionFailedContext) -> Unit
handle: suspend TFeature.(eventContext: ToolCallFailedContext) -> Unit
) {
interceptToolExecutionFailed(interceptContext, handle)
interceptToolCallFailed(interceptContext, handle)
}

/**
Expand All @@ -1176,7 +1176,7 @@
)
)
)
public fun <TFeature : Any> interceptToolValidationError(

Check warning on line 1179 in agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/AIAgentPipeline.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Check Kotlin and Java source code coverage

Method `interceptToolValidationError` coverage is below the threshold 50%
interceptContext: InterceptContext<TFeature>,
handle: suspend TFeature.(eventContext: ToolValidationFailedContext) -> Unit
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public sealed interface AgentLifecycleEventType {
/**
* Represents an event triggered when a tool is called.
*/
public object ToolExecutionStarting : AgentLifecycleEventType
public object ToolCallStarting : AgentLifecycleEventType

/**
* Represents an event triggered when a tool call fails validation.
Expand All @@ -99,12 +99,12 @@ public sealed interface AgentLifecycleEventType {
/**
* Represents an event triggered when a tool call fails.
*/
public object ToolExecutionFailed : AgentLifecycleEventType
public object ToolCallFailed : AgentLifecycleEventType

/**
* Represents an event triggered when a tool call succeeds.
*/
public object ToolExecutionCompleted : AgentLifecycleEventType
public object ToolCallCompleted : AgentLifecycleEventType

//endregion Tool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ package ai.koog.agents.core.feature.handler
* Represents the context for handling tool-specific events within the framework.
*/
@Deprecated(
message = "Use ToolExecutionEventContext instead",
message = "Use ToolCallEventContext instead",
replaceWith = ReplaceWith(
expression = "ToolExecutionEventContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolExecutionEventContext")
expression = "ToolCallEventContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolCallEventContext")
)
)
public typealias ToolEventHandlerContext = ai.koog.agents.core.feature.handler.tool.ToolExecutionEventContext
public typealias ToolEventHandlerContext = ai.koog.agents.core.feature.handler.tool.ToolCallEventContext

/**
* Represents the context for handling a tool call event.
*/
@Deprecated(
message = "Use ToolExecutionStartingContext instead",
message = "Use ToolCallStartingContext instead",
replaceWith = ReplaceWith(
expression = "ToolExecutionStartingContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolExecutionStartingContext")
expression = "ToolCallStartingContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolCallStartingContext")
)
)
public typealias ToolCallContext = ai.koog.agents.core.feature.handler.tool.ToolExecutionStartingContext
public typealias ToolCallContext = ai.koog.agents.core.feature.handler.tool.ToolCallStartingContext

/**
* Represents the context for handling validation errors that occur during the execution of a tool.
Expand All @@ -40,22 +40,22 @@ public typealias ToolValidationErrorContext = ai.koog.agents.core.feature.handle
* Represents the context provided to handle a failure during the execution of a tool.
*/
@Deprecated(
message = "Use ToolExecutionFailedContext instead",
message = "Use ToolCallFailedContext instead",
replaceWith = ReplaceWith(
expression = "ToolExecutionFailedContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolExecutionFailedContext")
expression = "ToolCallFailedContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolCallFailedContext")
)
)
public typealias ToolCallFailureContext = ai.koog.agents.core.feature.handler.tool.ToolExecutionFailedContext
public typealias ToolCallFailureContext = ai.koog.agents.core.feature.handler.tool.ToolCallFailedContext

/**
* Represents the context used when handling the result of a tool call.
*/
@Deprecated(
message = "Use ToolExecutionCompletedContext instead",
message = "Use ToolCallCompletedContext instead",
replaceWith = ReplaceWith(
expression = "ToolExecutionCompletedContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolExecutionCompletedContext")
expression = "ToolCallCompletedContext",
imports = arrayOf("ai.koog.agents.core.feature.handler.tool.ToolCallCompletedContext")
)
)
public typealias ToolCallResultContext = ai.koog.agents.core.feature.handler.tool.ToolExecutionCompletedContext
public typealias ToolCallResultContext = ai.koog.agents.core.feature.handler.tool.ToolCallCompletedContext
Loading
Loading