Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// Core fields (all tools)
Name string `yaml:"name" json:"name"`
Description string `yaml:"description" json:"description"`
Content string `yaml:"-" json:"content,omitempty"` // Markdown body (system prompt)
Scope string `yaml:"-" json:"scope"` // "local" or "global"
Tool string `yaml:"-" json:"tool"` // Source tool (claude, copilot, cursor, opencode)
Path string `yaml:"-" json:"path,omitempty"` // File path
// Model selection
Model string `yaml:"model,omitempty" json:"model,omitempty"` // Model to use (inherit, sonnet, opus, haiku, fast, etc.)
// Tool access control
Tools []string `yaml:"tools,omitempty" json:"tools,omitempty"` // Allowed tools
DisallowedTools []string `yaml:"disallowedTools,omitempty" json:"disallowedTools,omitempty"` // Denied tools (Claude)
// Claude-specific
PermissionMode string `yaml:"permissionMode,omitempty" json:"permissionMode,omitempty"` // default, acceptEdits, dontAsk, bypassPermissions, plan
Skills []string `yaml:"skills,omitempty" json:"skills,omitempty"` // Preloaded skills
// Cursor-specific
ReadOnly bool `yaml:"readonly,omitempty" json:"readonly,omitempty"` // Restrict write operations
IsBackground bool `yaml:"is_background,omitempty" json:"is_background,omitempty"` // Run asynchronously
// OpenCode-specific
Temperature float64 `yaml:"temperature,omitempty" json:"temperature,omitempty"` // Response randomness (0.0-1.0)
MaxSteps int `yaml:"maxSteps,omitempty" json:"maxSteps,omitempty"` // Max iterations
Mode string `yaml:"mode,omitempty" json:"mode,omitempty"` // primary, subagent, all
Hidden bool `yaml:"hidden,omitempty" json:"hidden,omitempty"` // Exclude from autocomplete
Disabled bool `yaml:"disable,omitempty" json:"disabled,omitempty"` // Agent disabled
// Copilot-specific
Target string `yaml:"target,omitempty" json:"target,omitempty"` // vscode, github-copilot
Infer bool `yaml:"infer,omitempty" json:"infer,omitempty"` // Auto-selection based on context
Metadata map[string]string `yaml:"metadata,omitempty" json:"metadata,omitempty"` // Custom annotations
}
Agent represents a custom agent/subagent for AI coding tools. Agents are configured via markdown files with YAML frontmatter. Supported tools: Claude Code, GitHub Copilot, Cursor, OpenCode
func LoadFromDirectory ¶
LoadFromDirectory loads all agents from a directory
func LoadFromFile ¶
LoadFromFile loads an agent from a markdown file with YAML frontmatter
func ParseAgentMarkdown ¶
ParseAgentMarkdown parses a markdown file with YAML frontmatter into an Agent
func (*Agent) InspectContent ¶
InspectContent returns the formatted content for the inspector viewport
func (*Agent) InspectTitle ¶
InspectTitle returns the display name for the inspector modal header
func (*Agent) SaveToFile ¶
SaveToFile saves an agent to a markdown file with YAML frontmatter
func (*Agent) ToToolFormat ¶
ToToolFormat converts the agent to a tool-specific format This can be used when syncing agents to different tools