jeevesagent.skills.registry

SkillRegistry — manages a collection of available skills.

Built once when an Agent is constructed. Holds every Skill discovered from the user’s sources, applies last-source-wins override semantics by name, and provides the two hooks the framework needs to surface skills to the model:

  • catalog_section() — the markdown bullet list injected into the system prompt at startup (the cheap “metadata” tier of progressive disclosure)

  • load() — return a skill’s full body when the model calls the load_skill tool

Override semantics matches LangChain DeepAgents: when two sources ship a skill with the same name, the LATER source wins. This lets users layer system → user → project skills and override at any level:

skills=[
    "~/.jeeves/skills/system/",      # base
    "~/.jeeves/skills/user/",        # user override
    "./.jeeves-skills/",             # project override
]

Attributes

SkillSpec

Anything an Agent's skills= argument accepts.

Classes

SkillRegistry

A keyed collection of Skill instances.

Module Contents

class jeevesagent.skills.registry.SkillRegistry(items: collections.abc.Iterable[SkillSpec] | None = None)[source]

A keyed collection of Skill instances.

add(skill: jeevesagent.skills.skill.Skill) None[source]

Append (or override) a single skill after construction.

catalog_section() str[source]

The markdown bullet list that gets appended to the agent’s system prompt.

Empty registry → empty string (so the constructor can unconditionally call this without polluting the system prompt with a blank “Available skills” header).

get(name: str) jeevesagent.skills.skill.Skill | None[source]
is_loaded(name: str) bool[source]

Whether the skill’s pending tools have been registered.

load(name: str) str[source]

Return the full body of a skill (the load_skill tool’s result). Raises SkillError for unknown names so the model gets a clear error in the tool result.

Does NOT register pending Tools. For the full load-and- register flow, see load_with_tools().

load_with_tools(name: str) tuple[str, list[jeevesagent.tools.registry.Tool]][source]

Return (body, newly_pending_tools) — the body of the skill plus the Tool instances the framework should register with the agent’s tool host on this load.

Idempotent: subsequent calls for the same skill return the body and an empty tool list, since registration only needs to happen once.

metadata_map() collections.abc.Mapping[str, jeevesagent.skills.skill.SkillMetadata][source]

All currently-registered skills’ metadata, keyed by name. Cheap to compute — used to build the catalog section.

names() list[str][source]
remove(name: str) jeevesagent.skills.skill.Skill | None[source]

Drop a skill by name. Returns the removed instance or None if no such skill was registered.

jeevesagent.skills.registry.SkillSpec

Anything an Agent’s skills= argument accepts.