Documentation
¶
Index ¶
- type AgentConfig
- type AgentConfigAlias
- type AgentConfigData
- type AgentConfigRepo
- func (r *AgentConfigRepo) Create(ctx context.Context, projectID uuid.UUID, req *CreateAgentConfigRequest) (*AgentConfig, error)
- func (r *AgentConfigRepo) CreateAlias(ctx context.Context, projectID, agentID uuid.UUID, req *CreateAliasRequest) (*AgentConfigAlias, error)
- func (r *AgentConfigRepo) CreateVersion(ctx context.Context, agentID uuid.UUID) (*AgentConfig, error)
- func (r *AgentConfigRepo) Delete(ctx context.Context, agentID uuid.UUID) error
- func (r *AgentConfigRepo) DeleteAlias(ctx context.Context, projectID, id uuid.UUID) error
- func (r *AgentConfigRepo) DeleteByName(ctx context.Context, projectID uuid.UUID, name string) error
- func (r *AgentConfigRepo) DeleteVersion(ctx context.Context, agentID uuid.UUID, version int) error
- func (r *AgentConfigRepo) Exists(ctx context.Context, projectID uuid.UUID, name string) (bool, error)
- func (r *AgentConfigRepo) GetAgentIDByName(ctx context.Context, projectID uuid.UUID, name string) (uuid.UUID, error)
- func (r *AgentConfigRepo) GetAlias(ctx context.Context, projectID, id uuid.UUID) (*AgentConfigAlias, error)
- func (r *AgentConfigRepo) GetAliasByName(ctx context.Context, projectID, agentID uuid.UUID, name string) (*AgentConfigAlias, error)
- func (r *AgentConfigRepo) GetByAgentIDAndVersion(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID, version int) (*AgentConfig, error)
- func (r *AgentConfigRepo) GetByID(ctx context.Context, projectID, id uuid.UUID) (*AgentConfig, error)
- func (r *AgentConfigRepo) GetByNameAndVersion(ctx context.Context, projectID uuid.UUID, name string, version int) (*AgentConfig, error)
- func (r *AgentConfigRepo) GetLatestByName(ctx context.Context, projectID uuid.UUID, name string) (*AgentConfig, error)
- func (r *AgentConfigRepo) List(ctx context.Context, projectID uuid.UUID) ([]*AgentConfigSummary, error)
- func (r *AgentConfigRepo) ListAliases(ctx context.Context, projectID, agentID uuid.UUID) ([]*AgentConfigAlias, error)
- func (r *AgentConfigRepo) ListVersions(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID) ([]*AgentConfig, error)
- func (r *AgentConfigRepo) ListVersionsByName(ctx context.Context, projectID uuid.UUID, name string) ([]*AgentConfig, error)
- func (r *AgentConfigRepo) UpdateAlias(ctx context.Context, projectID, id uuid.UUID, req *UpdateAliasRequest) (*AgentConfigAlias, error)
- func (r *AgentConfigRepo) UpdateVersion0(ctx context.Context, agentID uuid.UUID, req *UpdateAgentConfigRequest) (*AgentConfig, error)
- type AgentConfigService
- func (s *AgentConfigService) CommitSkill(ctx context.Context, projectID uuid.UUID, agentName string, skillFolder string) (string, error)
- func (s *AgentConfigService) Create(ctx context.Context, projectID uuid.UUID, req *CreateAgentConfigRequest) (*AgentConfig, error)
- func (s *AgentConfigService) CreateAlias(ctx context.Context, projectID uuid.UUID, agentName string, ...) (*AgentConfigAlias, error)
- func (s *AgentConfigService) CreateAliasByAgentID(ctx context.Context, projectID, agentID uuid.UUID, req *CreateAliasRequest) (*AgentConfigAlias, error)
- func (s *AgentConfigService) CreateVersion(ctx context.Context, agentID uuid.UUID) (*AgentConfig, error)
- func (s *AgentConfigService) CreateVersionByName(ctx context.Context, projectID uuid.UUID, name string) (*AgentConfig, error)
- func (s *AgentConfigService) Delete(ctx context.Context, agentID uuid.UUID) error
- func (s *AgentConfigService) DeleteAlias(ctx context.Context, projectID, id uuid.UUID) error
- func (s *AgentConfigService) DeleteByName(ctx context.Context, projectID uuid.UUID, name string) error
- func (s *AgentConfigService) DeleteSavedSkill(ctx context.Context, projectID uuid.UUID, agentName string, skillFolder string) error
- func (s *AgentConfigService) DeleteTempSkill(ctx context.Context, projectID uuid.UUID, agentName string, skillFolder string) error
- func (s *AgentConfigService) DeleteVersion(ctx context.Context, agentID uuid.UUID, version int) error
- func (s *AgentConfigService) GetAgentVersionByAlias(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID, aliasName string) (int, error)
- func (s *AgentConfigService) GetAlias(ctx context.Context, projectID, id uuid.UUID) (*AgentConfigAlias, error)
- func (s *AgentConfigService) GetAliasByName(ctx context.Context, projectID uuid.UUID, agentName, aliasName string) (*AgentConfigAlias, error)
- func (s *AgentConfigService) GetByAgentIDAndVersion(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID, version int) (*AgentConfig, error)
- func (s *AgentConfigService) GetByID(ctx context.Context, projectID, id uuid.UUID) (*AgentConfig, error)
- func (s *AgentConfigService) GetByNameAndVersion(ctx context.Context, projectID uuid.UUID, name string, version int) (*AgentConfig, error)
- func (s *AgentConfigService) GetLatestByName(ctx context.Context, projectID uuid.UUID, name string) (*AgentConfig, error)
- func (s *AgentConfigService) List(ctx context.Context, projectID uuid.UUID) ([]*AgentConfigSummary, error)
- func (s *AgentConfigService) ListAliases(ctx context.Context, projectID uuid.UUID, agentName string) ([]*AgentConfigAlias, error)
- func (s *AgentConfigService) ListAliasesByAgentID(ctx context.Context, projectID, agentID uuid.UUID) ([]*AgentConfigAlias, error)
- func (s *AgentConfigService) ListVersions(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID) ([]*AgentConfig, error)
- func (s *AgentConfigService) ListVersionsByName(ctx context.Context, projectID uuid.UUID, name string) ([]*AgentConfig, error)
- func (s *AgentConfigService) UpdateAlias(ctx context.Context, projectID, id uuid.UUID, req *UpdateAliasRequest) (*AgentConfigAlias, error)
- func (s *AgentConfigService) UpdateVersion0(ctx context.Context, agentID uuid.UUID, req *UpdateAgentConfigRequest) (*AgentConfig, error)
- func (s *AgentConfigService) UpdateVersion0ByName(ctx context.Context, projectID uuid.UUID, name string, ...) (*AgentConfig, error)
- func (s *AgentConfigService) UploadSkillToTemp(ctx context.Context, projectID uuid.UUID, agentName string, zipData []byte, ...) (*TempSkillUploadResponse, error)
- type AgentConfigSummary
- type CodeExecutionToolConfig
- type CreateAgentConfigRequest
- type CreateAliasRequest
- type CreateVersionRequest
- type FileSystem
- type HistoryConfig
- type ImageGenerationToolConfig
- type MCPServerConfig
- type ModelConfig
- type PromptConfig
- type SandboxToolConfig
- type SchemaConfig
- type SkillConfig
- type SummarizerConfig
- type TempSkillUploadResponse
- type ToolConfig
- type UpdateAgentConfigRequest
- type UpdateAliasRequest
- type WebSearchToolConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
ID uuid.UUID `json:"id" db:"id"` // Row ID (unique per row)
AgentID uuid.UUID `json:"agent_id" db:"agent_id"` // Stable UUID per agent (shared across versions)
ProjectID uuid.UUID `json:"project_id" db:"project_id"`
Name string `json:"name" db:"name"`
Version int `json:"version" db:"version"` // Version number (0 is mutable, 1+ are immutable)
Immutable bool `json:"immutable" db:"immutable"` // true for versions > 0, false for version 0
Config AgentConfigData `json:"config" db:"config"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
AgentConfig represents a versioned agent configuration stored in the database
func (*AgentConfig) GetName ¶ added in v0.1.18
func (c *AgentConfig) GetName() string
type AgentConfigAlias ¶
type AgentConfigAlias struct {
ID uuid.UUID `json:"id" db:"id"`
ProjectID uuid.UUID `json:"project_id" db:"project_id"`
AgentID uuid.UUID `json:"agent_id" db:"agent_id"`
Name string `json:"name" db:"name"`
Version1 int `json:"version1" db:"version1"` // Required: at least one version
Version2 *int `json:"version2,omitempty" db:"version2"` // Optional: second version
Weight *int `json:"weight,omitempty" db:"weight"` // Weight for version2 (0-100), required if version2 is set
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
AgentConfigAlias represents a named mapping to one or two agent versions
type AgentConfigData ¶
type AgentConfigData struct {
MaxIteration *int `json:"max_iteration,omitempty"`
Runtime *string `json:"runtime,omitempty"` // "Local", "Restate", or "Temporal"
Model *ModelConfig `json:"model,omitempty"`
Prompt *PromptConfig `json:"prompt,omitempty"`
Schema *SchemaConfig `json:"schema,omitempty"`
MCPServers []MCPServerConfig `json:"mcp_servers,omitempty"`
History *HistoryConfig `json:"history,omitempty"`
Tools *ToolConfig `json:"tools,omitempty"`
Skills []SkillConfig `json:"skills,omitempty"` // Skills attached to this agent
}
AgentConfigData represents the complete JSON configuration stored in the config column
func (*AgentConfigData) Scan ¶
func (c *AgentConfigData) Scan(value interface{}) error
Scan implements the sql.Scanner interface for database/sql
type AgentConfigRepo ¶
type AgentConfigRepo struct {
// contains filtered or unexported fields
}
AgentConfigRepo handles database operations for agent configs
func NewAgentConfigRepo ¶
func NewAgentConfigRepo(db *sqlx.DB) *AgentConfigRepo
NewAgentConfigRepo creates a new agent config repository
func (*AgentConfigRepo) Create ¶
func (r *AgentConfigRepo) Create(ctx context.Context, projectID uuid.UUID, req *CreateAgentConfigRequest) (*AgentConfig, error)
Create creates a new agent config with agent_id and version 0
func (*AgentConfigRepo) CreateAlias ¶
func (r *AgentConfigRepo) CreateAlias(ctx context.Context, projectID, agentID uuid.UUID, req *CreateAliasRequest) (*AgentConfigAlias, error)
CreateAlias creates a new alias for an agent config
func (*AgentConfigRepo) CreateVersion ¶
func (r *AgentConfigRepo) CreateVersion(ctx context.Context, agentID uuid.UUID) (*AgentConfig, error)
CreateVersion creates a new immutable version from version 0
func (*AgentConfigRepo) DeleteAlias ¶
DeleteAlias deletes an alias by ID
func (*AgentConfigRepo) DeleteByName ¶
DeleteByName deletes all versions of an agent config by name
func (*AgentConfigRepo) DeleteVersion ¶
DeleteVersion deletes a specific version of an agent config
func (*AgentConfigRepo) Exists ¶
func (r *AgentConfigRepo) Exists(ctx context.Context, projectID uuid.UUID, name string) (bool, error)
Exists checks if an agent config with the given name exists
func (*AgentConfigRepo) GetAgentIDByName ¶
func (r *AgentConfigRepo) GetAgentIDByName(ctx context.Context, projectID uuid.UUID, name string) (uuid.UUID, error)
GetAgentIDByName retrieves the agent_id for a given name
func (*AgentConfigRepo) GetAlias ¶
func (r *AgentConfigRepo) GetAlias(ctx context.Context, projectID, id uuid.UUID) (*AgentConfigAlias, error)
GetAlias retrieves an alias by ID
func (*AgentConfigRepo) GetAliasByName ¶
func (r *AgentConfigRepo) GetAliasByName(ctx context.Context, projectID, agentID uuid.UUID, name string) (*AgentConfigAlias, error)
GetAliasByName retrieves an alias by agent_id and name
func (*AgentConfigRepo) GetByAgentIDAndVersion ¶
func (r *AgentConfigRepo) GetByAgentIDAndVersion(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID, version int) (*AgentConfig, error)
GetByAgentIDAndVersion retrieves an agent config by agent_id and version
func (*AgentConfigRepo) GetByID ¶
func (r *AgentConfigRepo) GetByID(ctx context.Context, projectID, id uuid.UUID) (*AgentConfig, error)
GetByID retrieves an agent config by row ID
func (*AgentConfigRepo) GetByNameAndVersion ¶
func (r *AgentConfigRepo) GetByNameAndVersion(ctx context.Context, projectID uuid.UUID, name string, version int) (*AgentConfig, error)
GetByNameAndVersion retrieves an agent config by name and version (for backward compatibility)
func (*AgentConfigRepo) GetLatestByName ¶
func (r *AgentConfigRepo) GetLatestByName(ctx context.Context, projectID uuid.UUID, name string) (*AgentConfig, error)
GetLatestByName retrieves version 0 (the mutable version) of an agent config by name
func (*AgentConfigRepo) List ¶
func (r *AgentConfigRepo) List(ctx context.Context, projectID uuid.UUID) ([]*AgentConfigSummary, error)
List retrieves all unique agent configs (version 0 summary) for a project
func (*AgentConfigRepo) ListAliases ¶
func (r *AgentConfigRepo) ListAliases(ctx context.Context, projectID, agentID uuid.UUID) ([]*AgentConfigAlias, error)
ListAliases retrieves all aliases for an agent
func (*AgentConfigRepo) ListVersions ¶
func (r *AgentConfigRepo) ListVersions(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID) ([]*AgentConfig, error)
ListVersions retrieves all versions of an agent config by agent_id
func (*AgentConfigRepo) ListVersionsByName ¶
func (r *AgentConfigRepo) ListVersionsByName(ctx context.Context, projectID uuid.UUID, name string) ([]*AgentConfig, error)
ListVersionsByName retrieves all versions of an agent config by name (for backward compatibility)
func (*AgentConfigRepo) UpdateAlias ¶
func (r *AgentConfigRepo) UpdateAlias(ctx context.Context, projectID, id uuid.UUID, req *UpdateAliasRequest) (*AgentConfigAlias, error)
UpdateAlias updates an existing alias
func (*AgentConfigRepo) UpdateVersion0 ¶
func (r *AgentConfigRepo) UpdateVersion0(ctx context.Context, agentID uuid.UUID, req *UpdateAgentConfigRequest) (*AgentConfig, error)
UpdateVersion0 updates version 0 in place (mutable)
type AgentConfigService ¶
type AgentConfigService struct {
// contains filtered or unexported fields
}
AgentConfigService handles business logic for agent configs
func NewAgentConfigService ¶
func NewAgentConfigService(repo *AgentConfigRepo, fs FileSystem) *AgentConfigService
NewAgentConfigService creates a new agent config service
func (*AgentConfigService) CommitSkill ¶ added in v0.2.0
func (s *AgentConfigService) CommitSkill(ctx context.Context, projectID uuid.UUID, agentName string, skillFolder string) (string, error)
CommitSkill moves a skill from temp to the permanent skills directory
func (*AgentConfigService) Create ¶
func (s *AgentConfigService) Create(ctx context.Context, projectID uuid.UUID, req *CreateAgentConfigRequest) (*AgentConfig, error)
Create creates a new agent config with version 0
func (*AgentConfigService) CreateAlias ¶
func (s *AgentConfigService) CreateAlias(ctx context.Context, projectID uuid.UUID, agentName string, req *CreateAliasRequest) (*AgentConfigAlias, error)
CreateAlias creates a new alias for an agent config
func (*AgentConfigService) CreateAliasByAgentID ¶
func (s *AgentConfigService) CreateAliasByAgentID(ctx context.Context, projectID, agentID uuid.UUID, req *CreateAliasRequest) (*AgentConfigAlias, error)
CreateAliasByAgentID creates a new alias for an agent config by agent_id
func (*AgentConfigService) CreateVersion ¶
func (s *AgentConfigService) CreateVersion(ctx context.Context, agentID uuid.UUID) (*AgentConfig, error)
CreateVersion creates a new immutable version from version 0
func (*AgentConfigService) CreateVersionByName ¶
func (s *AgentConfigService) CreateVersionByName(ctx context.Context, projectID uuid.UUID, name string) (*AgentConfig, error)
CreateVersionByName creates a new immutable version by name (for backward compatibility)
func (*AgentConfigService) DeleteAlias ¶
DeleteAlias deletes an alias by ID
func (*AgentConfigService) DeleteByName ¶
func (s *AgentConfigService) DeleteByName(ctx context.Context, projectID uuid.UUID, name string) error
DeleteByName deletes all versions of an agent config by name
func (*AgentConfigService) DeleteSavedSkill ¶ added in v0.2.0
func (s *AgentConfigService) DeleteSavedSkill(ctx context.Context, projectID uuid.UUID, agentName string, skillFolder string) error
DeleteSavedSkill removes a committed skill from the agent's skills directory
func (*AgentConfigService) DeleteTempSkill ¶ added in v0.2.0
func (s *AgentConfigService) DeleteTempSkill(ctx context.Context, projectID uuid.UUID, agentName string, skillFolder string) error
DeleteTempSkill removes a skill from the agent's temp directory
func (*AgentConfigService) DeleteVersion ¶
func (s *AgentConfigService) DeleteVersion(ctx context.Context, agentID uuid.UUID, version int) error
DeleteVersion deletes a specific version of an agent config
func (*AgentConfigService) GetAgentVersionByAlias ¶ added in v0.1.17
func (s *AgentConfigService) GetAgentVersionByAlias(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID, aliasName string) (int, error)
GetAgentVersionByAlias retrieves an alias by agent name and alias name
func (*AgentConfigService) GetAlias ¶
func (s *AgentConfigService) GetAlias(ctx context.Context, projectID, id uuid.UUID) (*AgentConfigAlias, error)
GetAlias retrieves an alias by ID
func (*AgentConfigService) GetAliasByName ¶
func (s *AgentConfigService) GetAliasByName(ctx context.Context, projectID uuid.UUID, agentName, aliasName string) (*AgentConfigAlias, error)
GetAliasByName retrieves an alias by agent name and alias name
func (*AgentConfigService) GetByAgentIDAndVersion ¶
func (s *AgentConfigService) GetByAgentIDAndVersion(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID, version int) (*AgentConfig, error)
GetByAgentIDAndVersion retrieves an agent config by agent_id and version
func (*AgentConfigService) GetByID ¶
func (s *AgentConfigService) GetByID(ctx context.Context, projectID, id uuid.UUID) (*AgentConfig, error)
GetByID retrieves an agent config by row ID
func (*AgentConfigService) GetByNameAndVersion ¶
func (s *AgentConfigService) GetByNameAndVersion(ctx context.Context, projectID uuid.UUID, name string, version int) (*AgentConfig, error)
GetByNameAndVersion retrieves an agent config by name and version (for backward compatibility)
func (*AgentConfigService) GetLatestByName ¶
func (s *AgentConfigService) GetLatestByName(ctx context.Context, projectID uuid.UUID, name string) (*AgentConfig, error)
GetLatestByName retrieves version 0 (the mutable version) of an agent config by name
func (*AgentConfigService) List ¶
func (s *AgentConfigService) List(ctx context.Context, projectID uuid.UUID) ([]*AgentConfigSummary, error)
List retrieves all agent configs for a project
func (*AgentConfigService) ListAliases ¶
func (s *AgentConfigService) ListAliases(ctx context.Context, projectID uuid.UUID, agentName string) ([]*AgentConfigAlias, error)
ListAliases lists all aliases for an agent by name
func (*AgentConfigService) ListAliasesByAgentID ¶
func (s *AgentConfigService) ListAliasesByAgentID(ctx context.Context, projectID, agentID uuid.UUID) ([]*AgentConfigAlias, error)
ListAliasesByAgentID lists all aliases for an agent by agent_id
func (*AgentConfigService) ListVersions ¶
func (s *AgentConfigService) ListVersions(ctx context.Context, projectID uuid.UUID, agentID uuid.UUID) ([]*AgentConfig, error)
ListVersions retrieves all versions of an agent config by agent_id
func (*AgentConfigService) ListVersionsByName ¶
func (s *AgentConfigService) ListVersionsByName(ctx context.Context, projectID uuid.UUID, name string) ([]*AgentConfig, error)
ListVersionsByName retrieves all versions of an agent config by name (for backward compatibility)
func (*AgentConfigService) UpdateAlias ¶
func (s *AgentConfigService) UpdateAlias(ctx context.Context, projectID, id uuid.UUID, req *UpdateAliasRequest) (*AgentConfigAlias, error)
UpdateAlias updates an existing alias
func (*AgentConfigService) UpdateVersion0 ¶
func (s *AgentConfigService) UpdateVersion0(ctx context.Context, agentID uuid.UUID, req *UpdateAgentConfigRequest) (*AgentConfig, error)
UpdateVersion0 updates version 0 in place (mutable)
func (*AgentConfigService) UpdateVersion0ByName ¶
func (s *AgentConfigService) UpdateVersion0ByName(ctx context.Context, projectID uuid.UUID, name string, req *UpdateAgentConfigRequest) (*AgentConfig, error)
UpdateVersion0ByName updates version 0 by name (for backward compatibility)
func (*AgentConfigService) UploadSkillToTemp ¶ added in v0.2.0
func (s *AgentConfigService) UploadSkillToTemp(ctx context.Context, projectID uuid.UUID, agentName string, zipData []byte, zipFileName string) (*TempSkillUploadResponse, error)
UploadSkillToTemp uploads a skill zip file to the agent's temp directory
type AgentConfigSummary ¶
type AgentConfigSummary struct {
ID uuid.UUID `json:"id" db:"id"` // Row ID of version 0
AgentID uuid.UUID `json:"agent_id" db:"agent_id"` // Stable UUID per agent
ProjectID uuid.UUID `json:"project_id" db:"project_id"`
Name string `json:"name" db:"name"`
LatestVersion int `json:"latest_version" db:"latest_version"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
AgentConfigSummary represents a summary of an agent config for listing
type CodeExecutionToolConfig ¶ added in v0.1.18
type CodeExecutionToolConfig struct {
Enabled bool `json:"enabled"`
}
CodeExecutionToolConfig represents parameters for the code execution tool
type CreateAgentConfigRequest ¶
type CreateAgentConfigRequest struct {
Name string `json:"name" validate:"required,min=1,max=255"`
Config AgentConfigData `json:"config" validate:"required"`
}
CreateAgentConfigRequest represents the request to create a new agent config
type CreateAliasRequest ¶
type CreateAliasRequest struct {
Name string `json:"name" validate:"required,min=1,max=255"`
Version1 int `json:"version1" validate:"required"`
Version2 *int `json:"version2,omitempty"`
Weight *int `json:"weight,omitempty" validate:"omitempty,min=0,max=100"`
}
CreateAliasRequest represents the request to create a new alias
type CreateVersionRequest ¶
type CreateVersionRequest struct {
}
CreateVersionRequest represents the request to create a new immutable version from version 0
type FileSystem ¶ added in v0.2.0
type FileSystem interface {
// CreateAgentDataDirectory creates the directory structure for an agent
CreateAgentDataDirectory(config *AgentConfig) error
// UploadSkillToTemp extracts a skill zip file to the agent's temp directory
// and parses the SKILL.md file to extract metadata.
// Returns the parsed skill info including name, description, and paths.
UploadSkillToTemp(agentName string, zipData []byte, zipFileName string) (*TempSkillUploadResponse, error)
// DeleteTempSkill removes a skill from the agent's temp directory
DeleteTempSkill(agentName string, skillFolder string) error
// CommitSkill moves a skill from temp to the permanent skills directory
// Returns the relative file location of the SKILL.md file
CommitSkill(agentName string, skillFolder string) (fileLocation string, err error)
// DeleteSavedSkill removes a committed skill from the agent's skills directory
DeleteSavedSkill(agentName string, skillFolder string) error
}
FileSystem defines the interface for file operations related to agent configurations. This abstraction allows for different storage backends (local disk, S3, GCP Storage, etc.)
type HistoryConfig ¶
type HistoryConfig struct {
Enabled bool `json:"enabled"`
Summarizer *SummarizerConfig `json:"summarizer,omitempty"` // Required when enabled is true
}
HistoryConfig represents conversation history configuration
type ImageGenerationToolConfig ¶ added in v0.1.18
type ImageGenerationToolConfig struct {
Enabled bool `json:"enabled"`
}
ImageGenerationToolConfig represents parameters for the image generation tool
type MCPServerConfig ¶
type MCPServerConfig struct {
Name string `json:"name"`
Endpoint string `json:"endpoint"`
Headers map[string]string `json:"headers,omitempty"`
ToolFilters []string `json:"tool_filters,omitempty"` // Tools to include (empty means all)
ToolsRequiringHumanApproval []string `json:"tools_requiring_human_approval,omitempty"` // Tools that need human approval
}
MCPServerConfig represents an MCP server configuration with tool filters
type ModelConfig ¶
type ModelConfig struct {
ProviderType string `json:"provider_type"` // e.g., "OpenAI", "Anthropic", "Gemini", "xAI"
ModelID string `json:"model_id"` // e.g., "gpt-4.1", "gpt-4o"
Parameters map[string]interface{} `json:"parameters,omitempty"` // Model parameters like temperature, max_tokens
}
ModelConfig represents model configuration embedded in agent config
type PromptConfig ¶
type PromptConfig struct {
// Use either RawPrompt OR (PromptID + Label), not both
RawPrompt *string `json:"raw_prompt,omitempty"` // Raw prompt text
PromptID *uuid.UUID `json:"prompt_id,omitempty"` // Reference to a prompt
Version *int `json:"version,omitempty"`
}
PromptConfig represents prompt configuration - either raw text or a reference to a prompt version
type SandboxToolConfig ¶ added in v0.1.18
type SandboxToolConfig struct {
Enabled bool `json:"enabled"`
DockerImage *string `json:"docker_image,omitempty"` // Optional Docker container image
}
SandboxToolConfig represents parameters for the sandbox tool
type SchemaConfig ¶
type SchemaConfig struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Schema *utils.RawMessage `json:"schema,omitempty"` // JSON Schema definition
SourceType *string `json:"source_type,omitempty"` // "manual", "go_struct", "typescript"
SourceContent *string `json:"source_content,omitempty"`
}
SchemaConfig represents output schema configuration
type SkillConfig ¶ added in v0.1.18
type SkillConfig struct {
Name string `json:"name"` // Skill name from SKILL.md frontmatter
Description string `json:"description"` // Skill description from SKILL.md frontmatter
FileLocation string `json:"file_location"` // Path to SKILL.md file relative to sandbox-data
}
SkillConfig represents a skill's metadata stored in the agent config
type SummarizerConfig ¶
type SummarizerConfig struct {
Type string `json:"type"` // "llm", "sliding_window", or "none"
LLMTokenThreshold *int `json:"llm_token_threshold,omitempty"` // For "llm" type
LLMKeepRecentCount *int `json:"llm_keep_recent_count,omitempty"` // For "llm" type
LLMSummarizerPrompt *PromptConfig `json:"llm_summarizer_prompt,omitempty"` // For "llm" type
LLMSummarizerModel *ModelConfig `json:"llm_summarizer_model,omitempty"` // For "llm" type
SlidingWindowKeepCount *int `json:"sliding_window_keep_count,omitempty"` // For "sliding_window" type
}
SummarizerConfig represents conversation summarization configuration
type TempSkillUploadResponse ¶ added in v0.1.18
type TempSkillUploadResponse struct {
Name string `json:"name"` // Skill name parsed from SKILL.md
Description string `json:"description"` // Skill description parsed from SKILL.md
TempPath string `json:"temp_path"` // Path to the temp folder where skill was extracted
SkillFolder string `json:"skill_folder"` // Folder name of the skill (from zip name)
}
TempSkillUploadResponse represents the response when uploading a skill to temp folder
type ToolConfig ¶ added in v0.1.18
type ToolConfig struct {
ImageGeneration *ImageGenerationToolConfig `json:"image_generation,omitempty"`
WebSearch *WebSearchToolConfig `json:"web_search,omitempty"`
CodeExecution *CodeExecutionToolConfig `json:"code_execution,omitempty"`
Sandbox *SandboxToolConfig `json:"sandbox,omitempty"`
}
ToolConfig represents tools enabled and their parameters
type UpdateAgentConfigRequest ¶
type UpdateAgentConfigRequest struct {
Config AgentConfigData `json:"config" validate:"required"`
}
UpdateAgentConfigRequest represents the request to update version 0 (mutable) or create a new version
type UpdateAliasRequest ¶
type UpdateAliasRequest struct {
Name string `json:"name,omitempty" validate:"omitempty,min=1,max=255"`
Version1 *int `json:"version1,omitempty"`
Version2 *int `json:"version2,omitempty"`
Weight *int `json:"weight,omitempty" validate:"omitempty,min=0,max=100"`
}
UpdateAliasRequest represents the request to update an existing alias
type WebSearchToolConfig ¶ added in v0.1.18
type WebSearchToolConfig struct {
Enabled bool `json:"enabled"`
}
WebSearchToolConfig represents parameters for the web search tool