SkillToolset

class SkillToolset @ExperimentalEnvironmentApi constructor(source: SkillSource, environment: Environment?, scriptTimeout: Duration = DEFAULT_SCRIPT_TIMEOUT) : Toolset

Toolset exposing the skills a SkillSource provides. When environment is set, it also exposes run_skill_script, which copies the skill into skills/<skill_name>/ in the environment and runs the model's command there.

Parameters

source

Where skills and their resources are read from.

environment

Environment used to execute skill scripts.

scriptTimeout

Maximum execution time for a single skill script, 300 seconds by default. Must be positive.

Constructors

Link copied to clipboard
constructor(source: SkillSource, environment: Environment?, scriptTimeout: Duration = DEFAULT_SCRIPT_TIMEOUT)
constructor(source: SkillSource)

Creates a toolset that reads skills from source but cannot execute their scripts.

Types

Link copied to clipboard

Fluent builder for SkillToolset, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()

Closes the environment, if one was supplied. Environment.close is idempotent.

Link copied to clipboard
open suspend override fun getTools(readonlyContext: ReadonlyContext? = null): List<BaseTool>

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.