subagent

package
v0.2.0-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package subagent holds the shape of a subagent definition file and the rules its frontmatter must satisfy.

It sits in core because two callers that cannot share anything higher both need it: loading definitions for a run, and inspecting an uploaded plugin package to report the subagents it contributes, which internal/server does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Def

type Def struct {
	Name          string   // agent type name (used as subagent_type value)
	Description   string   // LLM-readable description
	ToolNames     []string // tool names parsed from the "tools" field
	SystemPrompt  string   // body text used as the sub-agent system prompt
	Model         string   // model name to use for this agent type; "" = runner default
	MaxIterations int      // iteration cap; 0 = defaultSubAgentMaxIter (50)
	Color         string   // color hint (parsed, reserved for UI)
	// Origin is the layer this definition was found in, so status can show a
	// plugin's contribution and anything that shadowed it.
	Origin plugin.Origin
}

Def represents one parsed sub-agent definition file. The file uses YAML-like frontmatter (between --- delimiters) for metadata and the body after the closing --- as the system prompt.

func ParseDef

func ParseDef(data []byte) (Def, error)

ParseDef parses a single agent definition from file content. Expected format: YAML-like frontmatter between --- delimiters, then body.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL