A config schema defines the structure, types, and constraints of a config instance. It serves as a contract between code and configuration, ensuring that config instances are valid before being deployment to devices.Documentation Index
Fetch the complete documentation index at: https://docs.mirurobotics.com/llms.txt
Use this file to discover all available pages before exploring further.
Properties
The file format used to define the schema.Config schemas support the following file formats:
Note that a schema’s format does not need to match the format of the config instance it validates. For example, a YAML-formatted JSON Schema can validate a JSON-formatted config instance.Allowed values:
| Language | Schema Formats | Instance Formats |
|---|---|---|
| JSON Schema | JSON, YAML | JSON, YAML |
| CUE | CUE | JSON, YAML |
cuejsonyaml
The raw schema definition, written in the specified schema language.The exact contents of a schema file is preserved in Miru, including any comments, whitespace, and formatting.
A hash of the canonicalized schema content.Digests are computed by converting schemas to a canonical format—a format that ignores whitespace, comments, and other non-semantic differences—and then hashing the result. This is useful for comparing schemas and detecting duplicates.Examples:
sha256:45YeoJJ2btBnAKQztAEXEjHsqyyQfC1z1Mw3LLM4xMUyThe instance file path is the absolute file system path where config instances (for this schema) are written on the device.Instance file paths control the type of file that config instances are deployed as. Currently, JSON (
.json) and YAML (.yaml, .yml) are supported.The default instance file path is /srv/miru/configs/{config-type-slug}.json.Examples: /srv/miru/configs/v1/mobility.json, /srv/miru/configs/safety.yamlYAML support requires Miru Agent v0.7.0 or newer
The config type to which the schema belongs.Examples:
Mobility, Safety Features, PerceptionSchema languages
Config schemas are defined using a schema language—a formal language for describing the structure, constraints, and data types of a configuration. Miru supports:- JSON Schema (draft 2020-12)
- CUE
File formats
Config schemas support the following file formats:| Language | Schema Formats | Instance Formats |
|---|---|---|
| JSON Schema | JSON, YAML | JSON, YAML |
| CUE | CUE | JSON, YAML |
Validating instances
The primary purpose of schemas is to validate config instances. Let’s look at a simple example to see this in action. The following is a toy schema written in JSON Schema.JSON Schema
- Names the available properties
- Organizes the configuration structure, placing some properties at the root while nesting other properties into logical groups
- Gives each property a type, such as
number,boolean, etc. - Constrains the values of each property—minimums, maximums, enumerations, etc.
- Supplies default values to properties where appropriate

max_angular_speed_radps field exceeds the maximum allowed value of 3.0.
Luckily, before deployment to the device, the config instance is validated against the schema, throwing the following error:

max_angular_speed_radps field to use the maximum allowed value of 3.0 and deploy the config instance to the device.


