yggdrasil.loki.skills¶
skills ¶
Built-in Loki skills — the backend-agnostic catalog.
These run anywhere Loki runs (no cloud session required):
- :class:
WebSkill— reach and drive the internet (browse, tables, forms). - :class:
TabularSkill/ :class:TransformSkill— the data path: fetch a source into a frame through the io handlers, cache it, reshape it. - :class:
EntsoeSkill— the energy-data path: pull ENTSO-E power-market series (prices / load / generation) for a bidding zone into a cached frame. - :class:
ScaffoldSkill— create a ready-to-push project from scratch (README, .gitignore, per-languagesrc/tests, manifest, git-init). - :class:
DelegateSkill— fan independent tasks out to parallel process agents. - :class:
PythonProjectSkill— scaffold a Python project, write code into it (provided, or reasoned from a task via the agent's engine), and run it. - :class:
SetupSkill— bootstrap a free local model on demand.
Backend-specialized skills live in their own packages and register only when
their backend is reachable — Databricks (genie, databricks-*) in
:mod:yggdrasil.databricks.loki, AWS (aws-*) in :mod:yggdrasil.aws.loki.
AgentSkill ¶
Bases: LokiSkill
Pursue a task autonomously inside a file tree — Loki's agentic loop.
The headline "act on its own + modify files" skill. Given a task,
Loki reasons against a confined toolbox (list/read/find/grep, plus
write/edit unless read_only, plus a shell when allow_shell),
taking one tool call per turn until it's done — discovering the project
and changing files itself. Runs anywhere an engine is reachable; thin
wrapper over :meth:Loki.act so code and CLI share one implementation.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
SetupSkill ¶
Bases: LokiSkill
Bootstrap a free local model, and redirect heavier setup elsewhere.
Loki's self-setup path: ready a lightweight, lazily-installed local brain
(:meth:Loki.bootstrap_local) — smart enough for basic install/config —
and surface the redirects for the heavier work a small model should
hand off: configuring Databricks, pulling a bigger/smarter model, or
escalating reasoning to a remote engine. Runs anywhere.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
WebSkill ¶
Bases: LokiSkill
Reach the internet — browse, read tables/JSON/images, or drive a page.
Runs anywhere (no backend). Fetches through
:class:~yggdrasil.http_.HTTPSession and parses tabular bodies through the
io handlers (:mod:yggdrasil.loki.web). action="auto" infers from the
URL (a .csv/.parquet/… → table, an image extension → image, else
browse as text); pass question= to have the agent reason over a
fetched page.
For interactive pages it drives a real headless browser (Playwright):
action="form" fills fields (selector → value) and optionally clicks
submit; action="interact" runs a list of steps (type, click,
select, check, press, submit, wait_for) — filling forms, clicking buttons,
and reading what the page becomes.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
TabularSkill ¶
Bases: LokiSkill
Fetch a data/timeseries source as a tabular frame, cache it, propose reuse.
Loki's data path: when a request is data- or time-series-shaped, fetch it
straight into a polars frame — through :func:web.read_table, i.e. the
:class:HTTPResponse → io tabular handlers (CSV / JSON / Parquet / Arrow /
XLSX, format auto-detected) — cache it as Parquet in the session cache
via the io abstraction (an optimized columnar copy), and return the frame
preview plus concrete next steps — reuse the cache, store it elsewhere
(Parquet / Arrow / CSV / Delta), or load it into Databricks.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
TransformSkill ¶
Bases: LokiSkill
Transform a cached/fetched frame before reuse — cast types, tz, rename, select.
Closes the data loop: take a cached (or freshly fetched) tabular frame and
reshape it using the yggdrasil field-type casting — cast columns to
target types (date, float64, datetime, …, including
timezone), rename, or select — then re-cache the optimized Parquet copy.
So a fetched series can be made analysis-ready (typed dates, numeric values,
a target timezone) and reused cleanly.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
DelegateSkill ¶
Bases: LokiSkill
Fan a set of tasks out to background process agents and monitor them.
Loki's autonomy multiplier: each task runs as its own ygg loki do
subprocess (an isolated act loop), so independent work runs in parallel while
Loki watches. Pass explicit tasks=[…], or a high-level goal= that the
engine decomposes into parallel-safe subtasks first. Returns one summary per
agent (status / elapsed / answer / files_changed). Runs anywhere an engine is
reachable (the sub-agents need one).
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
EntsoeSkill ¶
Bases: LokiSkill
Pull European power-market data (ENTSO-E) into a cached frame.
The energy-data path: fetch day-ahead prices, actual load, or
generation for a bidding zone from the ENTSO-E Transparency Platform,
parse the publication XML into a tidy timestamp/value frame
(:mod:yggdrasil.loki.entsoe), cache it as Parquet through the io
handlers, and return the preview plus reuse/transform/store next steps —
the same data loop as :class:TabularSkill, sourced from the power markets.
Token-gated: set ENTSOE_API_TOKEN. Runs anywhere (no cloud session); with
no token it returns an offline-safe hint instead of raising. Defaults to the
last 24h of day-ahead prices for DE_LU when nothing is specified.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
ScaffoldSkill ¶
Bases: LokiSkill
Create a ready-to-push project from scratch — README, .gitignore, per-language tree.
Lays down a clean git-initialised repo: a README, a composed
.gitignore, and one <language>/ folder per language (each with
src/ + tests/ and a pre-built manifest — pyproject.toml for
Python, package.json for TypeScript, Cargo.toml for Rust, go.mod
for Go) — then makes the initial commit so it only needs a remote +
git push. Runs anywhere (no engine/backend). Polyglot: pass
languages=["python","rust"]; defaults to Python.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.
PythonProjectSkill ¶
Bases: LokiSkill
Scaffold a small Python project, write code into it, and execute it.
Runs anywhere (no backend required). Either pass code directly, or a
task description that the agent reasons into a script via its engine
(agent.reason). Loki then writes a minimal project (pyproject.toml
+ a package with a main module), runs main.py in a subprocess, and
returns where it landed plus the captured output — the agent authoring and
executing code end-to-end.
available ¶
True when this skill can run in agent's environment.
Default: available everywhere, unless :attr:requires names a backend
that isn't detected. Override for finer checks.