Documentation
¶
Index ¶
- Variables
- func BuildFeatures(cfg *AgentConfig) map[string]bool
- func ComputerToolVersion(model string) string
- func ComputerUseBetaFlag(model string) string
- func DecisionProviderSupported(provider string) bool
- func EmbeddingProviderSupported(provider string) bool
- func GetAPIKey(provider string) string
- func GetAgentRefreshInterval(agentsConfig *AgentsConfig) string
- func GetAllEmbeddingProviders() map[string]EmbeddingProviderInfo
- func GetAvailableDecisionProvider(mainProvider string) string
- func GetAvailableEmbeddingProvider(configuredProvider, mainProvider string) string
- func GetCompletionEndpoint(provider string) string
- func GetDecisionMode(memoryConfig *MemoryConfig) string
- func GetEmbeddingEndpoint(provider string) string
- func GetEmbeddingModel(memoryConfig *MemoryConfig) string
- func GetEmbeddingModelForProvider(provider string) string
- func GetEmbeddingProvider(memoryConfig *MemoryConfig) string
- func GetMemoryChunkOverlap(memoryConfig *MemoryConfig) int
- func GetMemoryChunkSize(memoryConfig *MemoryConfig) int
- func GetMemoryDocumentImportance(memoryConfig *MemoryConfig) float64
- func GetMemoryIngestTypes(memoryConfig *MemoryConfig) []string
- func GetMinSentenceWords(memoryConfig *MemoryConfig) int
- func GetModelContextWindow(provider, model string) int
- func GetNoveltyThreshold(memoryConfig *MemoryConfig) float64
- func GetOllamaURL(memoryConfig *MemoryConfig) string
- func GetParallelToolsPrompt() string
- func GetSmallModel(provider string) string
- func GetVersion() string
- func HasAPIKey(provider string) bool
- func IsAgentInjectionEnabled(agentsConfig *AgentsConfig) bool
- func IsAutoExtractMemoriesEnabled(memoryConfig *MemoryConfig) bool
- func IsComputerTool(toolType string) bool
- func IsMemoryAutoIngestEnabled(memoryConfig *MemoryConfig) bool
- func IsOpenAIComputerTool(toolType string) bool
- func IsParallelToolsEnabled(llmConfig LLMConfig) bool
- func IsTestMode(globalTestMode bool, subsystemTestMode *bool) bool
- func SetVersion(v string)
- func ShouldSkipQuestions(memoryConfig *MemoryConfig) bool
- type A2ACapabilityInfo
- type A2AConfig
- type AgentCommSettings
- type AgentConfig
- type AgentInfo
- type AgentSkillInfo
- type AgentsConfig
- type BM25Config
- type BrowserEngineProviderConfig
- type BrowserbaseProviderConfig
- type BuiltinToolConfig
- type CDPProviderConfig
- type CircuitBreakerConfig
- type CitationsConfig
- type CompactionConfig
- type Config
- func (c *Config) Get() AgentConfig
- func (c *Config) GetLLMConfig() LLMConfig
- func (c *Config) IsSetupMode() bool
- func (c *Config) Load() error
- func (c *Config) Reset() error
- func (c *Config) Save() error
- func (c *Config) Set(newConfig AgentConfig)
- func (c *Config) SetSetupMode(enabled bool) error
- func (c *Config) Update(newConfig AgentConfig) error
- type ContextConfig
- type EmbeddingProviderInfo
- type ExternalMCPServer
- type FileSystemConfig
- type KeywordConfig
- type KeywordRule
- type LLMConfig
- type MCPConfig
- type MCPCredential
- type MemoryConfig
- type OperatorConfig
- type PDFConfig
- type ParallelToolsConfig
- type RealtimeConfig
- type ReflectionConfig
- type RegexConfig
- type RegexRule
- type STTConfig
- type SchedulerConfig
- type Skill
- type SkillsConfig
- type SteelProviderConfig
- type TTSConfig
- type TasksConfig
- type TelemetryConfig
- type ToolLoadingConfig
- type UserLocationConfig
- type VisionConfig
Constants ¶
This section is empty.
Variables ¶
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",
"mistral": "https://api.mistral.ai/v1/chat/completions",
"cerebras": "https://api.cerebras.ai/v1/chat/completions",
}
CompletionEndpoints maps providers to their chat completion API endpoints
var EmbeddingDimensions = map[string]int{
"openai": 1536,
"gemini": 3072,
"jina": 1024,
"voyage": 1024,
"cohere": 1024,
"huggingface": 384,
"ollama": 768,
}
EmbeddingDimensions maps providers to their embedding vector dimensions
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
var EmbeddingModels = map[string]string{
"openai": "text-embedding-3-small",
"gemini": "gemini-embedding-2-preview",
"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
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",
"mistral": "MISTRAL_API_KEY",
"cerebras": "CEREBRAS_API_KEY",
}
ProviderAPIKeyEnvVars maps providers to their API key environment variable names
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",
"fireworks": "accounts/fireworks/models/qwen3-8b",
"together": "meta-llama/Llama-3.1-8B-Instruct-Turbo",
"novita": "meta-llama/llama-3.1-8b-instruct",
"moonshot": "moonshot-v1-8k",
"zai": "llama-3.1-8b-instruct",
"mistral": "ministral-3-8b-25-12",
"cerebras": "llama3.1-8b",
}
SmallModels maps providers to their small/fast models for internal tasks (memory decisions, summarization, etc.) Updated: February 2026 Every provider gets an explicit small model so summarization/activity generation always uses a fast, cheap model instead of the main agent model.
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 ComputerToolVersion ¶ added in v1.43.0
ComputerToolVersion returns the correct computer tool type string for the given model. Claude Opus 4.6, Sonnet 4.6, and Opus 4.5 use computer_20251124; all other models use computer_20250124.
func ComputerUseBetaFlag ¶ added in v1.43.0
ComputerUseBetaFlag returns the correct anthropic-beta header value for computer use.
func DecisionProviderSupported ¶ added in v1.33.41
DecisionProviderSupported checks if a provider supports chat completions
func EmbeddingProviderSupported ¶ added in v1.33.41
EmbeddingProviderSupported checks if a provider supports embeddings
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
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
GetAvailableEmbeddingProvider returns the first available embedding provider Priority: explicit config > same as main provider > free options > ollama
func GetCompletionEndpoint ¶ added in v1.33.41
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
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
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 GetModelContextWindow ¶ added in v1.44.0
GetModelContextWindow returns the input context window size in tokens for a model. Used to auto-derive context management limits when not explicitly configured.
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
GetSmallModel returns the small/fast model for a given provider Used for internal tasks like memory decisions, summarization. All known providers have explicit small models. Fallback to main agent model only for unknown/custom providers.
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 IsComputerTool ¶ added in v1.43.0
IsComputerTool returns true if the tool type is any version of the computer tool (Anthropic or OpenAI).
func IsMemoryAutoIngestEnabled ¶
func IsMemoryAutoIngestEnabled(memoryConfig *MemoryConfig) bool
IsMemoryAutoIngestEnabled checks if auto file ingestion is enabled
func IsOpenAIComputerTool ¶ added in v1.46.0
IsOpenAIComputerTool returns true if the tool type is OpenAI's native computer tool.
func IsParallelToolsEnabled ¶
IsParallelToolsEnabled checks if parallel tools are enabled in the LLM config Defaults to true if not explicitly configured
func IsTestMode ¶
IsTestMode checks if test mode is enabled for a subsystem Priority: subsystem.test_mode > global.test_mode > false
func SetVersion ¶ added in v1.44.1
func SetVersion(v string)
SetVersion sets the version (called by main at startup)
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 A2ACapabilityInfo ¶ added in v1.43.1
type A2ACapabilityInfo struct {
Streaming bool `json:"streaming"`
PushNotifications bool `json:"push_notifications"`
InputModes []string `json:"input_modes,omitempty"`
OutputModes []string `json:"output_modes,omitempty"`
}
A2ACapabilityInfo stores capability data from an A2A Agent Card.
type A2AConfig ¶ added in v1.43.0
type A2AConfig struct {
Enabled bool `json:"enabled"`
PushNotifications bool `json:"push_notifications,omitempty"`
}
A2AConfig enables the Google Agent2Agent (A2A) protocol for inter-agent communication.
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"`
A2A *A2AConfig `json:"a2a,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
Skills []AgentSkillInfo `json:"skills,omitempty"` // Rich skill info from A2A Agent Card probing
A2ACapabilities *A2ACapabilityInfo `json:"a2a_capabilities,omitempty"` // Capabilities from A2A Agent Card
}
type AgentSkillInfo ¶ added in v1.43.1
type AgentSkillInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tags []string `json:"tags,omitempty"`
Examples []string `json:"examples,omitempty"`
}
AgentSkillInfo is a lightweight skill descriptor extracted from an A2A Agent Card.
type AgentsConfig ¶
type AgentsConfig struct {
Enabled bool `json:"enabled"`
Mode string `json:"mode,omitempty"` // "peer" | "coordinator" | "worker" (default: "peer")
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) CanCallAgents ¶ added in v1.42.0
func (c *AgentsConfig) CanCallAgents() bool
CanCallAgents returns true if this agent is allowed to call other agents Both peer and coordinator modes can call; only worker mode cannot.
func (*AgentsConfig) CanDiscoverAgents ¶ added in v1.42.0
func (c *AgentsConfig) CanDiscoverAgents() bool
CanDiscoverAgents returns true if this agent should actively discover peers Both peer and coordinator modes discover; worker mode only registers itself.
func (*AgentsConfig) IsCoordinatorMode ¶
func (c *AgentsConfig) IsCoordinatorMode() bool
IsCoordinatorMode returns true if this agent can call other agents
func (*AgentsConfig) IsPeerMode ¶ added in v1.42.0
func (c *AgentsConfig) IsPeerMode() bool
IsPeerMode returns true if this agent is in peer mode (can call and be called by other agents) Peer mode is the default — any agent can collaborate with any other agent, with guardrails (call chain, max depth, TTL, circuit breaker) preventing loops.
func (*AgentsConfig) IsWorkerMode ¶
func (c *AgentsConfig) IsWorkerMode() bool
IsWorkerMode returns true if this agent is in worker mode (receive-only, cannot call other agents)
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 BrowserEngineProviderConfig ¶ added in v1.42.0
type BrowserEngineProviderConfig struct {
BaseURL string `json:"base_url"` // Default: "https://api.browserengine.co"
APIKey string `json:"api_key"` // X-API-Key header value
}
BrowserEngineProviderConfig holds BrowserEngine cloud service settings
type BrowserbaseProviderConfig ¶ added in v1.39.0
type BrowserbaseProviderConfig struct {
APIKey string `json:"api_key"`
ProjectID string `json:"project_id"`
}
BrowserbaseProviderConfig holds Browserbase connection settings
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 CDPProviderConfig ¶ added in v1.42.0
type CDPProviderConfig struct {
URL string `json:"url"` // e.g., "ws://localhost:9222" or "http://5.75.128.19:9222"
}
CDPProviderConfig holds direct CDP connection settings
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 (*Config) Get ¶
func (c *Config) Get() AgentConfig
func (*Config) GetLLMConfig ¶
func (*Config) IsSetupMode ¶
IsSetupMode returns true if the agent is in setup mode
func (*Config) Set ¶
func (c *Config) Set(newConfig AgentConfig)
Set updates the agent config in memory without saving
func (*Config) SetSetupMode ¶
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"`
BaseURL string `json:"base_url,omitempty"` // Custom base URL (e.g. for Ollama)
MaxTokens int `json:"max_tokens"`
MaxTurns int `json:"max_turns,omitempty"` // Max agentic loop iterations (default 50, was 10)
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 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"
EmbeddingDimensions int `json:"embedding_dimensions"` // Output dimensions (0 = provider default). Gemini supports 768, 1536, 3072.
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"`
BrowserProvider string `json:"browser_provider"` // "browserengine" (default), "browserbase", "steel", "cdp"
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
Proxy *bool `json:"proxy,omitempty"` // Enable proxy (nil = true for backward compat)
ProxyCountry string `json:"proxy_country,omitempty"` // Default proxy country ISO 3166-1 alpha-2 code (e.g., "US", "GB", "DE")
AllowedDomains []string `json:"allowed_domains,omitempty"`
BlockedDomains []string `json:"blocked_domains,omitempty"`
// Provider-specific configs (only the active provider's config is used)
BrowserEngine *BrowserEngineProviderConfig `json:"browserengine,omitempty"`
Browserbase *BrowserbaseProviderConfig `json:"browserbase,omitempty"`
Steel *SteelProviderConfig `json:"steel,omitempty"`
CDP *CDPProviderConfig `json:"cdp,omitempty"`
}
type ParallelToolsConfig ¶
type RealtimeConfig ¶
type RealtimeConfig struct {
Enabled bool `json:"enabled"`
Provider string `json:"provider"` // "openai", "gemini", or "standard" (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
// Standard voice mode: STT + Core LLM + TTS (any provider)
STT *STTConfig `json:"stt,omitempty"`
TTS *TTSConfig `json:"tts,omitempty"`
}
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 STTConfig ¶ added in v1.41.4
type STTConfig struct {
Provider string `json:"provider"` // "whisper" (default), extensible
Model string `json:"model"` // "whisper-1" (default)
Language string `json:"language"` // Optional language hint (e.g., "en")
BaseURL string `json:"base_url,omitempty"` // Custom API base URL
}
STTConfig configures the speech-to-text provider for standard voice mode
type SchedulerConfig ¶
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 SteelProviderConfig ¶ added in v1.39.0
type SteelProviderConfig struct {
APIKey string `json:"api_key"`
BaseURL string `json:"base_url"` // Default: "https://api.steel.dev"
}
SteelProviderConfig holds Steel.dev connection settings
type TTSConfig ¶ added in v1.41.4
type TTSConfig struct {
Provider string `json:"provider"` // "elevenlabs" (default), extensible
Voice string `json:"voice"` // Voice ID or name
Model string `json:"model"` // TTS model (e.g., "eleven_turbo_v2_5")
Speed float64 `json:"speed,omitempty"` // Playback speed multiplier
SampleRate int `json:"sample_rate,omitempty"` // Output sample rate (default: 24000)
Stability float64 `json:"stability,omitempty"` // Voice stability (0-1)
Similarity float64 `json:"similarity,omitempty"` // Voice similarity boost (0-1)
}
TTSConfig configures the text-to-speech provider for standard voice mode
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 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
}