AgentSea.Capability (agentsea_core v0.1.0)

Copy Markdown

A named capability an agent has, with a proficiency level. Capability matching is pure: given an agent's capabilities and the names a task requires, compute which are matched/missing, an aggregate score in [0, 1], and whether the agent can execute the task at all.

Summary

Functions

Match agent capabilities against the capability names a task requires.

Numeric weight for a capability's proficiency.

Types

match()

@type match() :: %{
  matched: [String.t()],
  missing: [String.t()],
  score: float(),
  can_execute: boolean()
}

proficiency()

@type proficiency() :: :novice | :intermediate | :expert | :master

t()

@type t() :: %AgentSea.Capability{
  description: String.t() | nil,
  keywords: [String.t()],
  name: String.t(),
  proficiency: proficiency()
}

Functions

match(agent_capabilities, required)

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

Match agent capabilities against the capability names a task requires.

With no required capabilities, the score reflects the agent's overall proficiency and can_execute is true. Otherwise the score is coverage (fraction of required capabilities present) times the average proficiency of the matched ones, and can_execute is true only when nothing is missing.

proficiency_score(capability)

@spec proficiency_score(t()) :: float()

Numeric weight for a capability's proficiency.