This document describes the full Myria configuration model.

Myria currently reads JSON configuration.

Top-Level Shape

{
  "service": {},
  "mcp": {},
  "postgres": {},
  "llm": {},
  "builder": {}
}

service

{
  "name": "myria",
  "log_level": "info",
  "log_file": "./myria.log"
}
  • name Required. Service identity.
  • log_level Optional in practice. Logging verbosity label used by the service layer.
  • log_file Optional but recommended. Append-only log file path for internal runtime logs. The current implementation writes JSON lines and calls fsync after each write.

mcp

{
  "transport": "stdio",
  "network": {
    "enabled": false,
    "listen_addr": ""
  }
}
  • transport Required. Must be "stdio" in v1.
  • network.enabled Must remain false in v1.
  • network.listen_addr Currently unused in v1 and should be left empty.

postgres

{
  "dsn": "postgres://myria:secret@127.0.0.1:5432/myria?sslmode=disable",
  "schema": "myria",
  "max_open_conns": 20,
  "max_idle_conns": 5,
  "migrate_on_start": false
}
  • dsn Required. PostgreSQL connection string.
  • schema Required. Schema name. Must contain only letters, digits, and underscores.
  • max_open_conns Maximum pool size.
  • max_idle_conns Minimum retained idle connections in the current implementation.
  • migrate_on_start When true, Myria runs migrations on startup.

llm

{
  "provider": "openrouter",
  "request_template_path": "./config/openrouter-llm.template.json",
  "timeout": "30s",
  "max_tool_rounds": 8,
  "temperature": 1.0,
  "top_p": 0.95,
  "structured_tool_calling_required": true
}
  • provider Required. Currently openrouter.
  • request_template_path Required. Path to the OpenRouter request template JSON file.
  • timeout Required. Per workflow timeout for builder and tree-walker calls.
  • max_tool_rounds Required. Maximum tool-call rounds for one internal LLM workflow.
  • temperature Stored configuration for the chosen model request profile.
  • top_p Stored configuration for the chosen model request profile.
  • structured_tool_calling_required When true, Myria treats plain-text non-tool responses as invalid in internal tool loops.

builder

{
  "inactivity_timeout": "30s",
  "max_unindexed_events": 100,
  "auto_publish": true,
  "allow_manual_trigger": true
}
  • inactivity_timeout Required. Global quiet-window trigger for background builds.
  • max_unindexed_events Required. Global tail threshold trigger.
  • auto_publish When true, validated snapshots are promoted automatically.
  • allow_manual_trigger Enables the admin-triggered build path.

OpenRouter Request Template

The request template is stored outside environment variables so the call shape is explicit and versionable.

Typical template:

{
  "model": "nvidia/nemotron-3-super-120b-a12b:free",
  "provider": {
    "sort": "throughput"
  },
  "temperature": 1.0,
  "top_p": 0.95,
  "usage": {
    "include": true
  },
  "headers": {
    "Authorization": "Bearer YOUR_OPENROUTER_API_KEY",
    "HTTP-Referer": "http://localhost",
    "X-Title": "myria"
  }
}

Myria injects dynamic fields such as:

  • messages
  • tools
  • tool_choice

During tool-calling requests, Myria also removes incompatible fields like response_format before sending the request.

Validation Rules

The current config validator enforces:

  • service.name is required
  • mcp.transport is required and must be stdio
  • mcp.network.enabled must be false
  • postgres.dsn is required
  • postgres.schema is required and sanitized
  • llm.provider is required
  • llm.request_template_path is required
  • llm.timeout must be positive
  • llm.max_tool_rounds must be positive
  • builder.inactivity_timeout must be positive
  • builder.max_unindexed_events must be positive

For a minimal working setup, see quickstart.md.