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.
Delete runtime storage on process exit.
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.
Return metadata for all installed skills.
Source code in autogen/beta/tools/runtime/protocol.py
| def discover(self) -> list[SkillMetadata]:
"""Return metadata for all installed skills."""
...
|
Return the full SKILL.md text for name.
Source code in autogen/beta/tools/runtime/protocol.py
| def load(self, name: str) -> str:
"""Return the full ``SKILL.md`` text for *name*."""
...
|
Return the directory path of a skill by name.
| RAISES | DESCRIPTION |
KeyError | if no skill with that name is found. |
Source code in autogen/beta/tools/runtime/protocol.py
| def get_path(self, name: str) -> Path:
"""Return the directory path of a skill by name.
Raises:
KeyError: if no skill with that name is found.
"""
...
|
Clear discovery cache (call after install / remove).
Source code in autogen/beta/tools/runtime/protocol.py
| def invalidate(self) -> None:
"""Clear discovery cache (call after install / remove)."""
...
|
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/runtime/protocol.py
| def ensure_storage(self) -> None:
"""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.
"""
...
|
Move an extracted skill from a staging directory into runtime storage.
| PARAMETER | DESCRIPTION |
source | Local staging directory that contains the skill files. TYPE: Path |
name | Skill name (used as the sub-directory name in storage). TYPE: str |
Source code in autogen/beta/tools/runtime/protocol.py
| def install(self, source: Path, name: str) -> None:
"""Move an extracted skill from a staging directory into runtime storage.
Args:
source: Local staging directory that contains the skill files.
name: Skill name (used as the sub-directory name in storage).
"""
...
|
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/runtime/protocol.py
| def remove(self, name: str) -> None:
"""Delete an installed skill from storage.
Raises:
ValueError: If *name* would resolve outside the install directory.
FileNotFoundError: If no skill with *name* is installed.
"""
...
|
Return a :class:~autogen.beta.tools.shell.ShellEnvironment for scripts_dir.
| PARAMETER | DESCRIPTION |
scripts_dir | Absolute path to the skill's scripts/ directory. Callers resolve this path via the discovery loader so that both install-dir and extra-path skills are handled uniformly. TYPE: Path |
Source code in autogen/beta/tools/runtime/protocol.py
| def shell(self, scripts_dir: Path) -> ShellEnvironment:
"""Return a :class:`~autogen.beta.tools.shell.ShellEnvironment` for *scripts_dir*.
Args:
scripts_dir: Absolute path to the skill's ``scripts/`` directory.
Callers resolve this path via the discovery loader so
that both install-dir and extra-path skills are handled
uniformly.
"""
...
|