entorin

Skills

Lazy-loaded, manifest-described code units with two dispatch paths — explicit invoke or event-trigger from the EventBus.

Lazy-loaded, manifest-described code units with two dispatch paths: explicit invoke() or event-trigger from the EventBus.

from entorin.skills import SkillManifest, SkillRuntime

manifest = SkillManifest(
    name="audit_run_end",
    version="1.0.0",
    triggers=("run.end", "run.error"),
    required_caps=("audit.write",),
    entry_point="my_pkg.skills:on_run_end",
)

runtime = SkillRuntime(
    bus=bus,
    context_provider=lambda ev: ctx,  # required when triggers are set
)
runtime.register(manifest)

# explicit invoke (no trigger needed):
result = await runtime.invoke("audit_run_end", ctx, payload={"why": "manual"})

What you write

Skill bodies are async functions taking (ctx, payload). Triggers are glob patterns over the EventBus (run.end, tool.*, etc.).

What the control plane emits

  • skill.load once per skill on first use
  • skill.invoke per call
  • skill.error on raise
  • entorin.skill.invoke span carrying entorin.skill_name and entorin.skill_version

Capabilities required: skill.<name>.invoke plus everything in manifest.required_caps.