Repository navigation
Expand file tree
/
Copy pathconfig.yaml
More file actions
194 lines (165 loc) · 8.42 KB
/
Copy pathconfig.yaml
File metadata and controls
194 lines (165 loc) · 8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# =============================================================================
# INFRASTRUCTURE CONFIGURATION
# =============================================================================
# This file contains infrastructure settings for the server, Redis, background
# tasks, logging, and CORS. Tool-specific settings (crawler, web_fetch, embedding,
# search_api) have been moved to agent_config.yaml.
# CLI Configuration
cli:
# Color palette: emerald, cyan, amber, teal, nord, gruvbox, catppuccin, tokyo_night
# Default: nord (dark mode), tokyo_night (light mode)
# palette: "nord"
# Theme mode: auto, dark, light
theme: "auto"
# Application Settings
debug: false
ptc_recursion_limit: 2000
flash_recursion_limit: 500
# Workflow Settings
workflow_timeout: 3200 # seconds (53 minutes)
sse_keepalive_interval: 15 # seconds
# Feature Flags
result_log_db_enabled: true
redis_warm_on_startup: true
langsmith_tracing: false
# SSE Event Logging
sse_event_log_enabled: false
sse_event_log_level: info
# General Application Logging
log_level: info
log_format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
# Module-specific log levels (overrides root level)
module_log_levels:
# Grouped library settings (use group: prefix for predefined groups)
group:third_party_libraries: WARNING
group:langchain_libraries: WARNING
# Application modules (hierarchical - parent loggers affect all children)
src.tools: INFO
src.infoflow: INFO
src.deep_research: INFO
# CORS Settings
allowed_origins:
- "*"
# =============================================================================
# BACKGROUND EXECUTION CONFIGURATION
# =============================================================================
# REQUIRED: Background execution is always enabled to ensure workflows complete
# even if SSE clients disconnect. These settings control background task behavior.
background_execution:
max_concurrent_workflows: 100 # Maximum number of concurrent background workflows
workflow_result_ttl: 86400 # Workflow result retention time in seconds (24 hours)
# Safety-net reaper. Fires only when a workflow has NO active SSE connections
# for the full window (not based on producer activity). At 6h, a user can close
# their tab and reconnect within the day to continue. The trade-off: a stuck
# workflow with no producer holds a worker slot for up to 6h. This is acceptable
# because per-workflow heap is bounded (terminal-ref cleanup, asyncio handle drop,
# bounded in-memory event tail), so a wedged workflow stays bounded in memory
# while it waits for the reaper. If you see RSS climbing during long disconnect
# windows, revisit this knob first.
abandoned_workflow_timeout: 21600
cleanup_interval: 300 # Background cleanup task interval in seconds (5 minutes)
enable_intermediate_storage: true # Store intermediate results during execution
max_stored_messages_per_agent: 150000 # Maximum events to buffer per workflow (increased for long-running research)
# Event storage backend configuration
event_storage_backend: redis # Backend for event buffering: "redis" or "memory"
# Subagent collector timeouts
subagent_collector_timeout: 120 # Initial collector deadline in seconds (waits for subagents after main turn ends)
subagent_orphan_collector_timeout: 600 # Idle timeout in seconds for orphan collector — resets on any subagent progress (new events, tool calls)
# Streaming & queue settings
subagent_task_max_wait: 30 # Max seconds to wait for subagent task to appear in registry
# Subagent captured-event memory bounds
in_memory_event_tail_max_events: 1000 # Per-subagent hot tail size (older events spill to Redis)
spill_subagent_events_to_redis: true # Kill-switch for per-event Redis spill
# Timeout settings
sse_drain_timeout: 30 # Seconds to wait for per-task SSE drain before clearing events
shutdown_timeout: 50 # Max seconds for graceful shutdown of running workflows
checkpoint_flush_timeout: 10 # Timeout for checkpoint state reads/writes
wait_for_persistence_timeout: 30 # Max seconds callers block waiting for persistence
soft_interrupt_wait_timeout: 30 # Max seconds to wait for soft-interrupted workflow to finish
max_workflow_retries: 3 # Max transient-error retry count
merged_chunk_max_bytes: 16384 # Max bytes for merged SSE event chunks (16 KB)
# =============================================================================
# REDIS CACHE CONFIGURATION
# =============================================================================
# Connection details (URL with credentials) are in .env: REDIS_URL
# Redis is used for caching and background workflow event storage
redis:
cache_enabled: true # Enable/disable caching globally
max_connections: 150 # Connection pool size (override via REDIS_MAX_CONNECTIONS env)
socket_timeout: 5 # Redis socket read/write timeout (seconds)
socket_connect_timeout: 5 # Redis socket connect timeout (seconds)
# Cache TTL settings (seconds)
ttl:
results_list: 300 # Results list cache TTL (5 minutes)
result_detail: 900 # Result detail cache TTL (15 minutes)
metadata: 900 # Metadata tags/tickers cache TTL (15 minutes)
metadata_summary: 600 # Metadata summary cache TTL (10 minutes)
workflow_events: 86400 # Workflow event buffer TTL (24 hours)
workflow_status: 3600 # Completed/cancelled workflow status key TTL (1 hour)
cancel_flag: 300 # Workflow cancel flag TTL (5 minutes)
steering: 3600 # Steering message key TTL (1 hour)
memo_metadata_inflight: 300 # Cross-worker visibility of in-flight memo metadata tasks (5 minutes)
memo_metadata_cancel: 60 # Cooperative cross-worker cancel flag for memo metadata (1 minute)
# Per-interval OHLCV cache TTLs (≈ interval_seconds × 1.5)
# SWR soft threshold stays at 50% of these values
ohlcv:
"1s": 30
"1min": 90
"5min": 360
"15min": 1080
"30min": 2100
"1hour": 4200
"4hour": 16200
"1day": 86400
# Cache Invalidation
cache_invalidate_on_write: true # Invalidate cache on writes
# Stale-While-Revalidate (SWR) Configuration
# SWR returns stale data immediately while refreshing in background
swr:
enabled: true # Enable SWR for cache reads
soft_ttl_ratio: 0.6 # Used by OHLCV cache envelope _needs_refresh()
warm_after_invalidation: true # Pre-populate cache after invalidation
# =============================================================================
# MARKET DATA CONFIGURATION
# =============================================================================
# Ordered provider chain — requests try each provider in order.
# Each provider declares which markets it covers.
# "all" is a catch-all that matches any market.
market_data:
providers:
- name: ginlix-data
markets: [us] # US equities only
- name: fmp
markets: [all] # FMP — global coverage, catch-all fallback
- name: yfinance
markets: [all] # Free fallback — no API key required
# Ordered news provider chain — sequential fallback (no market routing).
news_data:
providers:
- name: ginlix-data
- name: fmp
- name: yfinance
# =============================================================================
# MARKET INSIGHT CONFIGURATION
# =============================================================================
market_insight:
enabled: true
timezone: "America/New_York"
generation_timeout: 600 # Seconds before background generation times out
max_symbols_context: 20 # Max symbols in personalized prompt context
dedup_window_minutes: 5 # Dedup window for per-user insights
schedule:
pre_market: "09:00" # Overnight news (8 PM yesterday → 9 AM today)
post_market: "20:30" # Daily recap (full day summary)
market_update_start: "10:00" # Hourly updates start
market_update_end: "20:00" # Hourly updates end (inclusive)
market_update_interval: 60 # Minutes between updates
# =============================================================================
# GITHUB BOT CONFIGURATION
# =============================================================================
# GitHub bot for agent self-improvement (issue reporting, PR proposals)
github:
enabled: true
bot_name: "langalpha-bot"
bot_email: "bot@ginlix.ai"
token_env: "GITHUB_BOT_TOKEN" # env var name holding the bot PAT (resolved from .env)