Advanced Parameters & Tuning

Lifecycle budget, Tailscale clustering, audit logging, and secret redaction

Lifecycle & Memory Budget Parameters

ParameterTypeDefaultDescription
total_budget_mbint0Combined RSS cap across all managed adapters in MB. 0 = unlimited (reliant on device RAM and Android LMK). Set to 70–80 % of device RAM for safe concurrent multi-adapter operation.
load_timeout_sfloat120.0Maximum seconds to wait for a COLD → HOT transition. Increase for large models (> 4 GB) on slower devices. Exceeding this raises LifecycleTimeoutError and transitions the adapter to ERROR.
inference_timeout_sfloat30.0Maximum seconds for a single .call() request. Prevents an ACTIVE adapter from stalling the orchestrator indefinitely.
auto_unload_idle_sfloat0Automatically unload an adapter after this many seconds of inactivity in HOT state. 0 = never auto-unload. Useful on low-RAM devices to reclaim memory between requests.

Clustering (Tailscale / UDP PIN) Parameters

ParameterTypeDefaultDescription
tailscale_keystr''Tailscale auth key for mesh VPN overlay. Empty string disables distributed clustering; the orchestrator manages local adapters only.
pin_pairing_portint29501UDP port used for zero-config 6-digit PIN pairing. The master broadcasts a signed UDP beacon; workers enter the PIN to authenticate.
pin_ttl_sint300Time-to-live for a one-time PIN in seconds. After expiry, a new PIN is issued automatically.

Audit Log Parameters

ParameterTypeDefaultDescription
audit_log_pathstr'~/.ameva/audit.log'File path for the tamper-evident SHA-256 hash-chained audit log. Each entry is linked to its predecessor's hash; run AuditChain.verify() to validate the chain.
audit_max_size_mbint100Maximum audit log file size before rotation in MB. Rotated logs are renamed with a timestamp suffix.
redact_secretsboolTruePasses all log entries through SecretRedactor before writing. Prevents Bearer tokens, API keys, and URL credentials from appearing in the audit log.