Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertMCPServerToRemoteMCPServer(mcpServer *v1alpha1.MCPServer) (*v1alpha2.RemoteMCPServer, error)
- func ConvertServiceToRemoteMCPServer(svc *corev1.Service) (*v1alpha2.RemoteMCPServer, error)
- func GetA2AAgentCard(agent *v1alpha2.Agent) *server.AgentCard
- func NewValidationError(format string, args ...any) error
- type AdkApiTranslator
- type AgentOutputs
- type ImageConfig
- type PromptTemplateContext
- type TranslatorPlugin
- type ValidationError
Constants ¶
View Source
const ( MCPServiceLabel = "kagent.dev/mcp-service" MCPServicePathAnnotation = "kagent.dev/mcp-service-path" MCPServicePortAnnotation = "kagent.dev/mcp-service-port" MCPServiceProtocolAnnotation = "kagent.dev/mcp-service-protocol" MCPServicePathDefault = "/mcp" MCPServiceProtocolDefault = v1alpha2.RemoteMCPServerProtocolStreamableHttp ProxyHostHeader = "x-kagent-host" // DefaultMCPServerTimeout is the fallback connection timeout applied when // an MCPServer CRD resource does not have an explicit Timeout set (e.g. // objects created before the field was introduced). This value mirrors // the kubebuilder default on MCPServerSpec.Timeout in the kmcp CRD. DefaultMCPServerTimeout = 30 * time.Second )
View Source
const MAX_DEPTH = 10
Variables ¶
View Source
var DefaultImageConfig = ImageConfig{ Registry: "cr.kagent.dev", Tag: version.Get().Version, PullPolicy: string(corev1.PullIfNotPresent), PullSecret: "", Repository: "kagent-dev/kagent/app", }
View Source
var DefaultSkillsInitImageConfig = ImageConfig{ Registry: "cr.kagent.dev", Tag: version.Get().Version, PullPolicy: string(corev1.PullIfNotPresent), Repository: "kagent-dev/kagent/skills-init", }
DefaultSkillsInitImageConfig is the image config for the skills-init container that clones skill repositories from Git and pulls OCI skill images.
Functions ¶
func ConvertMCPServerToRemoteMCPServer ¶
func ConvertMCPServerToRemoteMCPServer(mcpServer *v1alpha1.MCPServer) (*v1alpha2.RemoteMCPServer, error)
func ConvertServiceToRemoteMCPServer ¶
func ConvertServiceToRemoteMCPServer(svc *corev1.Service) (*v1alpha2.RemoteMCPServer, error)
func NewValidationError ¶
NewValidationError creates a new ValidationError
Types ¶
type AdkApiTranslator ¶
type AdkApiTranslator interface {
TranslateAgent(
ctx context.Context,
agent *v1alpha2.Agent,
) (*AgentOutputs, error)
GetOwnedResourceTypes() []client.Object
}
func NewAdkApiTranslator ¶
func NewAdkApiTranslator(kube client.Client, defaultModelConfig types.NamespacedName, plugins []TranslatorPlugin, globalProxyURL string) AdkApiTranslator
type AgentOutputs ¶
type AgentOutputs = translator.AgentOutputs
TODO(ilackarms): migrate this whole package to pkg/translator
type ImageConfig ¶
type ImageConfig struct {
Registry string `json:"registry,omitempty"`
Tag string `json:"tag,omitempty"`
PullPolicy string `json:"pullPolicy,omitempty"`
PullSecret string `json:"pullSecret,omitempty"`
Repository string `json:"repository,omitempty"`
}
func (ImageConfig) Image ¶
func (c ImageConfig) Image() string
Image returns the fully qualified image reference (registry/repository:tag).
type PromptTemplateContext ¶
type PromptTemplateContext struct {
// AgentName is the metadata.name of the Agent resource.
AgentName string
// AgentNamespace is the metadata.namespace of the Agent resource.
AgentNamespace string
// Description is the spec.description of the Agent resource.
Description string
// ToolNames is the list of tool names from all MCP server tools configured on the agent.
ToolNames []string
// SkillNames is the list of skill identifiers configured on the agent.
SkillNames []string
}
PromptTemplateContext holds the variables available to system message templates.
type TranslatorPlugin ¶
type TranslatorPlugin = translator.TranslatorPlugin
type ValidationError ¶
type ValidationError struct {
Err error
}
ValidationError indicates a configuration error that requires user action to fix. These errors should not trigger exponential backoff retries.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.