Expand description
Harness configuration (TOML surface, versioned).
Structs§
- Authzen
Config - External AuthZEN policy decision point (Authorization API 1.0).
- Backend
Config - Per-backend routing configuration (pillar 4).
- Harness
Config - Top-level harness configuration.
- Introspection
Token Config - Backend credential for introspection, separate from upstream credentials.
- Mission
Config - Mission configuration: narrows the static policy for a time window.
- Operator
Token Config - Operator credential for administrative revocation.
- Resolved
Backends - All four backend selections resolved into their typed forms.
- Workload
Identity Config [workload_identity]settings.- Workload
Mapping - One
[[workload_identities]]entry.
Enums§
- Backend
Auth - Authentication mode for a backend.
- Backend
Transport - Wire protocol spoken to a tool backend.
- Bridge
Backend - Typed bridge backend selection, resolved from the flat TOML fields.
- Config
Source - Where the effective configuration came from.
- Embedder
Backend - Typed embedding backend selection. See
BridgeBackend. - State
Backend - Typed state backend selection. See
BridgeBackendfor why the TOML surface stays flat while the resolved form is an enum. - Tenant
Content - Content exported to the tenant OTEL endpoint.
- Vector
Backend - Typed vector persistence backend selection. See
BridgeBackend.
Constants§
- CONFIG_
SEARCH_ PATHS - Well-known config locations probed in order when
AV_CONFIGis unset. Project-local files (current directory) beat the per-user file theavctlsetup wizard writes (seeuser_config_path). - CONFIG_
VERSION - Config format version (evolution surface).
- DEFAULT_
MCP_ REQUEST_ TIMEOUT_ S - Total deadline for an outbound MCP request, including its response body.
- DEFAULT_
UPSTREAM_ READ_ TIMEOUT_ S - Default upstream read-idle timeout. Successful reads restart this timer; it is not a total deadline for streamed chat responses.
- MAX_
MCP_ CONCURRENCY - Upper bound on
mcp_concurrency(R71). Each admitted MCP call can buffer up toMAX_TOOL_RESPONSE_BYTES = 16 MiBinread_limited_tool_response(routes.rs), so the cap × 16 MiB bounds worst-case MCP resident memory. 4 096 × 16 MiB = 64 GiB worst case — a soft ceiling: operators typically want much less, and a fat-finger config likemcp_concurrency = 100_000would otherwise silently commit the runtime to a memory pressure model no real host survives. Defence-in-depth likeMAX_WORKER_CHANNEL_CAPACITY. - MAX_
ONNX_ DIMENSION - Upper bound on
onnx_dimension. Most sentence-transformer models have <= 4096 dims (Nomic Embed v1.5 = 768, MiniLM = 384, e5-mistral = 4096, Ada-002 = 1536). 16k is a comfortable ceiling. - MAX_
REQUEST_ BYTES_ CAP - Upper bound on
max_request_bytes(512 MiB). A single request body should never legitimately need more; lifting this defeats the sandbox payload guard and lets one request pin half a GB of RAM. - MAX_
SECONDS_ INTERVAL - Upper bound on any
_sseconds interval. 1 day is already far beyond any reasonable value; anything larger is almost certainly a unit-conversion error (someone thought the field was in ms). - MAX_
WORKER_ CHANNEL_ CAPACITY - Upper bound on
worker_channel_capacity.tokio::sync::mpsc::channeldoes not preallocate slots (it links chunks lazily under a Semaphore), but an oversized value still lets the per-shard buffers grow unboundedly under overload and hides real backpressure signals. 1M is orders of magnitude above realistic capacity — this bound is defence-in-depth against a fat-finger, not a hard OOM prevention. - OTEL_
FLUSH_ SECS - Deadline the OpenTelemetry provider gets to flush pending spans on
shutdown when the
otelfeature is enabled. Same “single source of truth” purpose asWORKER_FINALIZE_PHASE_SECS. - WORKER_
FINALIZE_ PHASE_ SECS - Per-phase timeout applied to both the worker
wait_idledrain and thefinalize_sessionssweep infinish_shutdown. Exposed on the public surface so the deployment-manifest pin tests below can compute the total shutdown budget from the SAME source of truthmain.rsuses — a bump here that isn’t matched by a bump in the K8s / compose grace periods trips CI at build time.
Functions§
- load_
config - Load, apply environment overrides, and validate the effective config.
- load_
config_ with_ override load_configwith an explicit config path (e.g. from--config) taking precedence over$AV_CONFIGand the search paths. The explicit path must exist — a dangling operator-supplied path is a hard error, never a silent fallback to a different config.- resolve_
config_ source - Resolve the configuration source without reading it.
- user_
config_ path - Per-user config file (
~/.agentvisor/agentvisor.toml), if the home directory is known. - user_
config_ path_ from - Per-user config file inside
home, as written by theavctlwizard.