Skip to content

Autonomy Governor

Autonomy Governor -- mvp.autonomy_governor

Cluster: Experience & Autonomy | Type: component | MCP Tools: 33

Overview

Autonomy Governor that tracks and enforces the continuous autonomy level Au(t) for the G6 Physical AI system using a Sheridan-Verplank 10-level mapping and Fitts-taxonomy operation mode classification. Provides escalate/de-escalate controls, HITL checkpoint scheduling based on operation speed and oversight capacity, and outcome-driven autonomy adaptation across skill phases.

When to use:

  • Dynamically adjusting how much autonomy an agent has based on task risk, skill phase, and human capacity
  • Scheduling human-in-the-loop checkpoints at the right frequency for a given operation speed
  • Tracking the Sheridan authority level and operation mode to enforce deployment policy constraints

Example:

from mvp.autonomy_governor import AutonomyGovernorBlock, AutonomyGovernorInput

block = AutonomyGovernorBlock(name="governor")
block.infer(AutonomyGovernorInput(op="set_autonomy", autonomy_delta=0.3))
result = block.infer(AutonomyGovernorInput(
    op="assess_hitl_need", operation_speed=2.5, human_oversight_capacity=0.6,
))
# result.ok → True; result.value → AutonomyGovernorOutput with sheridan_level, needs_checkpoint

Works well with: autonomous_orchestrator, hat_orchestrator, experience_loop

Scope and honest limits:

  • This is a governed-state MCP adapter, not a full external-system adapter. The backend it adapts is the component's own SQLite store and internal policy/state model; it does not expose native ops over external orchestration runs, safety-engine ledgers, runtime policy registries, or live agent execution traces. That is a future scope item.
  • The Tier-1 block holds mutable state (it is not stateless). Autonomy out of range is clamped by phase/max caps, not rejected with ValueError.
  • The MCP store uses a single SQLite connection (check_same_thread=False, WAL) with no explicit per-call locking; it is not verified thread-safe for concurrent writers.
  • The optional check() LLM safety reviewer can only tighten the deterministic six-rule floor (ALLOW < REQUIRE_HITL < BLOCK); on reviewer failure the floor holds and the result is marked degraded (fail-closed). store_policy fails closed on invalid JSON or invalid AutonomyPolicy semantics before persistence.
  • Read-only inspection ops (get_recent_*, get_error_log, get_outcome_history, get_escalation_log, get_hitl_events) are bounded (top_k clamped to 100), redacted, and carry no executor authority. Outputs use the canonical completion_state trio verified / qualified-draft / blocked-escalated.

Launch validation caveat

The Autonomy Governor component has passing component-level tests and a direct MCP block smoke path, including autonomy status, HITL checkpoint assessment, snapshot storage, policy validation, and trend reporting. Before exposing it to first users, still run a clean-machine MCP install test and an end-to-end agent workflow test through the actual MCP host. Those checks are required to confirm packaging, tool discovery, environment setup, and multi-component orchestration outside the isolated component test path.

Public API

AutonomyGovernorBlock(AIBlock[AutonomyGovernorInput, AutonomyGovernorOutput, dict])

Autonomy Governor for the G6 Physical AI system.

Field Type Default
name str 'autonomy_governor'
state dict field(default_factory=dict)
resource_bounds ResourceBounds field(default_factory=ResourceBounds)
usage ResourceUsage field(default_factory=ResourceUsage)
max_autonomy float 0.9
default_autonomy float 0.3

Methods:

infer(data: AutonomyGovernorInput) -> Result[AutonomyGovernorOutput]

check(action: GovernedAction) -> GateVerdict

Gate verdict for a proposed action.

set_gate_review_planner(planner) -> None

Inject a gate-review planner (for tests).

set_policy(policy: AutonomyPolicy) -> None

Replace the active policy.

record_outcome_async(action_id: str, outcome: str) -> None

Async wrapper for recording outcomes (used by agent pool).

AutonomyPolicy

Field Type Default
policy_id str required
alpha float 0.02
beta float 0.05
gamma float 0.2
phase_caps dict field(default_factory=dict)
violation_threshold int 3
checkpoint_intervals dict field(default_factory=dict)
protected_components list field(default_factory=list)

AutonomyGovernorInput(BaseModel)

Input to AutonomyGovernorBlock.

Field Type Default
op Literal['get_autonomy', 'set_autonomy', 'escalate', 'deescalate', 'should_checkpoint', 'record_outcome', 'get_sheridan_level', 'get_operation_mode', 'assess_hitl_need', 'get_escalation_history', 'set_skill_phase', 'get_stats', 'reset'] required
autonomy_delta float 0.0
outcome str ''
action_type str ''
operation_speed float 0.0
human_oversight_capacity float 1.0
skill_phase str ''
metadata dict Field(default_factory=dict)

AutonomyGovernorOutput(BaseModel)

Output from AutonomyGovernorBlock.

Field Type Default
op str required
autonomy float 0.0
sheridan_level int 0
operation_mode str ''
needs_checkpoint bool False
checkpoint_reason str ''
hitl_frequency str ''
skill_phase str ''
escalation_history list[dict] Field(default_factory=list)
stats dict Field(default_factory=dict)
metadata dict Field(default_factory=dict)
degraded bool False
degradation_reason str ''

AutonomyGovernorMCPBlock(AIBlock[MCPAutonomyGovernorInput, MCPAutonomyGovernorOutput, dict])

25-op autonomy governor MCP block with SQLite persistence.

Field Type Default
name str 'autonomy_governor_mcp'
state dict field(default_factory=dict)
db_path str field(default_factory=lambda: os.environ.get('AUTONOMY_GOVERNOR_DB_PATH', _DEFAULT_DB))
resource_bounds ResourceBounds field(default_factory=ResourceBounds)
usage ResourceUsage field(default_factory=ResourceUsage)

Methods:

close() -> None

Close resources owned by the MCP block.

infer(data: MCPAutonomyGovernorInput) -> Result[MCPAutonomyGovernorOutput]

MCPAutonomyGovernorInput(BaseModel)

Input to AutonomyGovernorMCPBlock -- 33 ops.

Field Type Default
op Literal['get_autonomy', 'set_autonomy', 'escalate', 'deescalate', 'should_checkpoint', 'record_outcome', 'get_sheridan_level', 'get_operation_mode', 'assess_hitl_need', 'get_escalation_history', 'set_skill_phase', 'get_stats', 'reset', 'store_autonomy_snapshot', 'load_autonomy_snapshot', 'list_snapshots', 'store_policy', 'load_policy', 'list_policies', 'search_policies', 'analyze_autonomy_trend', 'get_hitl_stats', 'compare_autonomy_configs', 'export_autonomy_config', 'get_info', 'list_patterns', 'list_capabilities', 'get_recent_gate_reviews', 'get_recent_policy_decisions', 'get_error_log', 'get_outcome_history', 'get_escalation_log', 'get_hitl_events'] required
autonomy_delta float 0.0
outcome str ''
action_type str ''
operation_speed float 0.0
human_oversight_capacity float 1.0
skill_phase str ''
metadata dict Field(default_factory=dict)
snapshot_name str ''
policy_name str ''
policy_json str ''
query str ''
top_k int Field(default=10, gt=0, le=1000)
compare_id str ''

MCPAutonomyGovernorOutput(BaseModel)

Output from AutonomyGovernorMCPBlock.

Field Type Default
op str required
autonomy float 0.0
sheridan_level int 0
operation_mode str ''
needs_checkpoint bool False
checkpoint_reason str ''
hitl_frequency str ''
skill_phase str ''
escalation_history list[dict] Field(default_factory=list)
stats dict Field(default_factory=dict)
metadata dict Field(default_factory=dict)
message str ''
count int 0
retrieved list[dict] Field(default_factory=list)
degraded bool False
degradation_reason str ''
completion_state str 'qualified-draft'
warning_card dict Field(default_factory=dict)
evidence dict Field(default_factory=dict)
code str ''
backend str 'sqlite'
source_freshness str ''
request_id str ''
run_id str ''
verification_status dict Field(default_factory=lambda: {'verification_method': 'tier1_review_pending', 'calibration_pending': 'GDPval', 'maturity': 'beta'})

AutonomyGovernorStore

SQLite-backed store for the autonomy_governor MCP sub-package.

Constructor:

Parameter Type Default
db_path str ':memory:'

Methods:

close() -> None

Close the backing SQLite connection.

save_snapshot(name: str, state: dict, tags: str = '') -> str

load_snapshot(name: str) -> dict | None

list_snapshots(limit: int = 50) -> list[dict]

store_policy(name: str, policy_json: str, tags: str = '') -> str

load_policy(name: str) -> dict | None

list_policies(limit: int = 50) -> list[dict]

search_policies(query: str, top_k: int = 10) -> list[dict]

log_escalation(old_au: float, new_au: float, reason: str = '', metadata: dict | None = None) -> str

get_escalation_log(limit: int = 50) -> list[dict]

log_hitl_event(event_type: str, operation_speed: float = 0.0, human_capacity: float = 1.0, needs_checkpoint: bool = False, reason: str = '') -> str

get_hitl_stats() -> dict

get_hitl_events(limit: int = 50) -> list[dict]

Read-only: recent HITL checkpoint event rows (newest first).

log_outcome(outcome: str, action_type: str = '', autonomy_at: float = 0.0, metadata: dict | None = None) -> str

get_outcome_stats() -> dict

get_outcome_history(limit: int = 50) -> list[dict]

Read-only: recent recorded-outcome rows (newest first).

get_autonomy_trend(limit: int = 50) -> list[dict]

log_error(op: str, error_message: str, params: dict | None = None) -> None

get_error_log(limit: int = 50) -> list[dict]

Read-only: recent error rows (newest first).

get_policy_decisions(limit: int = 50) -> list[dict]

Read-only: recent stored-policy audit rows (newest first).

count_all() -> dict[str, int]

Functions

list_patterns() -> dict[str, Any]

Return the autonomy_governor applied-pattern + skill surface.

MCP Tools

Operation Source
get_autonomy autonomy_governor_mcp
set_autonomy autonomy_governor_mcp
escalate autonomy_governor_mcp
deescalate autonomy_governor_mcp
should_checkpoint autonomy_governor_mcp
record_outcome autonomy_governor_mcp
get_sheridan_level autonomy_governor_mcp
get_operation_mode autonomy_governor_mcp
assess_hitl_need autonomy_governor_mcp
get_escalation_history autonomy_governor_mcp
set_skill_phase autonomy_governor_mcp
get_stats autonomy_governor_mcp
reset autonomy_governor_mcp
store_autonomy_snapshot autonomy_governor_mcp
load_autonomy_snapshot autonomy_governor_mcp
list_snapshots autonomy_governor_mcp
store_policy autonomy_governor_mcp
load_policy autonomy_governor_mcp
list_policies autonomy_governor_mcp
search_policies autonomy_governor_mcp
analyze_autonomy_trend autonomy_governor_mcp
get_hitl_stats autonomy_governor_mcp
compare_autonomy_configs autonomy_governor_mcp
export_autonomy_config autonomy_governor_mcp
get_info autonomy_governor_mcp
list_patterns autonomy_governor_mcp
list_capabilities autonomy_governor_mcp
get_recent_gate_reviews autonomy_governor_mcp
get_recent_policy_decisions autonomy_governor_mcp
get_error_log autonomy_governor_mcp
get_outcome_history autonomy_governor_mcp
get_escalation_log autonomy_governor_mcp
get_hitl_events autonomy_governor_mcp