SkillKit.Agent (SkillKit v0.1.0)

Copy Markdown View Source

Data struct and parser for AGENT.md files.

An agent carries all the configuration needed to start an agent process: identity, system prompt, skills, runtime, scope, and mailbox tuning.

The struct serves as the single source of truth flowing through the entire supervision tree.

Summary

Functions

Parses AGENT.md content into a %SkillKit.Agent{}.

Types

t()

@type t() :: %SkillKit.Agent{
  caller: pid() | nil,
  conversation_store: {module(), keyword()} | nil,
  depth: non_neg_integer(),
  description: String.t(),
  initial_messages: [term()],
  mailbox: %{max_messages: pos_integer(), flush_interval: pos_integer()},
  max_agent_depth: non_neg_integer(),
  model: String.t() | nil,
  name: String.t(),
  parent_ref: SkillKit.AgentRef.t() | nil,
  registry: atom() | nil,
  runtime: {module(), keyword()},
  scope: term(),
  skills: [{module(), keyword()}],
  system_prompt: String.t(),
  tools: [{module(), keyword()}]
}

Functions

parse(content)

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

Parses AGENT.md content into a %SkillKit.Agent{}.

Returns {:ok, agent} or {:error, reason}.