AgentRunInfoContextElement

data class AgentRunInfoContextElement(val agentId: String, val runId: String, val agentConfig: AIAgentConfigBase, val strategyName: String) : CoroutineContext.Element(source)

Represents a coroutine context element that holds execution metadata for an agent's run. This metadata includes the agent's identifier, session details, and the strategy used.

This class implements CoroutineContext.Element, allowing it to be used as a part of a coroutine's context and enabling retrieval of the run-related information within coroutine scopes.

Constructors

Link copied to clipboard
constructor(agentId: String, runId: String, agentConfig: AIAgentConfigBase, strategyName: String)

Types

Link copied to clipboard

A companion object that serves as the key for the AgentRunInfoContextElement in a CoroutineContext. This key allows retrieval of the AgentRunInfoContextElement instance stored in a coroutine's context.

Properties

Link copied to clipboard

The agent configuration property.

Link copied to clipboard

The unique identifier for the agent running in the current context.

Link copied to clipboard
open override val key: CoroutineContext.Key<*>
Link copied to clipboard

The identifier for the session associated with the current agent run.

Link copied to clipboard

The name of the strategy being executed by the agent in the current context.

Functions

Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard

Retrieves the AgentRunInfoContextElement from the current coroutine context, if present.

Link copied to clipboard

Retrieves the NodeInfoContextElement from the current coroutine context, if present.

Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext