Jidoka.Skill (Jidoka v0.8.0-beta.1)

Copy Markdown View Source

Jido.AI skill helpers used by the Jidoka DSL.

Skills are definition-time data in Jidoka. A skill contributes prompt instructions and any action modules published by the skill manifest. Those actions are still executed through the normal Jido action operation path.

Summary

Functions

Returns action modules contributed by a list of skill references.

Returns serializable metadata for resolved skill references.

Expands skill load paths relative to a base directory.

Renders prompt text contributed by a list of skill references.

Validates a skill load path before it is expanded relative to an agent source file.

Validates a skill reference from the DSL or imported agent spec.

Types

ref()

@type ref() :: module() | String.t()

Functions

action_modules(refs, opts \\ [])

@spec action_modules(
  [ref()],
  keyword()
) :: [module()]

Returns action modules contributed by a list of skill references.

metadata(refs, opts \\ [])

@spec metadata(
  [ref()],
  keyword()
) :: {:ok, [map()]} | {:error, term()}

Returns serializable metadata for resolved skill references.

normalize_load_paths(paths, base_dir)

@spec normalize_load_paths([String.t()], String.t()) :: [String.t()]

Expands skill load paths relative to a base directory.

prompt(refs, opts \\ [])

@spec prompt(
  [ref()],
  keyword()
) :: {:ok, String.t() | nil} | {:error, term()}

Renders prompt text contributed by a list of skill references.

validate_load_path(path)

@spec validate_load_path(term()) :: :ok | {:error, String.t()}

Validates a skill load path before it is expanded relative to an agent source file.

validate_ref(module)

@spec validate_ref(ref()) :: :ok | {:error, String.t()}

Validates a skill reference from the DSL or imported agent spec.