Documentation
¶
Index ¶
- func NewAgentsMD(cfg AgentsMDConfig, deps AgentsMDDeps) (agentkit.SectionProvider, error)
- func NewFile(cfg FileConfig, deps FileDeps) (agentkit.SectionProvider, error)
- func NewMemoryMD(cfg MemoryMDConfig, deps MemoryMDDeps) (agentkit.SectionProvider, error)
- func NewSkillsSection(_ SkillsSectionConfig, deps SkillsSectionDeps) (agentkit.SectionProvider, error)
- func NewStatic(cfg StaticConfig) (agentkit.SectionProvider, error)
- func NewSubagentsSection(_ SubagentsSectionConfig, deps SubagentsSectionDeps) (agentkit.SectionProvider, error)
- func NewWorkspaceDirs(cfg WorkspaceDirsConfig, deps WorkspaceDirsDeps) (agentkit.SectionProvider, error)
- type AgentsMDConfig
- type AgentsMDDeps
- type FileConfig
- type FileDeps
- type MemoryMDConfig
- type MemoryMDDeps
- type SkillsSectionConfig
- type SkillsSectionDeps
- type StaticConfig
- type SubagentsSectionConfig
- type SubagentsSectionDeps
- type WorkspaceDirEntry
- type WorkspaceDirsConfig
- type WorkspaceDirsDeps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentsMD ¶
func NewAgentsMD(cfg AgentsMDConfig, deps AgentsMDDeps) (agentkit.SectionProvider, error)
NewAgentsMD registers prompt/section/agents-md: an alias of prompt/section/file preconfigured to walk up the workspace directory hierarchy looking for instruction files (AGENTS.md / CLAUDE.md).
func NewFile ¶ added in v0.3.60
func NewFile(cfg FileConfig, deps FileDeps) (agentkit.SectionProvider, error)
NewFile registers prompt/section/file: inject file contents discovered from the workspace directory into the system prompt.
func NewMemoryMD ¶ added in v0.1.10
func NewMemoryMD(cfg MemoryMDConfig, deps MemoryMDDeps) (agentkit.SectionProvider, error)
NewMemoryMD registers prompt/section/memory: inject global + tenant-local memory.md.
func NewSkillsSection ¶
func NewSkillsSection(_ SkillsSectionConfig, deps SkillsSectionDeps) (agentkit.SectionProvider, error)
NewSkillsSection registers prompt/section/skills: Inject a catalog of available skills so the model knows what it can load.
func NewStatic ¶
func NewStatic(cfg StaticConfig) (agentkit.SectionProvider, error)
func NewSubagentsSection ¶
func NewSubagentsSection(_ SubagentsSectionConfig, deps SubagentsSectionDeps) (agentkit.SectionProvider, error)
NewSubagentsSection registers prompt/section/subagents: Inject the catalog of delegatable subagents so the model knows who it can hand work to.
Best practices:
- Mount this wherever tool/subagent is mounted: the delegate tool's description is static, so without this section the model has no list of valid agent names.
- deps.llm is optional; when the main model is text-only, this section adds delegation hints for image attachments.
func NewWorkspaceDirs ¶ added in v0.4.3
func NewWorkspaceDirs(cfg WorkspaceDirsConfig, deps WorkspaceDirsDeps) (agentkit.SectionProvider, error)
NewWorkspaceDirs registers prompt/section/workspace-dirs: Inject the resolved absolute paths of scoped workspace directories (local:/global:) so the model knows where discovered assets live and where to create new ones.
Best practices:
- Mirror the dirs of the discovery plugin the group belongs to (e.g. tool/workflow config.dirs), in the same precedence order; keep them in sync when either side changes.
- Put precedence/reload rules in the entry note; use intro to explain the local:/global: vocabulary.
- Resolution runs per turn with the request context, so per-tenant local roots (workspace/tenant) render correctly for each session.
Types ¶
type AgentsMDConfig ¶
type AgentsMDConfig struct {
// Root is directory to start the upward search from.
Root string `json:"root"`
// Filenames overrides the default instruction files to search in each directory.
// Example for Automon runtimes: ["Automon.md", "AUTOMON.md"].
Filenames []string `json:"filenames"`
}
func (*AgentsMDConfig) SetDefaults ¶ added in v0.3.48
func (c *AgentsMDConfig) SetDefaults()
SetDefaults implements pluginkit.Defaulter.
type AgentsMDDeps ¶
type AgentsMDDeps = FileDeps
AgentsMDDeps is an alias of FileDeps, kept for backward compatibility.
type FileConfig ¶ added in v0.3.60
type FileConfig struct {
// Name is the section label, used for ordering and debugging.
Name string `json:"name"`
// Root is the workspace-relative directory to start reading from.
Root string `json:"root"`
// Filenames are candidate files (names or relative paths) read in each
// visited directory; missing or empty files are silently skipped.
Filenames []string `json:"filenames"`
// WalkUp continues the search in parent directories up to the filesystem
// root. Wire an unrestricted filesystem/local instance: the upward walk
// passes absolute host paths; non-local backends simply miss every
// candidate and inject nothing.
WalkUp bool `json:"walkUp"`
}
FileConfig configures prompt/section/file: inject the contents of one or more workspace files into the system prompt.
func (*FileConfig) SetDefaults ¶ added in v0.3.60
func (c *FileConfig) SetDefaults()
SetDefaults implements pluginkit.Defaulter.
type FileDeps ¶ added in v0.3.60
type FileDeps struct {
Workspace workspace.Service `json:"workspace"`
// FS reads candidate files; see FileConfig.WalkUp for why an unrestricted
// filesystem/local instance is recommended.
FS filesystem.Service `json:"fs"`
}
FileDeps are the dependencies of prompt/section/file.
type MemoryMDConfig ¶ added in v0.1.10
type MemoryMDDeps ¶ added in v0.1.10
type SkillsSectionConfig ¶
type SkillsSectionConfig struct{}
type SkillsSectionDeps ¶
type StaticConfig ¶
type StaticConfig struct {
// Name is section label, used for ordering and debugging.
Name string `json:"name"`
// Content is the prompt text.
Content string `json:"content"`
}
func (*StaticConfig) SetDefaults ¶ added in v0.3.48
func (c *StaticConfig) SetDefaults()
NewStatic registers prompt/section/static: Inject a fixed block of system prompt text from config. SetDefaults implements pluginkit.Defaulter.
type SubagentsSectionConfig ¶
type SubagentsSectionConfig struct{}
type SubagentsSectionDeps ¶
type SubagentsSectionDeps struct {
Subagent subagent.Spawner `json:"subagent"`
LLM agentkit.LLMProvider `json:"llm,omitempty"`
}
type WorkspaceDirEntry ¶ added in v0.4.3
type WorkspaceDirEntry struct {
// Label says what the directories hold, e.g. "workflows".
Label string `json:"label"`
// Dirs are workspace directories in precedence order, usually carrying the
// local:/global: configuration prefixes; the first dir is where new files
// belong and shadows same-named files in later dirs.
Dirs []string `json:"dirs"`
// Note is optional guidance rendered after the group, e.g. precedence and
// reload rules.
Note string `json:"note,omitempty"`
}
WorkspaceDirEntry is one named group of directories that share a purpose.
type WorkspaceDirsConfig ¶ added in v0.4.3
type WorkspaceDirsConfig struct {
// Name is section label, used for ordering and debugging.
Name string `json:"name"`
// Intro is optional lead-in text rendered above the directory groups,
// e.g. the legend of the local:/global: configuration vocabulary.
Intro string `json:"intro,omitempty"`
// Entries are directory groups in display order.
Entries []WorkspaceDirEntry `json:"entries"`
}
WorkspaceDirsConfig configures prompt/section/workspace-dirs.
func (*WorkspaceDirsConfig) SetDefaults ¶ added in v0.4.3
func (c *WorkspaceDirsConfig) SetDefaults()
SetDefaults implements pluginkit.Defaulter.
func (*WorkspaceDirsConfig) Validate ¶ added in v0.4.3
func (c *WorkspaceDirsConfig) Validate() error
Validate implements pluginkit.Validator.
type WorkspaceDirsDeps ¶ added in v0.4.3
WorkspaceDirsDeps are the dependencies of prompt/section/workspace-dirs.