Documentation
¶
Index ¶
- type Action
- type Agent
- func (c *Agent) AgentState() api.AgentState
- func (c *Agent) Close() error
- func (a *Agent) CloseMCPClient() error
- func (c *Agent) DispatchToolCalls(ctx context.Context) error
- func (a *Agent) GetMCPStatusText() string
- func (s *Agent) Init(ctx context.Context) error
- func (a *Agent) InitializeMCPClient(ctx context.Context) error
- func (c *Agent) Run(ctx context.Context, initialQuery string) error
- func (s *Agent) Session() *api.Session
- func (a *Agent) UpdateMCPStatus(ctx context.Context, mcpClientEnabled bool) error
- type PromptData
- type ReActResponse
- type ShimCandidate
- type ShimPart
- type ShimResponse
- type ToolCallAnalysis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { // Input is the channel to receive user input. Input chan any // Output is the channel to send messages to the UI. Output chan any // RunOnce indicates if the agent should run only once. // If true, the agent will run only once and then exit. // If false, the agent will run in a loop until the context is done. RunOnce bool // InitialQuery is the initial query to the agent. // If provided, the agent will run only once and then exit. InitialQuery string LLM gollm.Client // PromptTemplateFile allows specifying a custom template file PromptTemplateFile string // ExtraPromptPaths allows specifying additional prompt templates // to be combined with PromptTemplateFile ExtraPromptPaths []string Model string RemoveWorkDir bool MaxIterations int // Kubeconfig is the path to the kubeconfig file. Kubeconfig string SkipPermissions bool Tools tools.Tools EnableToolUseShim bool // MCPClientEnabled indicates whether MCP client mode is enabled MCPClientEnabled bool // Recorder captures events for diagnostics Recorder journal.Recorder // contains filtered or unexported fields }
func (*Agent) AgentState ¶ added in v0.0.16
func (c *Agent) AgentState() api.AgentState
func (*Agent) CloseMCPClient ¶ added in v0.0.16
CloseMCPClient closes the MCP client connections
func (*Agent) DispatchToolCalls ¶ added in v0.0.16
func (*Agent) GetMCPStatusText ¶ added in v0.0.16
GetMCPStatusText returns a formatted text representation of the MCP status This can be used by UIs that want to display the status as text
func (*Agent) InitializeMCPClient ¶ added in v0.0.16
InitializeMCPClient initializes MCP client functionality for the agent. It connects to servers and registers discovered tools with the kubectl-ai tool system.
type PromptData ¶
PromptData represents the structure of the data to be filled into the template.
func (*PromptData) ToolNames ¶
func (a *PromptData) ToolNames() string
func (*PromptData) ToolsAsJSON ¶
func (a *PromptData) ToolsAsJSON() string
type ReActResponse ¶
type ShimCandidate ¶
type ShimCandidate struct {
// contains filtered or unexported fields
}
func (*ShimCandidate) Parts ¶
func (c *ShimCandidate) Parts() []gollm.Part
func (*ShimCandidate) String ¶
func (c *ShimCandidate) String() string
type ShimPart ¶
type ShimPart struct {
// contains filtered or unexported fields
}
func (*ShimPart) AsFunctionCalls ¶
func (p *ShimPart) AsFunctionCalls() ([]gollm.FunctionCall, bool)
type ShimResponse ¶ added in v0.0.2
type ShimResponse struct {
// contains filtered or unexported fields
}
func (*ShimResponse) Candidates ¶ added in v0.0.2
func (r *ShimResponse) Candidates() []gollm.Candidate
func (*ShimResponse) UsageMetadata ¶ added in v0.0.2
func (r *ShimResponse) UsageMetadata() any
type ToolCallAnalysis ¶ added in v0.0.16
Click to show internal directories.
Click to hide internal directories.