Class: SwarmSDK::V3::Configuration
- Inherits:
-
Object
- Object
- SwarmSDK::V3::Configuration
- Defined in:
- lib/swarm_sdk/v3/configuration.rb
Overview
Global configuration for V3 agents
Provides sensible defaults that can be overridden per-agent via AgentDefinition attributes. Also forwards provider API keys to RubyLLM when #apply_provider_config! is called.
Instance Attribute Summary collapse
-
#anthropic_api_base ⇒ String?
Anthropic custom API base URL.
-
#anthropic_api_key ⇒ String?
Anthropic API key.
-
#background_base_url ⇒ String?
Custom API base URL for background model.
-
#background_headers ⇒ Hash
Custom HTTP headers for background model.
-
#background_model ⇒ String?
Model for background tasks (compression, summarization).
-
#background_parameters ⇒ Hash
Raw API body parameters for background model (temperature, etc.).
-
#background_provider ⇒ String?
Provider for background model.
-
#bash_command_max_timeout ⇒ Integer
Maximum Bash command timeout in milliseconds.
-
#bash_command_timeout ⇒ Integer
Default Bash command timeout in milliseconds.
-
#bedrock_api_key ⇒ String?
AWS Bedrock access key.
-
#bedrock_region ⇒ String?
AWS Bedrock region.
-
#bedrock_secret_key ⇒ String?
AWS Bedrock secret key.
-
#bedrock_session_token ⇒ String?
AWS Bedrock session token.
-
#bm25_b ⇒ Float
BM25 document length normalization parameter (b).
-
#bm25_entity_boost ⇒ Float
Extra score boost per entity match in keyword search.
-
#bm25_k1 ⇒ Float
BM25 term frequency saturation parameter (k1).
-
#compression_interval ⇒ Integer
How often the agent compresses low-exposure memory cards.
-
#consolidation_interval ⇒ Integer
How often the agent runs consolidation (dedup, cluster updates, conflict detection).
-
#consolidator_conflict_threshold ⇒ Float
Minimum similarity for considering two cards as potential conflicts.
-
#consolidator_dedup_threshold ⇒ Float
Similarity threshold for detecting duplicate cards during consolidation.
-
#cross_turn_edge_scan_limit ⇒ Integer
Maximum number of existing cards to scan when creating cross-turn entity edges.
-
#dedup_similarity_threshold ⇒ Float
Similarity threshold above which cards are considered near-duplicates during context assembly.
-
#default_associative_memory ⇒ Boolean
Default associative memory setting for agents.
-
#default_keyword_weight ⇒ Float
Default keyword weight for hybrid search (0.0-1.0).
-
#default_max_concurrent_tools ⇒ Integer?
Default max concurrent tool executions per agent.
-
#default_model ⇒ String
Default LLM model for agents without explicit model.
-
#default_retrieval_top_k ⇒ Integer
Default number of memory cards to retrieve per turn.
-
#default_semantic_weight ⇒ Float
Default semantic weight for hybrid search (0.0-1.0).
-
#default_stm_turns ⇒ Integer
Default number of recent turns to keep in short-term memory.
-
#default_tools ⇒ Array<Symbol>
Tools added to every agent (defaults to []).
-
#embedding_cache_dir ⇒ String?
Cache directory for downloaded embedding models.
-
#embedding_model ⇒ String
Sentence-transformer model name for embeddings.
-
#entity_edge_min_similarity ⇒ Float
Minimum embedding similarity for creating ‘same_entity` edges between new cards and existing cards during cross-turn entity linking.
-
#exploration_min_similarity ⇒ Float
Minimum embedding similarity between the query and an exploration candidate card.
-
#exploration_sample_size ⇒ Integer
Number of low-exposure “anti-forgetting” cards sprinkled into each context build.
-
#exposure_dwell_weight ⇒ Float
Weight for dwell component in exposure score (γ).
-
#exposure_frequency_weight ⇒ Float
Weight for frequency component in exposure score (α).
-
#exposure_recency_half_life ⇒ Integer
Half-life for recency decay in seconds (default: 7 days).
-
#exposure_recency_weight ⇒ Float
Weight for recency component in exposure score (β).
-
#gemini_api_base ⇒ String?
Gemini custom API base URL.
-
#gemini_api_key ⇒ String?
Google Gemini API key.
-
#glob_result_limit ⇒ Integer
Maximum results from Glob tool.
-
#line_character_limit ⇒ Integer
Maximum line character limit for Read tool.
-
#max_neighbors_per_seed ⇒ Integer
Maximum 1-hop graph neighbors to expand per seed card during retrieval.
-
#max_subtask_depth ⇒ Integer
Maximum nesting depth for SubTask spawning (default: 1).
-
#mcp_ssl_verify ⇒ Boolean
Global SSL verification for MCP HTTP connections (default: true).
-
#openai_api_base ⇒ String?
OpenAI custom API base URL.
-
#openai_api_key ⇒ String?
OpenAI API key.
-
#openai_use_system_role ⇒ Boolean
Use “system” role instead of “developer” for OpenAI.
-
#output_character_limit ⇒ Integer
Maximum output character limit for tool results.
-
#promotion_access_threshold ⇒ Integer
Minimum access count before a compressed card (L1-L4) is promoted back toward L0.
-
#read_line_limit ⇒ Integer
Default line limit for Read tool.
-
#registered_tools ⇒ Array<Symbol>?
Available tools (nil = all built-in tools).
-
#rrf_k ⇒ Integer
Reciprocal Rank Fusion (RRF) constant.
-
#subtask_base_url ⇒ String?
Custom API base URL for subtask model.
-
#subtask_headers ⇒ Hash
Custom HTTP headers for subtask model.
-
#subtask_model ⇒ String?
Model for subtask agents (nil = inherit from parent).
-
#subtask_parameters ⇒ Hash
Raw API body parameters for subtask model (temperature, etc.).
-
#subtask_provider ⇒ String?
Provider for subtask model (nil = inherit from parent).
Class Method Summary collapse
-
.configure {|Configuration| ... } ⇒ Configuration
Configure global settings.
-
.instance ⇒ Configuration
Get the global configuration instance.
-
.reset! ⇒ void
Reset configuration to defaults.
Instance Method Summary collapse
-
#apply_provider_config! ⇒ void
Forward provider API keys and settings to RubyLLM.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#reset! ⇒ void
Reset all configuration to defaults.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
327 328 329 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 327 def initialize reset! end |
Instance Attribute Details
#anthropic_api_base ⇒ String?
Returns Anthropic custom API base URL.
42 43 44 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 42 def anthropic_api_base @anthropic_api_base end |
#anthropic_api_key ⇒ String?
Returns Anthropic API key.
39 40 41 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 39 def anthropic_api_key @anthropic_api_key end |
#background_base_url ⇒ String?
Returns Custom API base URL for background model.
71 72 73 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 71 def background_base_url @background_base_url end |
#background_headers ⇒ Hash
Returns Custom HTTP headers for background model.
74 75 76 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 74 def background_headers @background_headers end |
#background_model ⇒ String?
Returns Model for background tasks (compression, summarization).
65 66 67 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 65 def background_model @background_model end |
#background_parameters ⇒ Hash
Returns Raw API body parameters for background model (temperature, etc.).
77 78 79 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 77 def background_parameters @background_parameters end |
#background_provider ⇒ String?
Returns Provider for background model.
68 69 70 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 68 def background_provider @background_provider end |
#bash_command_max_timeout ⇒ Integer
Returns Maximum Bash command timeout in milliseconds.
325 326 327 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 325 def bash_command_max_timeout @bash_command_max_timeout end |
#bash_command_timeout ⇒ Integer
Returns Default Bash command timeout in milliseconds.
322 323 324 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 322 def bash_command_timeout @bash_command_timeout end |
#bedrock_api_key ⇒ String?
Returns AWS Bedrock access key.
51 52 53 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 51 def bedrock_api_key @bedrock_api_key end |
#bedrock_region ⇒ String?
Returns AWS Bedrock region.
57 58 59 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 57 def bedrock_region @bedrock_region end |
#bedrock_secret_key ⇒ String?
Returns AWS Bedrock secret key.
54 55 56 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 54 def bedrock_secret_key @bedrock_secret_key end |
#bedrock_session_token ⇒ String?
Returns AWS Bedrock session token.
60 61 62 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 60 def bedrock_session_token @bedrock_session_token end |
#bm25_b ⇒ Float
BM25 document length normalization parameter (b). Controls how much longer documents are penalized relative to average length. 0.0 = no penalty (all docs treated equally), 1.0 = full penalty. Standard Okapi BM25 default is 0.75.
201 202 203 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 201 def bm25_b @bm25_b end |
#bm25_entity_boost ⇒ Float
Extra score boost per entity match in keyword search. When a query term appears in a card’s entity list (not just its text), this boost is added to the BM25 score. Helps surface cards about specific named entities like “JWT”, “PostgreSQL”, etc.
209 210 211 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 209 def bm25_entity_boost @bm25_entity_boost end |
#bm25_k1 ⇒ Float
BM25 term frequency saturation parameter (k1). Controls how quickly repeated terms in a document contribute diminishing returns. Higher values give more weight to repeated terms. Standard Okapi BM25 default is 1.2.
193 194 195 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 193 def bm25_k1 @bm25_k1 end |
#compression_interval ⇒ Integer
How often the agent compresses low-exposure memory cards. Compression advances cards through the L0→L4 ladder, reducing storage and context window usage. Lower values compress more aggressively (every 3 turns vs every 10).
157 158 159 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 157 def compression_interval @compression_interval end |
#consolidation_interval ⇒ Integer
How often the agent runs consolidation (dedup, cluster updates, conflict detection). Consolidation merges near-duplicate cards, updates cluster rolling summaries, and creates ‘contradicts` edges between conflicting cards.
165 166 167 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 165 def consolidation_interval @consolidation_interval end |
#consolidator_conflict_threshold ⇒ Float
Minimum similarity for considering two cards as potential conflicts. The conflict band is: conflict_threshold <= similarity < dedup_threshold. Raise to reduce false positives; lower to catch subtler contradictions.
292 293 294 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 292 def consolidator_conflict_threshold @consolidator_conflict_threshold end |
#consolidator_dedup_threshold ⇒ Float
Similarity threshold for detecting duplicate cards during consolidation. Cards with vector similarity above this threshold are merged into a canonical card. Lower values merge more aggressively but risk merging distinct-but-similar concepts.
285 286 287 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 285 def consolidator_dedup_threshold @consolidator_dedup_threshold end |
#cross_turn_edge_scan_limit ⇒ Integer
Maximum number of existing cards to scan when creating cross-turn entity edges. Limits the O(n*m) scan to prevent slowdowns as the memory store grows. Scans the most recent cards first.
272 273 274 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 272 def cross_turn_edge_scan_limit @cross_turn_edge_scan_limit end |
#dedup_similarity_threshold ⇒ Float
Similarity threshold above which cards are considered near-duplicates during context assembly. When two cards in the working context have similarity above this threshold, the duplicate is removed. Uses the adapter’s Adapters::Base#similarity method.
247 248 249 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 247 def dedup_similarity_threshold @dedup_similarity_threshold end |
#default_associative_memory ⇒ Boolean
Returns Default associative memory setting for agents. When enabled, exploration cards are labeled distinctly and guidance is injected encouraging the LLM to naturally surface tangential memories.
252 253 254 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 252 def default_associative_memory @default_associative_memory end |
#default_keyword_weight ⇒ Float
Returns Default keyword weight for hybrid search (0.0-1.0).
129 130 131 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 129 def default_keyword_weight @default_keyword_weight end |
#default_max_concurrent_tools ⇒ Integer?
Returns Default max concurrent tool executions per agent. When set, agents execute multiple tool calls from a single LLM response concurrently using Async. nil disables concurrency (sequential execution).
107 108 109 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 107 def default_max_concurrent_tools @default_max_concurrent_tools end |
#default_model ⇒ String
Returns Default LLM model for agents without explicit model.
23 24 25 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 23 def default_model @default_model end |
#default_retrieval_top_k ⇒ Integer
Returns Default number of memory cards to retrieve per turn.
123 124 125 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 123 def default_retrieval_top_k @default_retrieval_top_k end |
#default_semantic_weight ⇒ Float
Returns Default semantic weight for hybrid search (0.0-1.0).
126 127 128 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 126 def default_semantic_weight @default_semantic_weight end |
#default_stm_turns ⇒ Integer
Returns Default number of recent turns to keep in short-term memory.
120 121 122 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 120 def default_stm_turns @default_stm_turns end |
#default_tools ⇒ Array<Symbol>
Returns Tools added to every agent (defaults to []).
99 100 101 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 99 def default_tools @default_tools end |
#embedding_cache_dir ⇒ String?
Returns Cache directory for downloaded embedding models.
115 116 117 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 115 def @embedding_cache_dir end |
#embedding_model ⇒ String
Returns Sentence-transformer model name for embeddings.
112 113 114 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 112 def @embedding_model end |
#entity_edge_min_similarity ⇒ Float
Minimum embedding similarity for creating ‘same_entity` edges between new cards and existing cards during cross-turn entity linking. Lower values create more connections but may produce false positives.
265 266 267 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 265 def entity_edge_min_similarity @entity_edge_min_similarity end |
#exploration_min_similarity ⇒ Float
Minimum embedding similarity between the query and an exploration candidate card. Lower values include more diverse (less relevant) cards in the sprinkle. Higher values restrict to cards that are at least loosely relevant.
239 240 241 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 239 def exploration_min_similarity @exploration_min_similarity end |
#exploration_sample_size ⇒ Integer
Number of low-exposure “anti-forgetting” cards sprinkled into each context build. These are rarely-accessed cards with some relevance to the query, included to prevent permanent forgetting. Set to 0 to disable exploration entirely.
231 232 233 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 231 def exploration_sample_size @exploration_sample_size end |
#exposure_dwell_weight ⇒ Float
Returns Weight for dwell component in exposure score (γ).
140 141 142 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 140 def exposure_dwell_weight @exposure_dwell_weight end |
#exposure_frequency_weight ⇒ Float
Returns Weight for frequency component in exposure score (α).
134 135 136 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 134 def exposure_frequency_weight @exposure_frequency_weight end |
#exposure_recency_half_life ⇒ Integer
Returns Half-life for recency decay in seconds (default: 7 days).
143 144 145 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 143 def exposure_recency_half_life @exposure_recency_half_life end |
#exposure_recency_weight ⇒ Float
Returns Weight for recency component in exposure score (β).
137 138 139 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 137 def exposure_recency_weight @exposure_recency_weight end |
#gemini_api_base ⇒ String?
Returns Gemini custom API base URL.
48 49 50 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 48 def gemini_api_base @gemini_api_base end |
#gemini_api_key ⇒ String?
Returns Google Gemini API key.
45 46 47 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 45 def gemini_api_key @gemini_api_key end |
#glob_result_limit ⇒ Integer
Returns Maximum results from Glob tool.
319 320 321 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 319 def glob_result_limit @glob_result_limit end |
#line_character_limit ⇒ Integer
Returns Maximum line character limit for Read tool.
313 314 315 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 313 def line_character_limit @line_character_limit end |
#max_neighbors_per_seed ⇒ Integer
Maximum 1-hop graph neighbors to expand per seed card during retrieval. After finding the top-k cards, the retriever traverses graph edges to pull in related cards. This caps how many neighbors any single card can contribute, preventing highly-connected cards from dominating results.
218 219 220 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 218 def max_neighbors_per_seed @max_neighbors_per_seed end |
#max_subtask_depth ⇒ Integer
Returns Maximum nesting depth for SubTask spawning (default: 1).
305 306 307 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 305 def max_subtask_depth @max_subtask_depth end |
#mcp_ssl_verify ⇒ Boolean
Returns Global SSL verification for MCP HTTP connections (default: true). OpenSSL 3.6 enforces CRL checking by default, which breaks most HTTPS MCP endpoints. Set to false to disable verification for local development. Can be overridden per-server via ServerDefinition’s ssl_verify option.
300 301 302 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 300 def mcp_ssl_verify @mcp_ssl_verify end |
#openai_api_base ⇒ String?
Returns OpenAI custom API base URL.
31 32 33 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 31 def openai_api_base @openai_api_base end |
#openai_api_key ⇒ String?
Returns OpenAI API key.
28 29 30 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 28 def openai_api_key @openai_api_key end |
#openai_use_system_role ⇒ Boolean
Returns Use “system” role instead of “developer” for OpenAI. OpenAI’s API uses “developer” by default, but some OpenAI-compatible servers still require the traditional “system” role.
36 37 38 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 36 def openai_use_system_role @openai_use_system_role end |
#output_character_limit ⇒ Integer
Returns Maximum output character limit for tool results.
310 311 312 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 310 def output_character_limit @output_character_limit end |
#promotion_access_threshold ⇒ Integer
Minimum access count before a compressed card (L1-L4) is promoted back toward L0. Promotion rebuilds richer text from graph neighbors and LLM, counterbalancing compression for frequently-accessed cards.
172 173 174 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 172 def promotion_access_threshold @promotion_access_threshold end |
#read_line_limit ⇒ Integer
Returns Default line limit for Read tool.
316 317 318 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 316 def read_line_limit @read_line_limit end |
#registered_tools ⇒ Array<Symbol>?
Returns Available tools (nil = all built-in tools).
102 103 104 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 102 def registered_tools @registered_tools end |
#rrf_k ⇒ Integer
Reciprocal Rank Fusion (RRF) constant. Controls how semantic and keyword search ranks are combined. Higher values flatten rank differences, giving later results more weight relative to top hits. Standard value from the RRF paper is 60.
185 186 187 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 185 def rrf_k @rrf_k end |
#subtask_base_url ⇒ String?
Returns Custom API base URL for subtask model.
88 89 90 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 88 def subtask_base_url @subtask_base_url end |
#subtask_headers ⇒ Hash
Returns Custom HTTP headers for subtask model.
91 92 93 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 91 def subtask_headers @subtask_headers end |
#subtask_model ⇒ String?
Returns Model for subtask agents (nil = inherit from parent).
82 83 84 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 82 def subtask_model @subtask_model end |
#subtask_parameters ⇒ Hash
Returns Raw API body parameters for subtask model (temperature, etc.).
94 95 96 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 94 def subtask_parameters @subtask_parameters end |
#subtask_provider ⇒ String?
Returns Provider for subtask model (nil = inherit from parent).
85 86 87 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 85 def subtask_provider @subtask_provider end |
Class Method Details
.configure {|Configuration| ... } ⇒ Configuration
Configure global settings
Yields the configuration instance, then applies provider settings to RubyLLM automatically.
475 476 477 478 479 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 475 def configure yield(instance) if block_given? instance.apply_provider_config! instance end |
.instance ⇒ Configuration
Get the global configuration instance
458 459 460 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 458 def instance @instance ||= new end |
.reset! ⇒ void
This method returns an undefined value.
Reset configuration to defaults
484 485 486 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 484 def reset! instance.reset! end |
Instance Method Details
#apply_provider_config! ⇒ void
This method returns an undefined value.
Forward provider API keys and settings to RubyLLM
Call this after setting provider keys to configure RubyLLM. Only sets values that are non-nil.
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 438 def apply_provider_config! RubyLLM.configure do |c| c.openai_api_key = @openai_api_key if @openai_api_key c.openai_api_base = @openai_api_base if @openai_api_base c.openai_use_system_role = @openai_use_system_role c.anthropic_api_key = @anthropic_api_key if @anthropic_api_key c.anthropic_api_base = @anthropic_api_base if @anthropic_api_base c.gemini_api_key = @gemini_api_key if @gemini_api_key c.gemini_api_base = @gemini_api_base if @gemini_api_base c.bedrock_api_key = @bedrock_api_key if @bedrock_api_key c.bedrock_secret_key = @bedrock_secret_key if @bedrock_secret_key c.bedrock_region = @bedrock_region if @bedrock_region c.bedrock_session_token = @bedrock_session_token if @bedrock_session_token end end |
#reset! ⇒ void
This method returns an undefined value.
Reset all configuration to defaults
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/swarm_sdk/v3/configuration.rb', line 334 def reset! # LLM defaults @default_model = "claude-sonnet-4" # Provider keys @openai_api_key = nil @openai_api_base = nil @openai_use_system_role = false @anthropic_api_key = nil @anthropic_api_base = nil @gemini_api_key = nil @gemini_api_base = nil @bedrock_api_key = nil @bedrock_secret_key = nil @bedrock_region = nil @bedrock_session_token = nil # Background LLM @background_model = nil @background_provider = nil @background_base_url = nil @background_headers = {} @background_parameters = {} # Subtask LLM @subtask_model = nil @subtask_provider = nil @subtask_base_url = nil @subtask_headers = {} @subtask_parameters = {} # Tools @default_tools = [] @registered_tools = nil @default_max_concurrent_tools = nil # Embedding @embedding_model = "sentence-transformers/multi-qa-MiniLM-L6-cos-v1" @embedding_cache_dir = nil # Memory retrieval (optimized via manual-memory-evals.md Phases 1-2) @default_stm_turns = 8 @default_retrieval_top_k = 10 # was 15 — less noise, better precision @default_semantic_weight = 0.4 # was 0.5 — slightly keyword-leaning for entity recall @default_keyword_weight = 0.6 # was 0.5 — better for named entities and numbers # Exposure score weights (additive: α·frequency + β·recency + γ·dwell) @exposure_frequency_weight = 0.4 @exposure_recency_weight = 0.4 @exposure_dwell_weight = 0.2 @exposure_recency_half_life = 7 * 24 * 3600 # 7 days in seconds # Memory lifecycle @compression_interval = 5 @consolidation_interval = 10 @promotion_access_threshold = 5 # Retrieval (optimized via manual-memory-evals.md Phases 3-4) @rrf_k = 120 # was 60 — flatter ranking gives more diverse results @bm25_k1 = 1.2 @bm25_b = 1.0 # was 0.75 — full length normalization for short memory cards @bm25_entity_boost = 0.5 @max_neighbors_per_seed = 4 # Context builder @exploration_sample_size = 2 @exploration_min_similarity = 0.15 @dedup_similarity_threshold = 0.92 @default_associative_memory = false # Ingestion @entity_edge_min_similarity = 0.3 @cross_turn_edge_scan_limit = 50 # Consolidation @consolidator_dedup_threshold = 0.92 @consolidator_conflict_threshold = 0.75 # MCP @mcp_ssl_verify = true # Subtask limits @max_subtask_depth = 1 # Tool limits @output_character_limit = 30_000 @line_character_limit = 2_000 @read_line_limit = 2_000 @glob_result_limit = 500 @bash_command_timeout = 120_000 @bash_command_max_timeout = 600_000 end |