Skip to content

Agent Runtime

# AgentMesh Runtime **Execution supervisor for multi-agent sessions โ€” privilege rings, saga orchestration, and governance enforcement** *Part of the [Agent Governance Toolkit](https://github.com/microsoft/agent-governance-toolkit)* [![CI](https://github.com/microsoft/agent-governance-toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/agent-governance-toolkit/actions/workflows/ci.yml) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](../../LICENSE) [![Python](https://img.shields.io/badge/python-3.11+-blue.svg)](https://python.org) [![PyPI](https://img.shields.io/pypi/v/agentmesh-runtime)](https://pypi.org/project/agentmesh-runtime/)

[!IMPORTANT] Public Preview โ€” The agentmesh-runtime package on PyPI is a Microsoft-signed public preview release. APIs may change before GA.


Note: This package was renamed from agent-runtime to agentmesh-runtime to avoid a PyPI name collision with the AutoGen team's package. The agent-hypervisor package remains the canonical upstream implementation; agentmesh-runtime is a thin re-export wrapper for incremental import migration.

What is Agent Runtime?

Agent Runtime provides execution-level supervision for autonomous AI agents. While Agent OS handles policy decisions and AgentMesh handles trust/identity, Agent Runtime enforces those decisions at the session level:

  • Execution Rings โ€” 4-tier privilege model (Ring 0โ€“3) controlling what agents can do at runtime
  • Shared Sessions โ€” Multi-agent session management with consistency modes (strict, eventual, causal)
  • Saga Orchestration โ€” Compensating transactions for multi-step agent workflows
  • Kill Switch โ€” Immediate termination with audit trail and blast radius containment
  • Joint Liability โ€” Attribution tracking across multi-agent collaborations
  • Audit Trails โ€” Hash-chained, append-only execution logs

Quick Start

pip install agentmesh-runtime
from hypervisor import Hypervisor, SessionConfig, ConsistencyMode

# Create the runtime supervisor
hv = Hypervisor()

# Create a governed session
session = await hv.create_session(
    config=SessionConfig(consistency_mode=ConsistencyMode.EVENTUAL)
)

# Execute with privilege enforcement
result = await session.execute(
    agent_id="researcher-1",
    action="tool_call",
    tool="web_search",
    ring=2  # restricted privilege ring
)

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Agent Runtime                                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Execution  โ”‚     Session      โ”‚      Saga        โ”‚    Liability    โ”‚
โ”‚   Rings     โ”‚   Management     โ”‚  Orchestration   โ”‚    Tracking     โ”‚
โ”‚             โ”‚                  โ”‚                  โ”‚                 โ”‚
โ”‚  Ring 0:    โ”‚  Create/join     โ”‚  Multi-step      โ”‚  Attribution    โ”‚
โ”‚   System    โ”‚  Consistency     โ”‚  Compensation    โ”‚  Vouching       โ”‚
โ”‚  Ring 1:    โ”‚  Checkpoints     โ”‚  Rollback        โ”‚  Slashing       โ”‚
โ”‚   Trusted   โ”‚  Merge/fork      โ”‚  Recovery        โ”‚  Quarantine     โ”‚
โ”‚  Ring 2:    โ”‚                  โ”‚                  โ”‚                 โ”‚
โ”‚   Standard  โ”‚                  โ”‚                  โ”‚                 โ”‚
โ”‚  Ring 3:    โ”‚                  โ”‚                  โ”‚                 โ”‚
โ”‚   Sandboxed โ”‚                  โ”‚                  โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Ecosystem

Agent Runtime is one of 7 packages in the Agent Governance Toolkit:

Package Role
Agent OS Policy engine โ€” deterministic action evaluation
AgentMesh Trust infrastructure โ€” identity, credentials, protocol bridges
AgentMesh Runtime Execution supervisor โ€” rings, sessions, sagas (this package)
Agent SRE Reliability โ€” SLOs, circuit breakers, chaos testing
Agent Compliance Regulatory compliance โ€” GDPR, HIPAA, SOX frameworks
Agent Marketplace Plugin lifecycle โ€” discover, install, verify, sign
Agent Lightning RL training governance โ€” governed runners, policy rewards

License

MIT โ€” see LICENSE.