SkillRuntime
autogen.beta.tools.toolkits.skills.runtime.protocol.SkillRuntime #
Bases: Protocol
Unified runtime: storage, discovery, and execution of skills.
A runtime is responsible for three concerns:
- Storage — where skills are installed (
install,remove). - Discovery — scanning for installed skills (
discover,load,invalidate). - Execution — providing a shell environment to run scripts (
shell).
:class:LocalRuntime is the default implementation.
lock_dir property #
Local directory where skills-lock.json is stored.
Always a local path — the lock file is host metadata, not runtime storage. LocalRuntime returns _install_dir. A future DockerRuntime would return a configurable local directory.
discover #
load #
get_path #
Return the directory path of a skill by name.
| RAISES | DESCRIPTION |
|---|---|
KeyError | if no skill with that name is found. |
invalidate #
ensure_storage #
Ensure the storage backend is ready.
LocalRuntime creates the install directory. A DockerRuntime might create a container volume. A no-op for read-only runtimes.
Source code in autogen/beta/tools/toolkits/skills/runtime/protocol.py
install #
Move an extracted skill from a staging directory into runtime storage.
| PARAMETER | DESCRIPTION |
|---|---|
source | Local staging directory that contains the skill files. TYPE: |
name | Skill name (used as the sub-directory name in storage). TYPE: |
Source code in autogen/beta/tools/toolkits/skills/runtime/protocol.py
remove #
Delete an installed skill from storage.
| RAISES | DESCRIPTION |
|---|---|
ValueError | If name would resolve outside the install directory. |
FileNotFoundError | If no skill with name is installed. |
Source code in autogen/beta/tools/toolkits/skills/runtime/protocol.py
shell #
Return a :class:~autogen.beta.tools.shell.ShellEnvironment for scripts_dir.
| PARAMETER | DESCRIPTION |
|---|---|
scripts_dir | Absolute path to the skill's TYPE: |