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.
GemmaCppEngineConfig
dataclass
¶
GemmaCppEngineConfig(model_path: str = '', tokenizer_path: str = '', model_type: str = '', num_threads: int = 0)
Per-engine config for gemma.cpp.
LemonadeEngineConfig
dataclass
¶
Per-engine config for Lemonade.
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(), gemma_cpp: GemmaCppEngineConfig = GemmaCppEngineConfig(), lemonade: LemonadeEngineConfig = LemonadeEngineConfig())
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.
SFTConfig
dataclass
¶
SFTConfig(model_name: str = 'Qwen/Qwen3-1.7B', max_seq_length: int = 4096, num_epochs: int = 3, batch_size: int = 8, learning_rate: float = 2e-05, weight_decay: float = 0.01, warmup_ratio: float = 0.1, max_grad_norm: float = 1.0, gradient_checkpointing: bool = True, use_lora: bool = True, lora_rank: int = 16, lora_alpha: int = 32, lora_dropout: float = 0.05, target_modules: str = 'q_proj,v_proj', use_4bit: bool = False, checkpoint_dir: str = 'checkpoints/sft', min_pairs: int = 10, agent_filter: str = '')
General-purpose SFT training config. Maps to [learning.intelligence.sft].
GRPOConfig
dataclass
¶
GRPOConfig(model_name: str = 'Qwen/Qwen3-1.7B', max_seq_length: int = 4096, max_response_length: int = 2048, num_epochs: int = 10, batch_size: int = 16, learning_rate: float = 1e-06, max_grad_norm: float = 1.0, gradient_checkpointing: bool = True, num_samples_per_prompt: int = 8, temperature: float = 1.0, kl_coef: float = 0.0001, clip_ratio: float = 0.2, use_8bit_ref: bool = True, checkpoint_dir: str = 'checkpoints/grpo', save_every_n_epochs: int = 1, keep_last_n: int = 3, min_prompts: int = 10, agent_filter: str = '')
General-purpose GRPO training config. Maps to [learning.intelligence.grpo].
DSPyOptimizerConfig
dataclass
¶
DSPyOptimizerConfig(optimizer: str = 'BootstrapFewShotWithRandomSearch', task_lm: str = '', teacher_lm: str = '', max_bootstrapped_demos: int = 4, max_labeled_demos: int = 4, num_candidate_programs: int = 10, max_rounds: int = 1, optimize_system_prompt: bool = True, optimize_few_shot: bool = True, optimize_tool_descriptions: bool = True, min_traces: int = 20, metric_threshold: float = 0.7, agent_filter: str = '', config_dir: str = '')
DSPy agent optimizer config. Maps to [learning.agent.dspy].
GEPAOptimizerConfig
dataclass
¶
GEPAOptimizerConfig(reflection_lm: str = '', max_metric_calls: int = 150, population_size: int = 10, optimize_system_prompt: bool = True, optimize_tools: bool = True, optimize_max_turns: bool = True, optimize_temperature: bool = True, min_traces: int = 20, assessment_batch_size: int = 10, agent_filter: str = '', config_dir: str = '')
GEPA agent optimizer config. Maps to [learning.agent.gepa].
IntelligenceLearningConfig
dataclass
¶
IntelligenceLearningConfig(policy: str = 'none', sft: SFTConfig = SFTConfig(), grpo: GRPOConfig = GRPOConfig())
Intelligence sub-policy config within Learning.
AgentLearningConfig
dataclass
¶
AgentLearningConfig(policy: str = 'none', dspy: DSPyOptimizerConfig = DSPyOptimizerConfig(), gepa: GEPAOptimizerConfig = GEPAOptimizerConfig())
Agent sub-policy config within Learning.
SkillsLearningConfig
dataclass
¶
SkillsLearningConfig(auto_optimize: bool = False, optimizer: str = 'dspy', min_traces_per_skill: int = 20, optimization_interval_seconds: int = 86400, overlay_dir: str = '~/.openjarvis/learning/skills/')
Configuration for the skills learning loop (Plan 2A).
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(), skills: SkillsLearningConfig = SkillsLearningConfig(), metrics: MetricsConfig = MetricsConfig(), training_enabled: bool = False, training_schedule: str = '', 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
¶
AgentConfig(default_agent: str = 'simple', max_turns: int = 10, tools: str = '', objective: str = '', system_prompt: str = '', system_prompt_path: str = '', context_from_memory: bool = True, default_system_prompt: str = "You are a helpful AI assistant running locally on the user's own hardware through OpenJarvis. You are not a cloud service. Respond helpfully, concisely, and accurately.")
ServerConfig
dataclass
¶
ServerConfig(host: str = '127.0.0.1', port: int = 8000, agent: str = 'orchestrator', model: str = '', workers: int = 1, cors_origins: list = (lambda: ['http://localhost:3000', 'http://localhost:5173', 'http://127.0.0.1:3000', 'http://127.0.0.1:5173', 'tauri://localhost'])())
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 = 'redact', 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 = True, rate_limit_rpm: int = 60, rate_limit_burst: int = 10, local_engine_bypass: bool = False, local_tool_bypass: bool = False, profile: str = '', vault_key_path: str = str(DEFAULT_CONFIG_DIR / '.vault_key'), 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.
MemoryFilesConfig
dataclass
¶
MemoryFilesConfig(soul_path: str = '~/.openjarvis/SOUL.md', memory_path: str = '~/.openjarvis/MEMORY.md', user_path: str = '~/.openjarvis/USER.md', nudge_interval: int = 10)
Persistent memory-file paths and nudge settings.
SystemPromptConfig
dataclass
¶
SystemPromptConfig(soul_max_chars: int = 4000, memory_max_chars: int = 2500, user_max_chars: int = 1500, skill_desc_max_chars: int = 60, truncation_strategy: str = 'head_tail')
Limits and strategy for system-prompt assembly.
CompressionConfig
dataclass
¶
CompressionConfig(enabled: bool = True, threshold: float = 0.5, strategy: str = 'session_consolidation')
Configuration for context compression.
SkillSourceConfig
dataclass
¶
SkillSourceConfig(source: str = '', url: str = '', filter: Dict[str, Any] = dict(), auto_update: bool = False)
Configuration for a single skill source (Hermes, OpenClaw, GitHub).
SkillsConfig
dataclass
¶
SkillsConfig(enabled: bool = True, skills_dir: str = '~/.openjarvis/skills/', active: str = '*', auto_discover: bool = True, auto_sync: bool = False, nudge_interval: int = 15, index_repo: str = 'https://github.com/openjarvis/skill-index.git', index_dir: str = '~/.openjarvis/skill-index/', max_depth: int = 5, sandbox_dangerous: bool = True, sources: List[SkillSourceConfig] = list())
Configuration for agent-authored procedural skills.
DigestSectionConfig
dataclass
¶
DigestSectionConfig(sources: List[str] = list(), max_items: int = 10, priority_contacts: List[str] = list())
Configuration for a single digest section.
DigestConfig
dataclass
¶
DigestConfig(enabled: bool = False, schedule: str = '0 6 * * *', timezone: str = 'America/Los_Angeles', persona: str = 'jarvis', sections: List[str] = (lambda: ['messages', 'calendar', 'health', 'world'])(), optional_sections: List[str] = (lambda: ['github', 'financial', 'music', 'fitness'])(), honorific: str = 'sir', voice_id: str = '', voice_speed: float = 1.0, tts_backend: str = 'cartesia', messages: DigestSectionConfig = (lambda: DigestSectionConfig(sources=['gmail', 'slack', 'google_tasks']))(), calendar: DigestSectionConfig = (lambda: DigestSectionConfig(sources=['gcalendar']))(), health: DigestSectionConfig = (lambda: DigestSectionConfig(sources=['oura', 'apple_health']))(), world: DigestSectionConfig = (lambda: DigestSectionConfig(sources=[]))())
Configuration for the morning digest feature.
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(), memory_files: MemoryFilesConfig = MemoryFilesConfig(), system_prompt: SystemPromptConfig = SystemPromptConfig(), compression: CompressionConfig = CompressionConfig(), skills: SkillsConfig = SkillsConfig(), digest: DigestConfig = DigestConfig())
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 best Qwen3.5 model that fits the detected hardware.
Uses an explicit tier table mapping available memory to model size. Falls back to scanning the full catalog if the tiered model is not compatible with the selected engine.
Source code in src/openjarvis/core/config.py
estimated_download_gb
¶
apply_security_profile
¶
apply_security_profile(security_cfg: 'SecurityConfig', server_cfg: 'ServerConfig | None', *, overrides: 'set[str] | None' = None) -> None
Expand a named security profile into config fields.
Fields in overrides (explicitly set by the user in TOML) are not overwritten by the profile.
Source code in src/openjarvis/core/config.py
validate_config_key
¶
Validate a dotted config key and return the leaf field's Python type.
Raises :class:ValueError when the key does not map to a known field.
The function walks the JarvisConfig dataclass hierarchy using
dataclasses.fields().
Examples::
validate_config_key("engine.ollama.host") # -> str
validate_config_key("intelligence.temperature") # -> float
Source code in src/openjarvis/core/config.py
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 | |
load_config
cached
¶
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
1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 | |
generate_minimal_toml
¶
generate_minimal_toml(hw: HardwareInfo, engine: str | None = None, *, host: str | None = None) -> 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, engine: str | None = None, *, host: str | None = None) -> str
Render a commented TOML string suitable for ~/.openjarvis/config.toml.
Source code in src/openjarvis/core/config.py
1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 | |