httpapi

package
v0.0.0-...-e9e4e34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Error string `json:"error"`
}

APIError represents an error response from the API

type Agent

type Agent = database.Agent

Agent represents an agent from the database

type AgentResource

type AgentResource struct {
	APIVersion string                    `json:"apiVersion,omitempty"`
	Kind       string                    `json:"kind,omitempty"`
	Metadata   metav1.ObjectMeta         `json:"metadata,omitempty"`
	Spec       v1alpha2.SandboxAgentSpec `json:"spec,omitempty"`
	Status     v1alpha2.AgentStatus      `json:"status,omitempty"`
}

func AgentResourceFrom

func AgentResourceFrom(agent v1alpha2.AgentObject) *AgentResource

type AgentResponse

type AgentResponse struct {
	ID    string         `json:"id"`
	Agent *AgentResource `json:"agent"`
	// Config         *adk.AgentConfig       `json:"config"`
	ModelProvider         v1alpha2.ModelProvider          `json:"modelProvider"`
	Model                 string                          `json:"model"`
	ModelConfigRef        string                          `json:"modelConfigRef"`
	MemoryRefs            []string                        `json:"memoryRefs"`
	Tools                 []*v1alpha2.Tool                `json:"tools"`
	DeploymentReady       bool                            `json:"deploymentReady"`
	Accepted              bool                            `json:"accepted"`
	WorkloadMode          v1alpha2.WorkloadMode           `json:"workloadMode,omitempty"`
	OpenshellAgentHarness *OpenshellAgentHarnessListEntry `json:"openshellAgentHarness,omitempty"`
	SubstrateAgentHarness *SubstrateAgentHarnessListEntry `json:"substrateAgentHarness,omitempty"`
}

type CreateMemoryRequest

type CreateMemoryRequest struct {
	Ref            string                   `json:"ref"`
	Provider       Provider                 `json:"provider"`
	APIKey         string                   `json:"apiKey"`
	PineconeParams *v1alpha1.PineconeConfig `json:"pinecone,omitempty"`
}

CreateMemoryRequest represents a request to create a memory

type CreateModelConfigRequest

type CreateModelConfigRequest struct {
	Ref string `json:"ref"`
	// APIKey is an optional inline API key to store in a generated Secret.
	APIKey string `json:"apiKey,omitempty"`
	// Secrets are optional companion Secrets to create or update alongside the ModelConfig.
	Secrets []SecretMaterial         `json:"secrets,omitempty"`
	Spec    v1alpha2.ModelConfigSpec `json:"spec"`
}

CreateModelConfigRequest is a thin wrapper: ref + optional inline apiKey + full CRD spec.

type CreatePromptTemplateRequest

type CreatePromptTemplateRequest struct {
	Namespace string            `json:"namespace"`
	Name      string            `json:"name"`
	Data      map[string]string `json:"data"`
}

CreatePromptTemplateRequest creates a labeled ConfigMap in the namespace.

type Feedback

type Feedback = database.Feedback

Feedback represents a feedback from the database

type MemoryResponse

type MemoryResponse struct {
	Ref             string         `json:"ref"`
	ProviderName    string         `json:"providerName"`
	APIKeySecretRef string         `json:"apiKeySecretRef"`
	APIKeySecretKey string         `json:"apiKeySecretKey"`
	MemoryParams    map[string]any `json:"memoryParams"`
}

MemoryResponse represents a memory response

type Message

type Message = database.Event

Message represents a message from the database

type ModelConfigResource

type ModelConfigResource struct {
	Ref    string                     `json:"ref"`
	Spec   v1alpha2.ModelConfigSpec   `json:"spec"`
	Status v1alpha2.ModelConfigStatus `json:"status,omitempty"`
}

ModelConfigResource is the HTTP response for a ModelConfig: ref + raw CRD spec/status.

type NamespaceResponse

type NamespaceResponse struct {
	Name   string `json:"name"`
	Status string `json:"status"`
}

NamespaceResponse represents a namespace response

type OpenshellAgentHarnessListEntry

type OpenshellAgentHarnessListEntry struct {
	Backend            v1alpha2.AgentHarnessBackendType `json:"backend"`
	GatewaySandboxName string                           `json:"gatewaySandboxName"`
	ModelConfigRef     string                           `json:"modelConfigRef,omitempty"`
	BackendRefID       string                           `json:"backendRefId,omitempty"`
	Endpoint           string                           `json:"endpoint,omitempty"`
}

OpenshellAgentHarnessListEntry is set when this row is a kagent.dev/v1alpha2 AgentHarness (openshell backend), merged into GET /api/agents for UI alongside Agent CRs.

type PromptTemplateDetail

type PromptTemplateDetail struct {
	Namespace string            `json:"namespace"`
	Name      string            `json:"name"`
	Data      map[string]string `json:"data"`
}

PromptTemplateDetail includes all string keys for editing.

type PromptTemplateSummary

type PromptTemplateSummary struct {
	Namespace string   `json:"namespace"`
	Name      string   `json:"name"`
	KeyCount  int      `json:"keyCount"`
	Keys      []string `json:"keys,omitempty"`
}

PromptTemplateSummary is a lightweight entry for listing prompt ConfigMaps.

type Provider

type Provider struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

Provider represents a provider configuration

type ProviderInfo

type ProviderInfo struct {
	Name           string   `json:"name"`
	Type           string   `json:"type"`
	RequiredParams []string `json:"requiredParams"`
	OptionalParams []string `json:"optionalParams"`
}

ProviderInfo represents information about a provider

type RunRequest

type RunRequest struct {
	Task string `json:"task"`
}

RunRequest represents a run creation request

type SecretMaterial

type SecretMaterial struct {
	Name  string `json:"name"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

SecretMaterial describes a Secret key/value pair to create or update alongside a ModelConfig.

type Session

type Session = database.Session

Session represents a session from the database

type SessionRequest

type SessionRequest struct {
	AgentRef *string                 `json:"agent_ref,omitempty"`
	Name     *string                 `json:"name,omitempty"`
	ID       *string                 `json:"id,omitempty"`
	Source   *database.SessionSource `json:"source,omitempty"`
}

SessionRequest represents a session creation/update request

type SessionRunsData

type SessionRunsData struct {
	Runs []any `json:"runs"`
}

SessionRunsData represents the data part of session runs response

type SessionRunsResponse

type SessionRunsResponse struct {
	Status bool `json:"status"`
	Data   any  `json:"data"`
}

SessionRunsResponse represents the response for session runs

type StandardResponse

type StandardResponse[T any] struct {
	Error   bool   `json:"error"`
	Data    T      `json:"data,omitempty"`
	Message string `json:"message,omitempty"`
}

StandardResponse represents the standard response format used by many endpoints

func NewResponse

func NewResponse[T any](data T, message string, error bool) StandardResponse[T]

type SubstrateActorEntry

type SubstrateActorEntry struct {
	ActorID                string `json:"actorId"`
	Status                 string `json:"status"`
	ActorTemplateNamespace string `json:"actorTemplateNamespace,omitempty"`
	ActorTemplateName      string `json:"actorTemplateName,omitempty"`
	AteomPodNamespace      string `json:"ateomPodNamespace,omitempty"`
	AteomPodName           string `json:"ateomPodName,omitempty"`
	AteomPodIP             string `json:"ateomPodIp,omitempty"`
	LastSnapshot           string `json:"lastSnapshot,omitempty"`
	InProgressSnapshot     string `json:"inProgressSnapshot,omitempty"`
	Version                int64  `json:"version,omitempty"`
}

SubstrateActorEntry is runtime state from ate-api (redis).

type SubstrateActorTemplateEntry

type SubstrateActorTemplateEntry struct {
	Namespace       string `json:"namespace"`
	Name            string `json:"name"`
	Phase           string `json:"phase,omitempty"`
	GoldenActorID   string `json:"goldenActorId,omitempty"`
	GoldenSnapshot  string `json:"goldenSnapshot,omitempty"`
	WorkerPoolRef   string `json:"workerPoolRef,omitempty"`
	HarnessName     string `json:"harnessName,omitempty"`
	ManagedByKagent bool   `json:"managedByKagent"`
}

SubstrateActorTemplateEntry is a ate.dev ActorTemplate CR.

type SubstrateAgentHarnessListEntry

type SubstrateAgentHarnessListEntry struct {
	Backend        v1alpha2.AgentHarnessBackendType `json:"backend"`
	Runtime        v1alpha2.AgentHarnessRuntime     `json:"runtime"`
	ActorID        string                           `json:"actorId,omitempty"`
	GatewayUIPath  string                           `json:"gatewayUIPath,omitempty"`
	ModelConfigRef string                           `json:"modelConfigRef,omitempty"`
	BackendRefID   string                           `json:"backendRefId,omitempty"`
	Endpoint       string                           `json:"endpoint,omitempty"`
}

SubstrateAgentHarnessListEntry is set when runtime is substrate.

type SubstrateStatusResponse

type SubstrateStatusResponse struct {
	// Enabled is true when the controller is configured with an ate-api endpoint.
	Enabled bool `json:"enabled"`
	// AteAPIError is set when ate-api list calls fail (actors/workers may be partial or empty).
	AteAPIError string `json:"ateApiError,omitempty"`

	WorkerPools    []SubstrateWorkerPoolEntry    `json:"workerPools"`
	ActorTemplates []SubstrateActorTemplateEntry `json:"actorTemplates"`
	Actors         []SubstrateActorEntry         `json:"actors"`
	Workers        []SubstrateWorkerEntry        `json:"workers"`
}

SubstrateStatusResponse aggregates Agent Substrate control-plane and Kubernetes state.

type SubstrateWorkerEntry

type SubstrateWorkerEntry struct {
	WorkerNamespace string `json:"workerNamespace"`
	WorkerPool      string `json:"workerPool"`
	WorkerPod       string `json:"workerPod"`
	ActorNamespace  string `json:"actorNamespace,omitempty"`
	ActorTemplate   string `json:"actorTemplate,omitempty"`
	ActorID         string `json:"actorId,omitempty"`
	IP              string `json:"ip,omitempty"`
	Version         int64  `json:"version,omitempty"`
}

SubstrateWorkerEntry is a worker assignment from ate-api (redis).

type SubstrateWorkerPoolEntry

type SubstrateWorkerPoolEntry struct {
	Namespace  string `json:"namespace"`
	Name       string `json:"name"`
	Replicas   int32  `json:"replicas"`
	AteomImage string `json:"ateomImage"`
}

SubstrateWorkerPoolEntry is a ate.dev WorkerPool CR.

type Task

type Task = database.Task

Run represents a run from the database

type Tool

type Tool = database.Tool

Tool represents a tool from the database

type ToolServerResponse

type ToolServerResponse struct {
	Ref             string              `json:"ref"`
	GroupKind       string              `json:"groupKind"`
	DiscoveredTools []*v1alpha2.MCPTool `json:"discoveredTools"`
}

ToolServerResponse represents a tool server response

type UpdateMemoryRequest

type UpdateMemoryRequest struct {
	PineconeParams *v1alpha1.PineconeConfig `json:"pinecone,omitempty"`
}

UpdateMemoryRequest represents a request to update a memory

type UpdateModelConfigRequest

type UpdateModelConfigRequest struct {
	APIKey  *string                  `json:"apiKey,omitempty"`
	Spec    v1alpha2.ModelConfigSpec `json:"spec"`
	Secrets []SecretMaterial         `json:"secrets,omitempty"`
}

UpdateModelConfigRequest is a thin wrapper: optional inline apiKey + full CRD spec.

type UpdatePromptTemplateRequest

type UpdatePromptTemplateRequest struct {
	Data map[string]string `json:"data"`
}

UpdatePromptTemplateRequest replaces the data map of an existing ConfigMap.

type VersionResponse

type VersionResponse struct {
	KAgentVersion string `json:"kagent_version"`
	GitCommit     string `json:"git_commit"`
	BuildDate     string `json:"build_date"`
}

Version represents the version information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL