config

package
v1.37.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompletionEndpoints = map[string]string{
	"anthropic":  "https://api.anthropic.com/v1/messages",
	"openai":     "https://api.openai.com/v1/chat/completions",
	"gemini":     "https://generativelanguage.googleapis.com/v1beta/models/%s:generateContent",
	"venice":     "https://api.venice.ai/api/v1/chat/completions",
	"openrouter": "https://openrouter.ai/api/v1/chat/completions",
	"fireworks":  "https://api.fireworks.ai/inference/v1/chat/completions",
	"groq":       "https://api.groq.com/openai/v1/chat/completions",
	"xai":        "https://api.x.ai/v1/chat/completions",
	"zai":        "https://api.z.ai/api/paas/v4/chat/completions",
	"novita":     "https://api.novita.ai/v3/openai/chat/completions",
	"moonshot":   "https://api.moonshot.cn/v1/chat/completions",
	"together":   "https://api.together.xyz/v1/chat/completions",
}

CompletionEndpoints maps providers to their chat completion API endpoints

View Source
var EmbeddingDimensions = map[string]int{
	"openai":      1536,
	"gemini":      768,
	"jina":        1024,
	"voyage":      1024,
	"cohere":      1024,
	"huggingface": 384,
	"ollama":      768,
}

EmbeddingDimensions maps providers to their embedding vector dimensions

View Source
var EmbeddingEndpoints = map[string]string{
	"openai":      "https://api.openai.com/v1/embeddings",
	"gemini":      "https://generativelanguage.googleapis.com/v1beta/models/%s:embedContent",
	"jina":        "https://api.jina.ai/v1/embeddings",
	"voyage":      "https://api.voyageai.com/v1/embeddings",
	"cohere":      "https://api.cohere.com/v1/embed",
	"huggingface": "https://api-inference.huggingface.co/models/%s",
}

EmbeddingEndpoints maps providers to their embedding API endpoints

View Source
var EmbeddingModels = map[string]string{
	"openai":      "text-embedding-3-small",
	"gemini":      "text-embedding-004",
	"jina":        "jina-embeddings-v3",
	"voyage":      "voyage-3.5-lite",
	"cohere":      "embed-english-v3.0",
	"huggingface": "BAAI/bge-small-en-v1.5",
	"ollama":      "nomic-embed-text",
}

EmbeddingModels maps providers to their default embedding models Updated: February 2026

View Source
var ProviderAPIKeyEnvVars = map[string]string{
	"anthropic":   "ANTHROPIC_API_KEY",
	"openai":      "OPENAI_API_KEY",
	"gemini":      "GEMINI_API_KEY",
	"venice":      "VENICE_API_KEY",
	"jina":        "JINA_API_KEY",
	"voyage":      "VOYAGE_API_KEY",
	"cohere":      "COHERE_API_KEY",
	"huggingface": "HUGGINGFACE_API_KEY",
	"openrouter":  "OPENROUTER_API_KEY",
	"zai":         "ZAI_API_KEY",
	"novita":      "NOVITA_API_KEY",
	"fireworks":   "FIREWORKS_API_KEY",
	"groq":        "GROQ_API_KEY",
	"xai":         "XAI_API_KEY",
	"moonshot":    "MOONSHOT_API_KEY",
	"together":    "TOGETHER_API_KEY",
}

ProviderAPIKeyEnvVars maps providers to their API key environment variable names

View Source
var SmallModels = map[string]string{
	"anthropic":  "claude-haiku-4-5",
	"openai":     "gpt-4.1-mini",
	"gemini":     "gemini-2.5-flash-lite",
	"venice":     "qwen3-4b",
	"groq":       "llama-3.1-8b-instant",
	"xai":        "grok-4-1-fast-non-reasoning",
	"openrouter": "meta-llama/llama-3.3-70b-instruct:free",
}

SmallModels maps providers to their small/fast models for internal tasks (memory decisions, summarization, etc.) Updated: February 2026 SmallModels maps providers to their small/fast models for internal tasks Providers with expensive inference get a dedicated cheap model here. Providers NOT listed here (fireworks, zai, novita, moonshot, together) reuse the main agent model since their inference cost is negligible.

Functions

func BuildFeatures

func BuildFeatures(cfg *AgentConfig) map[string]bool

BuildFeatures builds a features map from the agent configuration This is used to announce what features this agent has enabled

func DecisionProviderSupported added in v1.33.41

func DecisionProviderSupported(provider string) bool

DecisionProviderSupported checks if a provider supports chat completions

func EmbeddingProviderSupported added in v1.33.41

func EmbeddingProviderSupported(provider string) bool

EmbeddingProviderSupported checks if a provider supports embeddings

func GetAPIKey added in v1.33.41

func GetAPIKey(provider string) string

GetAPIKey returns the API key for a provider

func GetAgentRefreshInterval

func GetAgentRefreshInterval(agentsConfig *AgentsConfig) string

GetAgentRefreshInterval returns the discovery refresh interval Default: "10s"

func GetAllEmbeddingProviders added in v1.33.41

func GetAllEmbeddingProviders() map[string]EmbeddingProviderInfo

GetAllEmbeddingProviders returns all supported embedding providers with their default models

func GetAvailableDecisionProvider added in v1.33.41

func GetAvailableDecisionProvider(mainProvider string) string

GetAvailableDecisionProvider returns the provider to use for memory decisions Uses the same provider as the main LLM when possible

func GetAvailableEmbeddingProvider added in v1.33.41

func GetAvailableEmbeddingProvider(configuredProvider, mainProvider string) string

GetAvailableEmbeddingProvider returns the first available embedding provider Priority: explicit config > same as main provider > free options > ollama

func GetCompletionEndpoint added in v1.33.41

func GetCompletionEndpoint(provider string) string

GetCompletionEndpoint returns the chat completion API endpoint for a provider

func GetDecisionMode added in v1.33.41

func GetDecisionMode(memoryConfig *MemoryConfig) string

GetDecisionMode returns the memory decision mode Default: "differential" (pure RAG-based novelty detection)

func GetEmbeddingEndpoint added in v1.33.41

func GetEmbeddingEndpoint(provider string) string

GetEmbeddingEndpoint returns the embedding API endpoint for a provider

func GetEmbeddingModel

func GetEmbeddingModel(memoryConfig *MemoryConfig) string

GetEmbeddingModel returns the embedding model to use For OpenAI default: "text-embedding-3-small" For Ollama default: "nomic-embed-text"

func GetEmbeddingModelForProvider added in v1.33.41

func GetEmbeddingModelForProvider(provider string) string

GetEmbeddingModelForProvider returns the default embedding model for a provider

func GetEmbeddingProvider

func GetEmbeddingProvider(memoryConfig *MemoryConfig) string

GetEmbeddingProvider returns the embedding provider to use Default: "auto" (selects based on available API keys)

func GetMemoryChunkOverlap

func GetMemoryChunkOverlap(memoryConfig *MemoryConfig) int

GetMemoryChunkOverlap returns the chunk overlap for document ingestion Default: 200

func GetMemoryChunkSize

func GetMemoryChunkSize(memoryConfig *MemoryConfig) int

GetMemoryChunkSize returns the chunk size for document ingestion Default: 1000

func GetMemoryDocumentImportance

func GetMemoryDocumentImportance(memoryConfig *MemoryConfig) float64

GetMemoryDocumentImportance returns the default importance for document chunks Default: 0.5

func GetMemoryIngestTypes

func GetMemoryIngestTypes(memoryConfig *MemoryConfig) []string

GetMemoryIngestTypes returns the MIME types to auto-ingest Default: ["text/plain", "text/markdown", "application/json", "text/csv", "application/pdf"]

func GetMinSentenceWords added in v1.33.41

func GetMinSentenceWords(memoryConfig *MemoryConfig) int

GetMinSentenceWords returns the minimum words required for a sentence to be considered Default: 4

func GetNoveltyThreshold added in v1.33.41

func GetNoveltyThreshold(memoryConfig *MemoryConfig) float64

GetNoveltyThreshold returns the novelty threshold for differential mode Default: 0.80 (memories with similarity < 0.80 are considered novel)

func GetOllamaURL

func GetOllamaURL(memoryConfig *MemoryConfig) string

GetOllamaURL returns the Ollama API URL Default: "http://localhost:11434"

func GetParallelToolsPrompt

func GetParallelToolsPrompt() string

GetParallelToolsPrompt returns the system prompt for parallel tool execution

func GetSmallModel added in v1.33.41

func GetSmallModel(provider string) string

GetSmallModel returns the small/fast model for a given provider Used for internal tasks like memory decisions, summarization. Providers without a dedicated small model reuse the main agent model (cheap inference providers like Fireworks, Novita, Together, etc.)

func GetVersion added in v1.33.45

func GetVersion() string

GetVersion returns the agent version from VERSION file

func HasAPIKey added in v1.33.41

func HasAPIKey(provider string) bool

HasAPIKey checks if an API key is available for a provider

func IsAgentInjectionEnabled

func IsAgentInjectionEnabled(agentsConfig *AgentsConfig) bool

IsAgentInjectionEnabled checks if agent injection into system prompt is enabled Default: true (inject agents into prompt for immediate visibility)

func IsAutoExtractMemoriesEnabled

func IsAutoExtractMemoriesEnabled(memoryConfig *MemoryConfig) bool

IsAutoExtractMemoriesEnabled checks if auto memory extraction from conversations is enabled Default: true (when nil or not set)

func IsMemoryAutoIngestEnabled

func IsMemoryAutoIngestEnabled(memoryConfig *MemoryConfig) bool

IsMemoryAutoIngestEnabled checks if auto file ingestion is enabled

func IsParallelToolsEnabled

func IsParallelToolsEnabled(llmConfig LLMConfig) bool

IsParallelToolsEnabled checks if parallel tools are enabled in the LLM config Defaults to true if not explicitly configured

func IsTestMode

func IsTestMode(globalTestMode bool, subsystemTestMode *bool) bool

IsTestMode checks if test mode is enabled for a subsystem Priority: subsystem.test_mode > global.test_mode > false

func ShouldSkipQuestions added in v1.33.41

func ShouldSkipQuestions(memoryConfig *MemoryConfig) bool

ShouldSkipQuestions returns whether questions should be skipped in differential mode Default: true

Types

type AgentCommSettings

type AgentCommSettings struct {
	DefaultTimeout      string                `json:"default_timeout"`
	RetryCount          int                   `json:"retry_count"`
	RetryDelay          string                `json:"retry_delay"`
	MaxContextMessages  int                   `json:"max_context_messages"`
	AllowRecursiveCalls bool                  `json:"allow_recursive_calls"`
	MaxCallDepth        int                   `json:"max_call_depth"`
	TrackCallChain      bool                  `json:"track_call_chain"`
	CallTTL             string                `json:"call_ttl,omitempty"`        // Max time for entire call chain (e.g., "120s")
	CircuitBreaker      *CircuitBreakerConfig `json:"circuit_breaker,omitempty"` // Circuit breaker settings
}

type AgentConfig

type AgentConfig struct {
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	TestMode    bool              `json:"test_mode"`            // Global test mode - enables mocks for all subsystems
	SetupMode   bool              `json:"setup_mode"`           // Setup mode - agent can modify its own config
	PublicURL   string            `json:"public_url,omitempty"` // Public URL for this agent (e.g., https://agent.example.com)
	LLM         LLMConfig         `json:"llm"`
	MCP         *MCPConfig        `json:"mcp,omitempty"`
	Skills      *SkillsConfig     `json:"skills,omitempty"`
	Scheduler   *SchedulerConfig  `json:"scheduler,omitempty"`
	Tasks       *TasksConfig      `json:"tasks,omitempty"`
	Memory      *MemoryConfig     `json:"memory,omitempty"`
	Operator    *OperatorConfig   `json:"operator,omitempty"`
	Context     *ContextConfig    `json:"context,omitempty"`
	Agents      *AgentsConfig     `json:"agents,omitempty"`
	FileSystem  *FileSystemConfig `json:"filesystem,omitempty"`
	Realtime    *RealtimeConfig   `json:"realtime,omitempty"`
	Telemetry   *TelemetryConfig  `json:"telemetry,omitempty"`
	Reflection  *ReflectionConfig `json:"reflection,omitempty"`
	Version     string            `json:"version"`
}

type AgentInfo

type AgentInfo struct {
	ID           string          `json:"id"`
	Name         string          `json:"name"`
	Description  string          `json:"description"`
	URL          string          `json:"url"`
	APIKey       string          `json:"api_key,omitempty"`
	Capabilities []string        `json:"capabilities"`
	MCPServers   []string        `json:"mcp_servers,omitempty"`
	Tags         []string        `json:"tags"`
	Enabled      bool            `json:"enabled"`
	Timeout      string          `json:"timeout"`
	Features     map[string]bool `json:"features,omitempty"` // Enabled features: tasks, memory, filesystem, mcp, operator, scheduler, voice, agents
}

type AgentsConfig

type AgentsConfig struct {
	Enabled          bool              `json:"enabled"`
	Mode             string            `json:"mode,omitempty"`               // "coordinator" | "worker" (default: "coordinator")
	Group            string            `json:"group,omitempty"`              // Discovery group name (e.g., "production", "staging")
	DiscoveryMethod  string            `json:"discovery_method,omitempty"`   // "file" | "mdns" | "ssdp" | "manual" (default: "file")
	FileRegistryPath string            `json:"file_registry_path,omitempty"` // Path for file-based discovery (default: "/tmp/apteva-agents")
	GossipSeed       string            `json:"gossip_seed,omitempty"`        // Gossip seed address (triggers gossip mode)
	GossipPort       int               `json:"gossip_port,omitempty"`        // Gossip port (default: 7946)
	AvailableAgents  []AgentInfo       `json:"available_agents,omitempty"`   // Manual mode (legacy/fallback)
	Settings         AgentCommSettings `json:"settings"`
	InjectIntoPrompt *bool             `json:"inject_into_prompt,omitempty"` // Inject discovered agents into system prompt (default: true)
	RefreshInterval  string            `json:"refresh_interval,omitempty"`   // Discovery refresh interval (default: "10s")
}

func (*AgentsConfig) IsCoordinatorMode

func (c *AgentsConfig) IsCoordinatorMode() bool

IsCoordinatorMode returns true if this agent can call other agents

func (*AgentsConfig) IsWorkerMode

func (c *AgentsConfig) IsWorkerMode() bool

IsWorkerMode returns true if this agent is in worker mode (receive-only)

type BM25Config

type BM25Config struct {
	TopK      int     `json:"top_k"`     // Number of top tools to load (default: 10)
	Threshold float64 `json:"threshold"` // Min score to include (default: 0.2)
}

BM25Config for BM25-based automatic tool loading

type BuiltinToolConfig

type BuiltinToolConfig struct {
	Type             string              `json:"type"` // "web_search_20250305", "web_fetch_20250910", "computer_20250124"
	Name             string              `json:"name"` // "web_search", "web_fetch", "computer"
	MaxUses          *int                `json:"max_uses,omitempty"`
	AllowedDomains   []string            `json:"allowed_domains,omitempty"`
	BlockedDomains   []string            `json:"blocked_domains,omitempty"`
	UserLocation     *UserLocationConfig `json:"user_location,omitempty"`
	Citations        *CitationsConfig    `json:"citations,omitempty"`          // For web_fetch
	MaxContentTokens *int                `json:"max_content_tokens,omitempty"` // For web_fetch
	DisplayWidthPx   *int                `json:"display_width_px,omitempty"`   // For computer tool
	DisplayHeightPx  *int                `json:"display_height_px,omitempty"`  // For computer tool
	DisplayNumber    *int                `json:"display_number,omitempty"`     // For computer tool
}

type CircuitBreakerConfig

type CircuitBreakerConfig struct {
	Enabled          bool   `json:"enabled"`           // Enable circuit breaker
	FailureThreshold int    `json:"failure_threshold"` // Failures before opening (default: 3)
	ResetAfter       string `json:"reset_after"`       // Time before resetting failure count (default: "2m")
	OpenDuration     string `json:"open_duration"`     // How long circuit stays open (default: "30s")
}

CircuitBreakerConfig configures the circuit breaker for agent calls

type CitationsConfig

type CitationsConfig struct {
	Enabled bool `json:"enabled"`
}

type CompactionConfig

type CompactionConfig struct {
	Enabled          bool    `json:"enabled"`            // Enable auto-compaction (default: true)
	TriggerRatio     float64 `json:"trigger_ratio"`      // Compact when context reaches X% of max_tokens (default: 0.7)
	KeepRecent       int     `json:"keep_recent"`        // Never compact last N messages (default: 20)
	SummaryMaxTokens int     `json:"summary_max_tokens"` // Max tokens for summary block (default: 1500)
	Model            string  `json:"model"`              // Model for summarization (default: "claude-haiku-4")
}

type Config

type Config struct {
	Agent AgentConfig `json:"agent"`
	// contains filtered or unexported fields
}

func GetConfig

func GetConfig() *Config

func (*Config) Get

func (c *Config) Get() AgentConfig

func (*Config) GetLLMConfig

func (c *Config) GetLLMConfig() LLMConfig

func (*Config) IsSetupMode

func (c *Config) IsSetupMode() bool

IsSetupMode returns true if the agent is in setup mode

func (*Config) Load

func (c *Config) Load() error

func (*Config) Reset

func (c *Config) Reset() error

func (*Config) Save

func (c *Config) Save() error

func (*Config) Set

func (c *Config) Set(newConfig AgentConfig)

Set updates the agent config in memory without saving

func (*Config) SetSetupMode

func (c *Config) SetSetupMode(enabled bool) error

SetSetupMode enables or disables setup mode

func (*Config) Update

func (c *Config) Update(newConfig AgentConfig) error

type ContextConfig

type ContextConfig struct {
	MaxMessages  int               `json:"max_messages"` // Keep last N messages (0 = unlimited) - fallback if max_tokens not set
	MaxTokens    int               `json:"max_tokens"`   // Max estimated tokens to keep (0 = use max_messages instead)
	KeepImages   int               `json:"keep_images"`  // Keep images only in last N messages (0 = keep all)
	Compaction   *CompactionConfig `json:"compaction,omitempty"`
	SummaryModel string            `json:"summary_model,omitempty"` // Model for thread activity summaries (default: "claude-haiku-4-5")
}

type EmbeddingProviderInfo added in v1.33.41

type EmbeddingProviderInfo struct {
	Provider     string `json:"provider"`
	DefaultModel string `json:"default_model"`
	Dimensions   int    `json:"dimensions"`
	HasAPIKey    bool   `json:"has_api_key"`
	EnvVar       string `json:"env_var"`
}

EmbeddingProviderInfo contains info about an embedding provider

type ExternalMCPServer

type ExternalMCPServer struct {
	Name    string            `json:"name"`              // Unique name for this server (e.g., "time", "fetch")
	Type    string            `json:"type,omitempty"`    // "http" (default) or "stdio"
	URL     string            `json:"url,omitempty"`     // Server endpoint URL for HTTP type
	Headers map[string]string `json:"headers,omitempty"` // Optional headers for HTTP auth
	Command []string          `json:"command,omitempty"` // Command to run for stdio type (e.g., ["npx", "-y", "@dangahagan/weather-mcp"])
	Args    []string          `json:"args,omitempty"`    // Additional arguments for stdio command
	Env     map[string]string `json:"env,omitempty"`     // Environment variables for stdio command
	Enabled bool              `json:"enabled"`           // Whether to connect to this server
}

ExternalMCPServer configures a connection to an external standard MCP server

type FileSystemConfig

type FileSystemConfig struct {
	Enabled        bool     `json:"enabled"`          // Master toggle (default: false)
	MaxFileSize    int64    `json:"max_file_size"`    // Max single file size in bytes (default: 10MB)
	MaxTotalSize   int64    `json:"max_total_size"`   // Max total storage in bytes (default: 100MB)
	AutoExtract    bool     `json:"auto_extract"`     // Auto-extract base64 from messages (default: true)
	MinExtractSize int      `json:"min_extract_size"` // Only extract if base64 > N bytes (default: 10KB)
	Deduplication  bool     `json:"deduplication"`    // Use checksums to dedupe (default: true)
	AutoCleanup    bool     `json:"auto_cleanup"`     // Enable automatic cleanup (default: true)
	RetentionDays  int      `json:"retention_days"`   // Keep files for N days, 0 = forever (default: 7)
	CleanupOrphans bool     `json:"cleanup_orphans"`  // Remove files with no message reference (default: true)
	AllowedTypes   []string `json:"allowed_types"`    // File types to store (default: ["image", "document"])
}

type KeywordConfig

type KeywordConfig struct {
	Rules []KeywordRule `json:"rules"`
}

KeywordConfig for keyword-based tool loading

type KeywordRule

type KeywordRule struct {
	Keywords []string `json:"keywords"` // Words to match (case-insensitive)
	Tools    []string `json:"tools"`    // Tools to load
}

KeywordRule maps keywords to tools to load

type LLMConfig

type LLMConfig struct {
	Provider      string               `json:"provider"`
	Model         string               `json:"model"`
	MaxTokens     int                  `json:"max_tokens"`
	Temperature   *float64             `json:"temperature,omitempty"`
	SystemPrompt  string               `json:"system_prompt,omitempty"`
	Tools         []string             `json:"tools,omitempty"`
	BuiltinTools  []BuiltinToolConfig  `json:"builtin_tools,omitempty"`
	Vision        *VisionConfig        `json:"vision,omitempty"`
	ParallelTools *ParallelToolsConfig `json:"parallel_tools,omitempty"`
	ToolLoading   *ToolLoadingConfig   `json:"tool_loading,omitempty"`
}

type MCPConfig

type MCPConfig struct {
	Enabled     bool                     `json:"enabled"`
	BaseURL     string                   `json:"base_url,omitempty"`    // Backend API URL for subscriptions
	APIKey      string                   `json:"api_key,omitempty"`     // Backend API key for subscriptions
	TestMode    *bool                    `json:"test_mode,omitempty"`   // When true, MCP calls use mock responses. nil = use global test_mode
	Tools       []string                 `json:"tools,omitempty"`       // MCP tools to enable (e.g., ["geocode", "list-customers"])
	Credentials map[string]MCPCredential `json:"credentials,omitempty"` // MCP tool credentials
	Webhooks    []string                 `json:"webhooks,omitempty"`    // Webhook servers (e.g., ["stripe", "github"])
	Servers     []ExternalMCPServer      `json:"servers,omitempty"`     // External standard MCP servers
}

type MCPCredential

type MCPCredential struct {
	CredentialID string `json:"credential_id"` // Backend credential ID (from /credentials endpoint)
	Provider     string `json:"provider"`      // Provider name: "stripe", "github", etc.
	Name         string `json:"name"`          // Display name (optional, for reference)
}

type MemoryConfig

type MemoryConfig struct {
	Enabled             bool    `json:"enabled"`
	EmbeddingModel      string  `json:"embedding_model"`        // "text-embedding-3-small" or model for selected provider
	DecisionModel       string  `json:"decision_model"`         // Model for memory decisions (auto-selected if empty)
	MaxMemoriesPerQuery int     `json:"max_memories_per_query"` // 20
	MinImportance       float64 `json:"min_importance"`         // 0.3
	MinSimilarity       float64 `json:"min_similarity"`         // 0.3 - minimum cosine similarity for RAG retrieval
	AutoPrune           bool    `json:"auto_prune"`
	MaxMemories         int     `json:"max_memories"` // 10000

	// Embedding provider configuration
	// REQUIRED when memory is enabled - must be explicitly set
	// Options: "openai", "gemini", "jina", "voyage", "cohere", "huggingface", "ollama"
	EmbeddingProvider string `json:"embedding_provider"` // Required: "openai", "gemini", "jina", "voyage", "cohere", "huggingface", "ollama"
	OllamaURL         string `json:"ollama_url"`         // Ollama API URL (default: http://localhost:11434)

	// Decision model provider configuration
	// When empty or "auto", uses the same provider as main LLM with a small model
	DecisionProvider string `json:"decision_provider"` // "auto" (default), "anthropic", "openai", "gemini"

	// Differential memory mode - pure RAG-based novelty detection without LLM calls
	// "differential" (default): Uses embedding similarity to detect novel information
	// "llm": Uses LLM to decide what to remember (requires decision_provider)
	DecisionMode     string  `json:"decision_mode"`      // "differential" (default) or "llm"
	NoveltyThreshold float64 `json:"novelty_threshold"`  // Max similarity to existing memories to be considered novel (default: 0.80)
	MinSentenceWords int     `json:"min_sentence_words"` // Minimum words in a sentence to consider (default: 4)
	SkipQuestions    bool    `json:"skip_questions"`     // Skip storing questions (default: true)

	// Memory extraction from conversations
	AutoExtractMemories *bool `json:"auto_extract_memories"` // Auto-extract memories from conversations (default: true when nil)

	// File ingestion for RAG
	AutoIngestFiles    bool     `json:"auto_ingest_files"`   // Auto-chunk uploaded files into memories
	IngestTypes        []string `json:"ingest_types"`        // MIME types to ingest ["text/plain", "text/markdown"]
	ChunkSize          int      `json:"chunk_size"`          // Max characters per chunk (default: 1000)
	ChunkOverlap       int      `json:"chunk_overlap"`       // Overlap between chunks (default: 200)
	DocumentImportance float64  `json:"document_importance"` // Default importance for doc chunks (default: 0.5)
}

type OperatorConfig

type OperatorConfig struct {
	Enabled           bool     `json:"enabled"`
	VirtualBrowser    string   `json:"virtual_browser"`     // Virtual browser service URL (e.g., http://localhost:8098)
	TestMode          *bool    `json:"test_mode,omitempty"` // Use test mode (nil = use global test_mode)
	DisplayWidth      int      `json:"display_width"`       // 1024
	DisplayHeight     int      `json:"display_height"`      // 768
	AllowedDomains    []string `json:"allowed_domains,omitempty"`
	BlockedDomains    []string `json:"blocked_domains,omitempty"`
	MaxActionsPerTurn int      `json:"max_actions_per_turn"` // 5
}

type PDFConfig

type PDFConfig struct {
	Enabled     bool  `json:"enabled"`
	MaxFileSize int64 `json:"max_file_size"` // Max PDF size in bytes (default: 32MB)
	MaxPages    int   `json:"max_pages"`     // Max pages to process (default: 100)
	AllowURLs   bool  `json:"allow_urls"`    // Allow fetching PDFs from URLs
}

type ParallelToolsConfig

type ParallelToolsConfig struct {
	Enabled       bool `json:"enabled"`        // Enable parallel tool execution (default: true)
	MaxConcurrent int  `json:"max_concurrent"` // Max concurrent tool executions (default: 10)
}

type RealtimeConfig

type RealtimeConfig struct {
	Enabled      bool   `json:"enabled"`
	Provider     string `json:"provider"`      // "openai" or "gemini" (default: openai)
	Model        string `json:"model"`         // OpenAI: "gpt-4o-realtime-preview", "gpt-4o-realtime-preview-2024-12-17"
	GeminiModel  string `json:"gemini_model"`  // Gemini: "gemini-2.0-flash-exp"
	Voice        string `json:"voice"`         // OpenAI: "alloy", "ash", "ballad", "coral", "sage", "verse"
	GeminiVoice  string `json:"gemini_voice"`  // Gemini: "Aoede", "Charon", "Fenrir", "Kore", "Puck"
	VADType      string `json:"vad_type"`      // "semantic_vad" or "server_vad"
	GoogleSearch bool   `json:"google_search"` // Gemini: enable Google Search grounding
}

type ReflectionConfig added in v1.37.0

type ReflectionConfig struct {
	Enabled         bool   `json:"enabled"`
	Interval        string `json:"interval"`         // "6h", "12h", "24h"
	Prompt          string `json:"prompt"`           // Reflection prompt (agent can self-modify via config_set)
	AfterTask       bool   `json:"after_task"`       // Trigger after each task completes
	ConversationMin int    `json:"conversation_min"` // Trigger after N conversations (0=disabled)
	LookbackHours   int    `json:"lookback_hours"`   // How far back to analyze (default: 24)
}

type RegexConfig

type RegexConfig struct {
	Rules []RegexRule `json:"rules"`
}

RegexConfig for regex-based tool loading

type RegexRule

type RegexRule struct {
	Pattern string   `json:"pattern"` // Regex pattern to match against user message
	Tools   []string `json:"tools"`   // Tools to load (supports glob: "stripe:*")
}

RegexRule maps a regex pattern to tools to load

type SchedulerConfig

type SchedulerConfig struct {
	Enabled  bool   `json:"enabled"`
	Interval string `json:"interval"`  // "30s", "1m", "5m"
	MaxTasks int    `json:"max_tasks"` // Future: task limit
}

type Skill added in v1.33.54

type Skill struct {
	Name         string   `json:"name"`
	Description  string   `json:"description"`
	Instructions string   `json:"instructions"`
	Icon         string   `json:"icon,omitempty"`
	Category     string   `json:"category,omitempty"`
	Tags         []string `json:"tags,omitempty"`
	Tools        []string `json:"tools,omitempty"` // MCP/builtin tools this skill needs
	Enabled      bool     `json:"enabled"`
}

Skill represents a skill definition with instructions

type SkillsConfig

type SkillsConfig struct {
	Enabled     bool    `json:"enabled"`
	Definitions []Skill `json:"definitions,omitempty"` // Inline skill definitions
}

SkillsConfig configures skill-based instructions

type TasksConfig

type TasksConfig struct {
	Enabled         bool `json:"enabled"`
	AllowScheduling bool `json:"allow_scheduling"` // Can create future tasks
	AllowRecurring  bool `json:"allow_recurring"`  // Can create recurring tasks
	MaxTasks        int  `json:"max_tasks"`        // Maximum total tasks
	AutoExecute     bool `json:"auto_execute"`     // Auto-run immediate tasks
}

type TelemetryConfig

type TelemetryConfig struct {
	Enabled       bool     `json:"enabled"`
	Endpoint      string   `json:"endpoint"`                 // Remote endpoint URL
	APIKey        string   `json:"api_key,omitempty"`        // Optional auth key
	BatchSize     int      `json:"batch_size,omitempty"`     // Events per batch (default: 10)
	FlushInterval int      `json:"flush_interval,omitempty"` // Seconds between flushes (default: 30)
	Categories    []string `json:"categories,omitempty"`     // Filter categories (empty = all)
}

type ToolLoadingConfig

type ToolLoadingConfig struct {
	Mode       string         `json:"mode"`        // "full" (default), "on_demand"
	Strategy   string         `json:"strategy"`    // "regex", "bm25", "keyword" (only used when mode="on_demand")
	AlwaysLoad []string       `json:"always_load"` // Tools always included regardless of strategy
	MaxTools   int            `json:"max_tools"`   // Cap on loaded tools (default: 15)
	Regex      *RegexConfig   `json:"regex,omitempty"`
	BM25       *BM25Config    `json:"bm25,omitempty"`
	Keyword    *KeywordConfig `json:"keyword,omitempty"`
}

ToolLoadingConfig configures on-demand tool loading to reduce token usage

type UserLocationConfig

type UserLocationConfig struct {
	Type     string `json:"type"` // "approximate"
	City     string `json:"city"`
	Region   string `json:"region"`
	Country  string `json:"country"`
	Timezone string `json:"timezone"`
}

type VisionConfig

type VisionConfig struct {
	Enabled      bool       `json:"enabled"`
	MaxImages    int        `json:"max_images"`     // Per request
	MaxImageSize int64      `json:"max_image_size"` // In bytes
	AllowedTypes []string   `json:"allowed_types"`  // ["jpeg", "png", "gif", "webp"]
	ResizeImages bool       `json:"resize_images"`
	MaxDimension int        `json:"max_dimension"` // Max width/height in pixels
	PDFConfig    *PDFConfig `json:"pdf,omitempty"` // PDF-specific settings
}

Jump to

Keyboard shortcuts

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