NodeInfoContextElement

data class NodeInfoContextElement(val id: String, val parentId: String?, val name: String, val input: Any?, val inputType: KType) : CoroutineContext.Element(source)

Represents a coroutine context element that holds metadata specific to a particular node participating in the execution context of an AI agent strategy.

This class implements CoroutineContext.Element, enabling it to store and provide access to node-specific context information, such as the name of the node, within coroutine scopes.

Constructors

Link copied to clipboard
constructor(id: String, parentId: String?, name: String, input: Any?, inputType: KType)

Types

Link copied to clipboard

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

Properties

Link copied to clipboard
val id: String
Link copied to clipboard
val input: Any?

The input data provided to the node during execution.

Link copied to clipboard

The type of the input data provided to the node during execution.

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

The name of the node associated with this context element.

Link copied to clipboard

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
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext