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¶
ConfigurationError
¶
Bases: RuntimeError
Raised when the resolved home directory would violate isolation guarantees.
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.
AfmEngineConfig
dataclass
¶
AfmEngineConfig(instructions: str = '', use_case: str = 'general', guardrails: str = 'default', sampling: str = 'greedy')
Per-engine config for in-process Apple Foundation Models.
No host: this engine runs the SDK in-process rather than talking to a
server. (The separate apple_fm engine does have a host — it speaks to
the FastAPI shim.)
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(), afm: AfmEngineConfig = AfmEngineConfig(), gemma_cpp: GemmaCppEngineConfig = GemmaCppEngineConfig(), lemonade: LemonadeEngineConfig = LemonadeEngineConfig())
Inference engine settings with nested per-engine configs.
Attributes¶
IntelligenceConfig
dataclass
¶
IntelligenceConfig(default_model: str = '', model_chat: str = '', model_short: str = '', model_long: str = '', model_code: 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.
DeepResearchConfig
dataclass
¶
Planner settings for the web Deep Research endpoint.
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].
ACEOptimizerConfig
dataclass
¶
ACEOptimizerConfig(generator_model: str = '', reflector_model: str = '', curator_model: str = '', api_provider: str = 'openai', num_epochs: int = 1, max_num_rounds: int = 3, eval_steps: int = 100, playbook_token_budget: int = 80000, max_tokens: int = 4096, save_dir: str = '', task_name: str = 'openjarvis', min_traces: int = 20, agent_filter: str = '', config_dir: str = '')
ACE agent optimizer config. Maps to [learning.agent.ace].
ACE (Agentic Context Engineering) evolves a playbook — annotated natural-language strategies that get prepended to the agent's context — using a Generator / Reflector / Curator triad. Unlike DSPy (few-shot bootstrapping) or GEPA (Pareto-evolutionary prompt mutation), ACE writes a textual playbook that the agent reads at inference time.
See https://github.com/ace-agent/ace for the upstream reference.
Install via pip install -e openjarvis[learning-ace] once the
optional dep is available (ACE is not on PyPI as of v1.0.1; the
extra installs from the upstream git repo).
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(), ace: ACEOptimizerConfig = ACEOptimizerConfig())
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 = (lambda: str(get_config_dir() / '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.
SpecSearchCompositeRewardConfig
dataclass
¶
SpecSearchCompositeRewardConfig(alpha: float = 0.5, beta: float = 0.1, gamma: float = 0.1, delta: float = 0.3)
Composite reward weights for Intelligence-edit training (paper Eq. 1).
R(q, y) = alpha * R_acc - beta * E_hat - gamma * L_hat - delta * C_hat
SpecSearchLearningConfig
dataclass
¶
SpecSearchLearningConfig(enabled: bool = False, teacher_model: str = 'claude-opus-4-6', teacher_engine: str = 'cloud', autonomy_mode: str = 'tiered', min_traces: int = 20, max_cost_per_session_usd: float = 5.0, max_tool_calls_per_diagnosis: int = 30, stagnation_k: int = 5, max_total_cost_usd: float = 50.0, stagnation_eps: float = 0.001, max_regression: float = 0.01, min_improvement: float = 0.0, benchmark_subsample_size: int = 50, benchmark_version: str = 'personal_v1', composite_reward: SpecSearchCompositeRewardConfig = SpecSearchCompositeRewardConfig())
LLM-guided spec search config (paper §3.3, Algorithm 1).
Maps to [learning.spec_search] and is consumed by
SpecSearchOrchestrator.from_config and SpecSearchLoop.
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(), spec_search: SpecSearchLearningConfig = SpecSearchLearningConfig(), 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 = (lambda: str(get_config_dir() / 'memory.db'))(), context_top_k: int = 5, context_min_score: float = 0.0, context_max_tokens: int = 2048, chunk_size: int = 512, chunk_overlap: int = 64, enabled: bool = False, backend: str = 'local', extraction_model: str = '', max_facts: int = 1000, facts_path: str = (lambda: str(get_config_dir() / 'memory_facts.jsonl'))())
Storage (memory) backend settings.
Covers both the retrieval/document store (default_backend, db_path,
chunking, context injection) and the automatic long-term memory service
(enabled, backend, extraction_model, max_facts,
facts_path) configured under [memory] in config.toml.
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).
WeatherToolConfig
dataclass
¶
WeatherToolConfig(provider: str = 'openweathermap', default_location: str = '', units: str = 'metric', lang: str = 'en')
Native weather tool settings (credentials stay outside config.toml).
ToolsConfig
dataclass
¶
ToolsConfig(storage: StorageConfig = StorageConfig(), mcp: MCPConfig = MCPConfig(), browser: BrowserConfig = BrowserConfig(), weather: WeatherToolConfig = WeatherToolConfig(), 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 OpenJarvis, a helpful AI assistant running locally on the user's own hardware. You are not a cloud service, and you are not Claude, ChatGPT, Gemini, or any other branded assistant. If asked who or what you are, identify yourself as OpenJarvis. 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://localhost:5174', 'http://127.0.0.1:3000', 'http://127.0.0.1:5173', 'http://127.0.0.1:5174', 'tauri://localhost', 'http://tauri.localhost', 'https://tauri.localhost'])())
API server settings.
TelemetryConfig
dataclass
¶
TelemetryConfig(enabled: bool = True, db_path: str = (lambda: str(get_config_dir() / 'telemetry.db'))(), gpu_metrics: bool = False, gpu_poll_interval_ms: int = 50, energy_vendor: str = '', allow_energy_estimates: bool = False, warmup_samples: int = 0, steady_state_window: int = 5, steady_state_threshold: float = 0.05)
Telemetry persistence settings.
AnalyticsConfig
dataclass
¶
AnalyticsConfig(enabled: bool = True, host: str = 'https://34.231.106.201.sslip.io', key: str = 'phc_ysKu72QaxzYNmDpHFcesD2ZZAe68zkdWJEKoYYkc5e3n', anon_id_path: str = (lambda: str(get_config_dir() / 'anon_id'))(), flush_interval_seconds: int = 30, flush_at_size: int = 100)
External anonymous usage analytics (PostHog).
Separate concern from :class:TelemetryConfig, which stores local
FLOPs/energy/inference metrics in SQLite. This controls anonymized
usage events sent to the OpenJarvis team's PostHog instance to
measure setup success, retention, feature usage, and churn.
No chat content, prompts, model outputs, file paths, emails, IPs,
or hardware identifiers are ever sent. See docs/telemetry.md.
TracesConfig
dataclass
¶
TracesConfig(enabled: bool = True, db_path: str = (lambda: str(get_config_dir() / 'traces.db'))())
Trace system settings.
ProactiveConfig
dataclass
¶
ProactiveConfig(enabled: bool = False, schedule: str = '0 5 * * *', hours_back: int = 24, timezone: str = 'America/Los_Angeles', notification_channel: str = '')
Proactive agent — autonomous action scheduling and approval routing.
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 = (lambda: str(get_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 = (lambda: str(get_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 = (lambda: str(get_config_dir() / 'sessions.db'))())
Cross-channel session settings.
A2AConfig
dataclass
¶
Agent-to-Agent protocol settings.
OperatorsConfig
dataclass
¶
OperatorsConfig(enabled: bool = False, manifests_dir: str = (lambda: str(get_config_dir() / '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', tts_backend: str = 'kokoro', voice_id: str = 'bm_george', voice_speed: float = 1.0)
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 = (lambda: str(get_config_dir() / 'optimize.db'))())
Configuration optimization settings.
AgentManagerConfig
dataclass
¶
AgentManagerConfig(enabled: bool = True, db_path: str = (lambda: str(get_config_dir() / 'agents.db'))())
Persistent agent manager settings.
MemoryFilesConfig
dataclass
¶
MemoryFilesConfig(soul_path: str = (lambda: str(get_config_dir() / 'SOUL.md'))(), memory_path: str = (lambda: str(get_config_dir() / 'MEMORY.md'))(), user_path: str = (lambda: str(get_config_dir() / 'USER.md'))(), nudge_interval: int = 10, persona_name: str = '')
Persistent memory-file paths and nudge settings.
SystemPromptConfig
dataclass
¶
SystemPromptConfig(prefix: str = '', 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 = (lambda: str(get_config_dir() / '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 = (lambda: str(get_config_dir() / '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(installed_at: str = '', installer_version: str = '', hardware: HardwareInfo = HardwareInfo(), engine: EngineConfig = EngineConfig(), intelligence: IntelligenceConfig = IntelligenceConfig(), deep_research: DeepResearchConfig = DeepResearchConfig(), learning: LearningConfig = LearningConfig(), tools: ToolsConfig = ToolsConfig(), agent: AgentConfig = AgentConfig(), server: ServerConfig = ServerConfig(), telemetry: TelemetryConfig = TelemetryConfig(), analytics: AnalyticsConfig = AnalyticsConfig(), 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(), proactive: ProactiveConfig = ProactiveConfig(), mining: Optional['MiningConfig'] = None)
Top-level configuration for OpenJarvis.
Attributes¶
memory
property
writable
¶
memory: StorageConfig
Backward-compatible accessor — canonical location is tools.storage.
Functions¶
get_cache_dir
¶
Resolve the directory for regenerable caches (eval datasets, etc.).
Lives at <root>/cache so caches stay inside the single OpenJarvis
directory instead of scattering across ~/.cache.
Source code in src/openjarvis/core/paths.py
get_config_dir
¶
Resolve OpenJarvis' single root directory, honoring env overrides.
Precedence: $OPENJARVIS_HOME > $XDG_DATA_HOME/openjarvis >
~/.openjarvis. The result is always absolute and is rejected if it
falls inside the OpenJarvis source tree.
Source code in src/openjarvis/core/paths.py
get_config_path
¶
get_data_dir
¶
Resolve the directory for persistent data (databases, blobs, …).
Consolidated under the single root; identical to :func:get_config_dir.
Provided as a distinct name so call sites read intentionally.
Source code in src/openjarvis/core/paths.py
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 a default model for the selected engine and hardware.
For Lemonade, prefer the validated Qwen3.6 35B A3B GGUF default. For other local engines, use the generic Qwen3.5 tier mapping.
Source code in src/openjarvis/core/config.py
estimated_download_gb
¶
resolve_json_or_file
¶
Resolve a config value that is either inline JSON or a path to a JSON file.
| PARAMETER | DESCRIPTION |
|---|---|
raw
|
Either a JSON string (starts with '[' or '{') or a file path to a .json file containing the data.
TYPE:
|
config_dir
|
Directory of config.toml, used to resolve relative file paths.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Parsed JSON value (dict, list, etc.), or ``None`` if *raw* is empty.
|
|
| RAISES | DESCRIPTION |
|---|---|
ValueError: If a relative path escapes the config directory.
|
|
FileNotFoundError: If the referenced file does not exist.
|
|
json.JSONDecodeError: If the JSON content is malformed.
|
|
Source code in src/openjarvis/core/config.py
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | |
resolve_mcp_servers
¶
Resolve MCP server configuration from inline JSON or an external file.
Wraps :func:resolve_json_or_file with MCP-specific validation:
a single server object {...} is automatically wrapped in a list,
and the result must be a list.
Source code in src/openjarvis/core/config.py
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
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 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 | |
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
2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 | |
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
2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 | |