Documentation
¶
Index ¶
- Constants
- func ComputeMCPConfigPath(target *MCPConfigTarget) (configDir string, configPath string)
- func ComputePromptsConfigPath(target *MCPConfigTarget) (configDir string, configPath string)
- func NewProjectManifest(agentName, language, framework, modelProvider, modelName, description string, ...) *models.AgentManifest
- func RefreshMCPConfig(target *MCPConfigTarget, servers []PythonMCPServer, verbose bool) error
- func RefreshPromptsConfig(target *MCPConfigTarget, prompts []PythonPrompt, verbose bool) error
- type AgentConfig
- type AgentManifestValidator
- type BaseGenerator
- type MCPConfigTarget
- type Manager
- type PythonMCPServer
- type PythonPrompt
Constants ¶
const ManifestFileName = "agent.yaml"
Variables ¶
This section is empty.
Functions ¶
func ComputeMCPConfigPath ¶
func ComputeMCPConfigPath(target *MCPConfigTarget) (configDir string, configPath string)
ComputeMCPConfigPath returns the config directory and file path for an agent. If BaseDir or AgentName is empty, both returned paths are empty.
func ComputePromptsConfigPath ¶ added in v0.2.0
func ComputePromptsConfigPath(target *MCPConfigTarget) (configDir string, configPath string)
ComputePromptsConfigPath returns the config directory and file path for prompts. If BaseDir or AgentName is empty, both returned paths are empty.
func NewProjectManifest ¶
func NewProjectManifest(agentName, language, framework, modelProvider, modelName, description string, mcpServers []models.McpServerType) *models.AgentManifest
NewProjectManifest creates a new AgentManifest with the given values.
func RefreshMCPConfig ¶
func RefreshMCPConfig(target *MCPConfigTarget, servers []PythonMCPServer, verbose bool) error
RefreshMCPConfig cleans any existing MCP config for the target and optionally writes a new one. If servers is empty or nil, it performs cleanup only.
func RefreshPromptsConfig ¶ added in v0.2.0
func RefreshPromptsConfig(target *MCPConfigTarget, prompts []PythonPrompt, verbose bool) error
RefreshPromptsConfig cleans any existing prompts config for the target and optionally writes a new one. If prompts is empty or nil, it performs cleanup only.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Name string
Version string
Description string
Image string
Directory string
Verbose bool
Instruction string
ModelProvider string
ModelName string
Framework string
Language string
KagentADKImageVersion string
KagentADKPyVersion string
TelemetryEndpoint string
Port int
McpServers []models.McpServerType
EnvVars []string
Skills []models.SkillRef
InitGit bool
}
AgentConfig captures the data required to render an agent project from templates.
func (AgentConfig) HasSkills ¶ added in v0.2.0
func (c AgentConfig) HasSkills() bool
HasSkills returns true when the agent has at least one skill configured.
func (AgentConfig) ShouldSkipPath ¶
func (c AgentConfig) ShouldSkipPath(path string) bool
ShouldSkipPath allows template walkers to skip specific directories.
type AgentManifestValidator ¶ added in v0.1.24
type AgentManifestValidator struct{}
AgentManifestValidator validates agent manifests.
func (*AgentManifestValidator) Validate ¶ added in v0.1.24
func (v *AgentManifestValidator) Validate(m *models.AgentManifest) error
Validate checks if the agent manifest is valid.
type BaseGenerator ¶
type BaseGenerator struct {
// contains filtered or unexported fields
}
BaseGenerator renders template trees into a destination directory.
func NewBaseGenerator ¶
func NewBaseGenerator(templateFiles fs.FS) *BaseGenerator
NewBaseGenerator returns a template renderer rooted at "templates".
func (*BaseGenerator) GenerateProject ¶
func (g *BaseGenerator) GenerateProject(config AgentConfig) error
GenerateProject walks the template tree and renders files to disk.
func (*BaseGenerator) ReadTemplateFile ¶
func (g *BaseGenerator) ReadTemplateFile(templatePath string) ([]byte, error)
ReadTemplateFile reads a raw template file from the generator's embedded filesystem.
func (*BaseGenerator) RenderTemplate ¶
func (g *BaseGenerator) RenderTemplate(tmplContent string, data any) (string, error)
RenderTemplate renders a template string with the provided data.
type MCPConfigTarget ¶
type MCPConfigTarget struct {
BaseDir string
AgentName string
Version string // optional; when set, path includes sanitized version
}
MCPConfigTarget describes where to place the resolved MCP config for an agent.
type Manager ¶
type Manager struct {
*manifest.Manager[*models.AgentManifest]
}
Manager wraps the generic manifest manager for agent manifests.
func NewManifestManager ¶
NewManifestManager creates a new agent manifest manager.
type PythonMCPServer ¶
type PythonMCPServer struct {
Name string `json:"name"`
Type string `json:"type"` // "remote" or "command"
URL string `json:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
}
PythonMCPServer represents the JSON structure expected by the Python MCP tools template Equal to the type used in the python mcp_tools.py template.
func PythonServersFromManifest ¶
func PythonServersFromManifest(manifest *models.AgentManifest) []PythonMCPServer
PythonServersFromManifest converts resolved MCP servers in a manifest into Python MCP server structs. Registry-type servers are skipped because they are not directly runnable.
type PythonPrompt ¶ added in v0.2.0
PythonPrompt represents the JSON structure written to prompts.json for the Python agent. Each prompt is a named text blob (the instruction content).
func PythonPromptFromResponse ¶ added in v0.2.0
func PythonPromptFromResponse(name string, prompt *models.PromptJSON) PythonPrompt
PythonPromptFromResponse extracts the text content from a PromptJSON.