ContextualAgentEnvironment

Represents an AI agent environment that operates within the context of a specific agent framework.

This class acts as a decorator over an existing AIAgentEnvironment, augmenting operations with contextual processing using the provided AIAgentContext.

Parameters

environment

The underlying agent environment responsible for managing tool execution.

context

The context that augments the environment with additional behavioral and execution information.

Constructors

Link copied to clipboard
constructor(environment: AIAgentEnvironment, context: AIAgentContext)

Constructs a new instance of ContextualAgentEnvironment with a decorated environment and a contextual context.

Functions

Link copied to clipboard
open suspend override fun executeTool(toolCall: Message.Tool.Call): ReceivedToolResult

Executes a tool call and returns its result.

Link copied to clipboard

Executes a batch of tool calls within the AI agent environment and processes their results.

Link copied to clipboard
open suspend override fun reportProblem(exception: Throwable)

Reports a problem that occurred within the environment.