templates

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2026 Teradata

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentTemplate

type AgentTemplate struct {
	Name         string                 `yaml:"name"`
	Description  string                 `yaml:"description"`
	BackendPath  string                 `yaml:"backend_path,omitempty"` // Path to backend configuration
	LLM          LLMTemplate            `yaml:"llm"`
	SystemPrompt string                 `yaml:"system_prompt"`
	Tools        ToolsTemplate          `yaml:"tools"`
	Memory       MemoryTemplate         `yaml:"memory"`
	Behavior     BehaviorTemplate       `yaml:"behavior"`
	Metadata     map[string]interface{} `yaml:"metadata"`
}

AgentTemplate represents the agent configuration in template

type BehaviorTemplate

type BehaviorTemplate struct {
	MaxIterations      int      `yaml:"max_iterations"`
	TimeoutSeconds     int      `yaml:"timeout_seconds"`
	AllowCodeExecution bool     `yaml:"allow_code_execution"`
	AllowedDomains     []string `yaml:"allowed_domains"`
}

BehaviorTemplate represents behavior configuration

type LLMTemplate

type LLMTemplate struct {
	Provider    string  `yaml:"provider"`
	Model       string  `yaml:"model"`
	Temperature float64 `yaml:"temperature"`
	MaxTokens   int     `yaml:"max_tokens"`
	TopP        float64 `yaml:"top_p"`
}

LLMTemplate represents LLM configuration

type MemoryTemplate

type MemoryTemplate struct {
	Type       string `yaml:"type"`
	Path       string `yaml:"path"`
	MaxHistory int    `yaml:"max_history"`
}

MemoryTemplate represents memory configuration

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry manages built-in agent templates

func NewRegistry

func NewRegistry() (*Registry, error)

NewRegistry creates a new template registry and loads all embedded templates

func (*Registry) Get

func (r *Registry) Get(name string) (*Template, error)

Get retrieves a template by name

func (*Registry) GetAll

func (r *Registry) GetAll() []*Template

GetAll returns all templates

func (*Registry) List

func (r *Registry) List() []string

List returns all available template names

func (*Registry) ListByDomain

func (r *Registry) ListByDomain(domain string) []*Template

ListByDomain returns templates matching the given domain

type Template

type Template struct {
	Name         string        `yaml:"-"` // Derived from filename
	Content      string        `yaml:"-"` // Raw YAML content
	Agent        AgentTemplate `yaml:"agent"`
	Variables    []string      `yaml:"-"` // Extracted from {{...}} placeholders
	Domain       string        `yaml:"-"` // From agent.metadata.domain
	Capabilities []string      `yaml:"-"` // From agent.metadata.capabilities
	Patterns     []string      `yaml:"-"` // From agent.metadata.patterns
}

Template represents an agent configuration template

type ToolsTemplate

type ToolsTemplate struct {
	Builtin []string      `yaml:"builtin"`
	MCP     []interface{} `yaml:"mcp"`
	Custom  []interface{} `yaml:"custom"`
}

ToolsTemplate represents tools configuration

Jump to

Keyboard shortcuts

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