Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSystemPrompt ¶
func BuildSystemPrompt(opts SystemPromptOptions) string
BuildSystemPrompt constructs the system prompt from components.
func LoadAgentsMD ¶
LoadAgentsMD discovers and concatenates AGENTS.md files in priority order.
Priority (lowest first, content concatenated):
- <agentHome>/AGENTS.md (global)
- Walk: root → ... → cwd/.. (ancestor directories, root first, deepest last)
- cwd/AGENTS.md (project-local, highest priority)
agentHome defaults to $MOA_CONFIG_DIR, then ~/.config/moa. Duplicate paths are deduplicated.
Types ¶
type SystemPromptOptions ¶
type SystemPromptOptions struct {
AgentsMD string // AGENTS.md content (concatenated from all levels)
Tools []core.ToolSpec // registered tools
CWD string // working directory shown to the agent
HasVerify bool // .moa/verify.json was loaded
MemoryIndex string // pre-formatted memory index (one line per fact)
SkillsIndex string // pre-formatted skills index
}
SystemPromptOptions configures system prompt generation.
Click to show internal directories.
Click to hide internal directories.