yggdrasil.loki.skill¶
skill ¶
Loki skills — the pluggable unit of agent capability.
A :class:LokiSkill is one thing Loki can do: ask Genie, run SQL, fetch a
table, browse the web, scaffold a project, drive a cloud service. Skills
declare whether they're :meth:available in the current environment (so a
Databricks-only skill stays dark on a bare shell) and implement :meth:run.
They register into a global table so the CLI and the agent can discover and
dispatch them by name.
This is the abstraction; concrete skills land on top of it.
LokiSkill ¶
Bases: ABC
One discoverable, environment-aware capability Loki can perform.
register ¶
Register a skill (class or instance) by its name.
Usable as a decorator on a :class:LokiSkill subclass::
@register
class Echo(LokiSkill):
name = "echo"
def run(self, agent, **kw): return kw