EnvironmentToolset
class EnvironmentToolset @JvmOverloads constructor(environment: Environment, maxOutputChars: Int = DEFAULT_MAX_OUTPUT_CHARS) : Toolset
Toolset that gives an agent Execute, ReadFile, EditFile and WriteFile tools over an Environment and appends tool-selection rules to the system instruction on each LLM call. Execute and ReadFile output is truncated to maxOutputChars characters, and each Execute command times out after 30 seconds.
Parameters
environment
The environment used to execute commands and perform file I/O.
maxOutputChars
Maximum characters of stdout, stderr or file content returned to the model, 30,000 by default; must not be negative.
Functions
Link copied to clipboard
Forwards to Environment.close on every call, relying on it being idempotent.
Link copied to clipboard
Return all tools in the toolset based on the provided context.
Link copied to clipboard
open suspend override fun processLlmRequest(toolContext: ToolContext, llmRequest: LlmRequest): LlmRequest
Allows the toolset to process the LLM request.