config
config
¶
Configuration loading, hardware detection, and engine recommendation.
User configuration lives at ~/.openjarvis/config.toml. load_config()
detects hardware, fills sensible defaults, then overlays any user overrides
found in the TOML file.
Classes¶
GpuInfo
dataclass
¶
GpuInfo(vendor: str = '', name: str = '', vram_gb: float = 0.0, compute_capability: str = '', count: int = 0)
Detected GPU metadata.
HardwareInfo
dataclass
¶
HardwareInfo(platform: str = '', cpu_brand: str = '', cpu_count: int = 0, ram_gb: float = 0.0, gpu: Optional[GpuInfo] = None)
Detected system hardware.
VLLMEngineConfig
dataclass
¶
Per-engine config for vLLM.
SGLangEngineConfig
dataclass
¶
Per-engine config for SGLang.
LlamaCppEngineConfig
dataclass
¶
Per-engine config for llama.cpp.
MLXEngineConfig
dataclass
¶
Per-engine config for MLX.
LMStudioEngineConfig
dataclass
¶
Per-engine config for LM Studio.
ExoEngineConfig
dataclass
¶
Per-engine config for Exo.
NexaEngineConfig
dataclass
¶
Per-engine config for Nexa.
UzuEngineConfig
dataclass
¶
Per-engine config for Uzu.
AppleFmEngineConfig
dataclass
¶
Per-engine config for Apple Foundation Models.
EngineConfig
dataclass
¶
EngineConfig(default: str = 'ollama', ollama: OllamaEngineConfig = OllamaEngineConfig(), vllm: VLLMEngineConfig = VLLMEngineConfig(), sglang: SGLangEngineConfig = SGLangEngineConfig(), llamacpp: LlamaCppEngineConfig = LlamaCppEngineConfig(), mlx: MLXEngineConfig = MLXEngineConfig(), lmstudio: LMStudioEngineConfig = LMStudioEngineConfig(), exo: ExoEngineConfig = ExoEngineConfig(), nexa: NexaEngineConfig = NexaEngineConfig(), uzu: UzuEngineConfig = UzuEngineConfig(), apple_fm: AppleFmEngineConfig = AppleFmEngineConfig())
Inference engine settings with nested per-engine configs.
Attributes¶
IntelligenceConfig
dataclass
¶
IntelligenceConfig(default_model: str = '', fallback_model: str = '', model_path: str = '', checkpoint_path: str = '', quantization: str = 'none', preferred_engine: str = '', provider: str = '', temperature: float = 0.7, max_tokens: int = 1024, top_p: float = 0.9, top_k: int = 40, repetition_penalty: float = 1.0, stop_sequences: str = '')
The model — identity, paths, quantization, and generation defaults.
RoutingLearningConfig
dataclass
¶
Routing sub-policy config within Learning.
IntelligenceLearningConfig
dataclass
¶
Intelligence sub-policy config within Learning.
AgentLearningConfig
dataclass
¶
AgentLearningConfig(policy: str = 'none', max_icl_examples: int = 20, advisor_confidence_threshold: float = 0.7)
Agent sub-policy config within Learning.
MetricsConfig
dataclass
¶
MetricsConfig(accuracy_weight: float = 0.6, latency_weight: float = 0.2, cost_weight: float = 0.1, efficiency_weight: float = 0.1)
Reward / optimization metric weights.
LearningConfig
dataclass
¶
LearningConfig(enabled: bool = False, update_interval: int = 100, auto_update: bool = False, routing: RoutingLearningConfig = RoutingLearningConfig(), intelligence: IntelligenceLearningConfig = IntelligenceLearningConfig(), agent: AgentLearningConfig = AgentLearningConfig(), metrics: MetricsConfig = MetricsConfig(), training_enabled: bool = False, training_schedule: str = '', lora_rank: int = 16, lora_alpha: int = 32, min_sft_pairs: int = 50, min_improvement: float = 0.02)
StorageConfig
dataclass
¶
StorageConfig(default_backend: str = 'sqlite', db_path: str = str(DEFAULT_CONFIG_DIR / 'memory.db'), context_top_k: int = 5, context_min_score: float = 0.1, context_max_tokens: int = 2048, chunk_size: int = 512, chunk_overlap: int = 64)
Storage (memory) backend settings.
MCPConfig
dataclass
¶
MCP (Model Context Protocol) settings.
BrowserConfig
dataclass
¶
BrowserConfig(headless: bool = True, timeout_ms: int = 30000, viewport_width: int = 1280, viewport_height: int = 720)
Browser automation settings (Playwright).
ToolsConfig
dataclass
¶
ToolsConfig(storage: StorageConfig = StorageConfig(), mcp: MCPConfig = MCPConfig(), browser: BrowserConfig = BrowserConfig(), enabled: str = '')
Tools primitive settings — wraps storage and MCP configuration.
AgentConfig
dataclass
¶
ServerConfig
dataclass
¶
ServerConfig(host: str = '0.0.0.0', port: int = 8000, agent: str = 'orchestrator', model: str = '', workers: int = 1)
API server settings.
TelemetryConfig
dataclass
¶
TelemetryConfig(enabled: bool = True, db_path: str = str(DEFAULT_CONFIG_DIR / 'telemetry.db'), gpu_metrics: bool = False, gpu_poll_interval_ms: int = 50, energy_vendor: str = '', warmup_samples: int = 0, steady_state_window: int = 5, steady_state_threshold: float = 0.05)
Telemetry persistence settings.
TracesConfig
dataclass
¶
Trace system settings.
TelegramChannelConfig
dataclass
¶
TelegramChannelConfig(bot_token: str = '', allowed_chat_ids: str = '', parse_mode: str = 'Markdown')
Per-channel config for Telegram.
DiscordChannelConfig
dataclass
¶
Per-channel config for Discord.
SlackChannelConfig
dataclass
¶
Per-channel config for Slack.
WebhookChannelConfig
dataclass
¶
Per-channel config for generic webhooks.
EmailChannelConfig
dataclass
¶
EmailChannelConfig(smtp_host: str = '', smtp_port: int = 587, imap_host: str = '', imap_port: int = 993, username: str = '', password: str = '', use_tls: bool = True)
Per-channel config for email (SMTP/IMAP).
WhatsAppChannelConfig
dataclass
¶
Per-channel config for WhatsApp Cloud API.
SignalChannelConfig
dataclass
¶
Per-channel config for Signal (via signal-cli REST API).
GoogleChatChannelConfig
dataclass
¶
Per-channel config for Google Chat webhooks.
IRCChannelConfig
dataclass
¶
IRCChannelConfig(server: str = '', port: int = 6667, nick: str = '', password: str = '', use_tls: bool = False)
Per-channel config for IRC.
TeamsChannelConfig
dataclass
¶
Per-channel config for Microsoft Teams (Bot Framework).
MatrixChannelConfig
dataclass
¶
Per-channel config for Matrix.
MattermostChannelConfig
dataclass
¶
Per-channel config for Mattermost.
FeishuChannelConfig
dataclass
¶
Per-channel config for Feishu (Lark).
BlueBubblesChannelConfig
dataclass
¶
Per-channel config for BlueBubbles (iMessage bridge).
WhatsAppBaileysChannelConfig
dataclass
¶
WhatsAppBaileysChannelConfig(auth_dir: str = '', assistant_name: str = 'Jarvis', assistant_has_own_number: bool = False)
Per-channel config for WhatsApp via Baileys protocol.
ChannelConfig
dataclass
¶
ChannelConfig(enabled: bool = False, default_channel: str = '', default_agent: str = 'simple', telegram: TelegramChannelConfig = TelegramChannelConfig(), discord: DiscordChannelConfig = DiscordChannelConfig(), slack: SlackChannelConfig = SlackChannelConfig(), webhook: WebhookChannelConfig = WebhookChannelConfig(), email: EmailChannelConfig = EmailChannelConfig(), whatsapp: WhatsAppChannelConfig = WhatsAppChannelConfig(), signal: SignalChannelConfig = SignalChannelConfig(), google_chat: GoogleChatChannelConfig = GoogleChatChannelConfig(), irc: IRCChannelConfig = IRCChannelConfig(), webchat: WebChatChannelConfig = WebChatChannelConfig(), teams: TeamsChannelConfig = TeamsChannelConfig(), matrix: MatrixChannelConfig = MatrixChannelConfig(), mattermost: MattermostChannelConfig = MattermostChannelConfig(), feishu: FeishuChannelConfig = FeishuChannelConfig(), bluebubbles: BlueBubblesChannelConfig = BlueBubblesChannelConfig(), whatsapp_baileys: WhatsAppBaileysChannelConfig = WhatsAppBaileysChannelConfig())
Channel messaging settings.
CapabilitiesConfig
dataclass
¶
RBAC capability system settings.
SecurityConfig
dataclass
¶
SecurityConfig(enabled: bool = True, scan_input: bool = True, scan_output: bool = True, mode: str = 'warn', secret_scanner: bool = True, pii_scanner: bool = True, audit_log_path: str = str(DEFAULT_CONFIG_DIR / 'audit.db'), enforce_tool_confirmation: bool = True, merkle_audit: bool = True, signing_key_path: str = '', ssrf_protection: bool = True, rate_limit_enabled: bool = False, rate_limit_rpm: int = 60, rate_limit_burst: int = 10, capabilities: CapabilitiesConfig = CapabilitiesConfig())
Security guardrails settings.
SandboxConfig
dataclass
¶
SandboxConfig(enabled: bool = False, image: str = 'openjarvis-sandbox:latest', timeout: int = 300, workspace: str = '', mount_allowlist_path: str = '', max_concurrent: int = 5, runtime: str = 'docker', wasm_fuel_limit: int = 1000000, wasm_memory_limit_mb: int = 256)
Container sandbox settings.
SchedulerConfig
dataclass
¶
Task scheduler settings.
WorkflowConfig
dataclass
¶
Workflow engine settings.
SessionConfig
dataclass
¶
SessionConfig(enabled: bool = False, max_age_hours: float = 24.0, consolidation_threshold: int = 100, db_path: str = str(DEFAULT_CONFIG_DIR / 'sessions.db'))
Cross-channel session settings.
OperatorsConfig
dataclass
¶
OperatorsConfig(enabled: bool = False, manifests_dir: str = '~/.openjarvis/operators', auto_activate: str = '')
Operator lifecycle settings.
SpeechConfig
dataclass
¶
SpeechConfig(backend: str = 'auto', model: str = 'base', language: str = '', device: str = 'auto', compute_type: str = 'float16')
Speech-to-text settings.
OptimizeConfig
dataclass
¶
OptimizeConfig(max_trials: int = 20, early_stop_patience: int = 5, optimizer_model: str = 'claude-sonnet-4-6', optimizer_provider: str = 'anthropic', benchmark: str = '', max_samples: int = 50, judge_model: str = 'gpt-5-mini-2025-08-07', db_path: str = str(DEFAULT_CONFIG_DIR / 'optimize.db'))
Configuration optimization settings.
AgentManagerConfig
dataclass
¶
Persistent agent manager settings.
JarvisConfig
dataclass
¶
JarvisConfig(hardware: HardwareInfo = HardwareInfo(), engine: EngineConfig = EngineConfig(), intelligence: IntelligenceConfig = IntelligenceConfig(), learning: LearningConfig = LearningConfig(), tools: ToolsConfig = ToolsConfig(), agent: AgentConfig = AgentConfig(), server: ServerConfig = ServerConfig(), telemetry: TelemetryConfig = TelemetryConfig(), traces: TracesConfig = TracesConfig(), channel: ChannelConfig = ChannelConfig(), security: SecurityConfig = SecurityConfig(), sandbox: SandboxConfig = SandboxConfig(), scheduler: SchedulerConfig = SchedulerConfig(), workflow: WorkflowConfig = WorkflowConfig(), sessions: SessionConfig = SessionConfig(), a2a: A2AConfig = A2AConfig(), operators: OperatorsConfig = OperatorsConfig(), speech: SpeechConfig = SpeechConfig(), optimize: OptimizeConfig = OptimizeConfig(), agent_manager: AgentManagerConfig = AgentManagerConfig())
Top-level configuration for OpenJarvis.
Attributes¶
memory
property
writable
¶
memory: StorageConfig
Backward-compatible accessor — canonical location is tools.storage.
Functions¶
detect_hardware
¶
detect_hardware() -> HardwareInfo
Auto-detect hardware capabilities with graceful fallbacks.
Source code in src/openjarvis/core/config.py
recommend_engine
¶
recommend_engine(hw: HardwareInfo) -> str
Suggest the best inference engine for the detected hardware.
Source code in src/openjarvis/core/config.py
recommend_model
¶
recommend_model(hw: HardwareInfo, engine: str) -> str
Suggest the largest Qwen3.5 model that fits the detected hardware.
Uses llmfit-style VRAM estimation: Q4_K_M quantization is ~0.5 bytes/param
with 10% overhead. For MoE models Ollama loads full model weights, so we
use parameter_count_b (total), not active_parameter_count_b.
Source code in src/openjarvis/core/config.py
load_config
¶
load_config(path: Optional[Path] = None) -> JarvisConfig
Detect hardware, build defaults, overlay TOML overrides.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
Explicit config file. If not set, uses
TYPE:
|
Source code in src/openjarvis/core/config.py
generate_minimal_toml
¶
generate_minimal_toml(hw: HardwareInfo) -> str
Render a minimal TOML config with only essential settings.
Source code in src/openjarvis/core/config.py
generate_default_toml
¶
generate_default_toml(hw: HardwareInfo) -> str
Render a commented TOML string suitable for ~/.openjarvis/config.toml.
Source code in src/openjarvis/core/config.py
1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 | |