class LittleGhost::Subagents::Definition

A Definition describes one kind of agent available for delegation. Most applications create definitions through Agent::Delegation#subagent.

The factory receives the complete agent path and may also accept runtime:. When accepts_conversation_id is true it receives the durable conversation UUID as a second positional argument. Factories returning a LittleGhost::Agent must construct it with the supplied path as agent_path; the conversation UUID is a separate persistence identifier.

# ResearchAgent is defined by the application.
definition = LittleGhost::Subagents::Definition.new(
  kind: "research",
  description: "Investigates a bounded question",
  factory: ->(agent_path) { ResearchAgent.new(agent_path:) }
)
definition.kind # => "research"