Skip to content

Commit 5b31e77

Browse files
committed
KG-505. Add ExperimentalAgentsApi annotation to mark Debugger feature
1 parent 003cd1f commit 5b31e77

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package ai.koog.agents.core.annotation
2+
3+
/**
4+
* Marks an API as experimental for agent-related implementations.
5+
*
6+
* APIs annotated with `ExperimentalAgentsApi` are not considered stable and may change, be removed,
7+
* or have their behavior modified in future updates. This warning is provided to
8+
* indicate that the use of such APIs requires caution and acknowledgment of potential instability.
9+
*
10+
* Note that no guarantees are made regarding backward compatibility of elements marked with this annotation.
11+
*/
12+
@RequiresOptIn("This API is experimental and is likely to change in the future.")
13+
public annotation class ExperimentalAgentsApi

agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ai.koog.agents.core.agent.context.AIAgentContext
44
import ai.koog.agents.core.agent.context.featureOrThrow
55
import ai.koog.agents.core.agent.entity.AIAgentGraphStrategy
66
import ai.koog.agents.core.agent.entity.AIAgentStorageKey
7+
import ai.koog.agents.core.annotation.ExperimentalAgentsApi
78
import ai.koog.agents.core.annotation.InternalAgentsApi
89
import ai.koog.agents.core.environment.ReceivedToolResult
910
import ai.koog.agents.core.feature.AIAgentFunctionalFeature
@@ -60,6 +61,7 @@ import kotlin.time.toDuration
6061
* @property port The port number on which the debugger server is listening for connections.
6162
* @property awaitInitialConnectionTimeout The timeout duration for the debugger server to wait for a connection.
6263
*/
64+
@ExperimentalAgentsApi
6365
public class Debugger(public val port: Int, public val awaitInitialConnectionTimeout: Duration? = null) {
6466

6567
/**
@@ -457,4 +459,5 @@ public class Debugger(public val port: Int, public val awaitInitialConnectionTim
457459
* @return The [Debugger] feature instance for this agent
458460
* @throws IllegalStateException if the Debugger feature is not installed
459461
*/
462+
@OptIn(ExperimentalAgentsApi::class)
460463
public fun AIAgentContext.debugger(): Debugger = featureOrThrow(Debugger)

agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipeline.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import ai.koog.agents.core.agent.context.AIAgentContext
66
import ai.koog.agents.core.agent.context.AIAgentGraphContextBase
77
import ai.koog.agents.core.agent.entity.AIAgentStorageKey
88
import ai.koog.agents.core.agent.entity.AIAgentStrategy
9+
import ai.koog.agents.core.annotation.ExperimentalAgentsApi
910
import ai.koog.agents.core.annotation.InternalAgentsApi
1011
import ai.koog.agents.core.environment.AIAgentEnvironment
1112
import ai.koog.agents.core.feature.AIAgentFeature
@@ -127,6 +128,7 @@ public abstract class AIAgentPipeline(public val clock: Clock) {
127128
/**
128129
* Set of system features that are always defined by the framework.
129130
*/
131+
@OptIn(ExperimentalAgentsApi::class)
130132
private val systemFeatures: Set<AIAgentStorageKey<*>> = setOf(
131133
Debugger.key
132134
)
@@ -1242,6 +1244,7 @@ public abstract class AIAgentPipeline(public val clock: Clock) {
12421244
}
12431245
}
12441246

1247+
@OptIn(ExperimentalAgentsApi::class)
12451248
private fun installSystemFeature(featureKey: AIAgentStorageKey<*>) {
12461249
logger.debug { "Installing system feature: ${featureKey.name}" }
12471250
when (featureKey) {

0 commit comments

Comments
 (0)