Skip to main content
Every call is a POST whose JSON body names the brain, the way dist pull would, and may carry a portable configuration:
Beside brain and config, the body takes what query search takes, under the flags’ names:
data.evidence is the bundle vitruvio search --json prints, read the same way: score is agreement between strategies, not a probability; truncated must be checked before saying the brain lacks something; superseded_by names a successor. Searching explains each field. Around it, every query response carries the manifest digest the tag resolved to, the snapshot digest inside it, the brain’s authenticity, and the actor the request was served as — so a result can be tied to exactly the version that produced it.

Explain, state, resolve

/v1/explain takes the search body (diagnostics is ignored) and answers with data.explanation; /v1/brain/state answers with data.state; /v1/blocks/resolve takes block_id and answers with data.block.

The portable config

config is the part of a vitruvio.toml that is about the brain rather than about a machine: actor, assisted_by, authenticity, policy, embedding, index, planner and ingest. Paths, source commands and credentials have no field, because the server owns those. The server writes it into a temporary vitruvio.toml and loads it with the same loader a project uses, so a request is checked the way a config file is: a null field means what an absent one means, an unknown field inside a known section is 400 CONFIG_INVALID, and an unknown top-level key is 422 USAGE. Reads need no actor; config.actor is for ingestion. An embedding base_url must be one the operator listed in VITRUVIO_SERVER_ALLOWED_EMBEDDING_URLS, or the request is refused before any key is sent anywhere.

One envelope

Every answer, success or failure, is the envelope the CLI prints under --json. Branch on ok, then on error.code, and read warnings even when ok is true: a governed brain served from an unsigned head says so there.

How a brain is cached

Each request resolves its tag against the registry, so a moved tag is noticed at once. The resolved manifest digest, together with the request’s config, is the cache key: at most four installed layouts are kept, in temporary directories, and the least recently used is dropped. Two requests that miss on the same key share one pull. A pull whose downloaded manifest is not the one that was resolved is refused with OCI_TAG_MOVED rather than served under the wrong digest. A governed brain is also checked for signatures published after it was cached. Signatures are referrers, so they do not move the manifest digest; a head whose referrers changed is re-installed so the new authenticity is seen. An unsigned governed head is served with a warning; a head the pull gate does not authorize is refused.

Next

The ingest API: jobs, items, and the tag the worker publishes.