The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Agentos listing page.
A kernel architecture for governing autonomous AI agents
⭐ If this project helps you, please star it! It helps others discover Agent OS.
📦 Install the full stack:
pip install ai-agent-governance[full]— PyPI | GitHub
Quick Start • Documentation • VS Code Extension • Examples • Agent Hypervisor • AgentMesh • Agent SRE
Try Agent OS instantly in your browser - no installation required
1,680+Tests Passing | 12Framework Integrations | 170K+Combined Stars ofIntegrated Projects | <0.1ms p99Governance LatencyBenchmarks | 9More Framework ProposalsUnder Review |
| Framework | Stars | Status | Link |
|---|---|---|---|
| Dify | 65K ⭐ | ✅ Merged | dify-plugins#2060 |
| LlamaIndex | 47K ⭐ | ✅ Merged | llama_index#20644 |
| Microsoft Agent-Lightning | 15K ⭐ | ✅ Merged | agent-lightning#478 |
| LangGraph | 24K ⭐ | 📦 Published on PyPI | langgraph-trust |
| OpenAI Agents SDK | — | 📦 Published on PyPI | openai-agents-trust |
| OpenClaw | — | 📦 Published on ClawHub | agentmesh-governance |
| Framework | Stars | Proposal |
|---|---|---|
| AutoGen | 54K ⭐ | microsoft/autogen#7242 |
| CrewAI | 44K ⭐ | crewAIInc/crewAI#4502 |
| Haystack | 22K ⭐ | deepset-ai/haystack#10615 |
| Semantic Kernel | 27K ⭐ | microsoft/semantic-kernel#13556 |
| smolagents | 25K ⭐ | ✅ Adapter built — huggingface/smolagents#1989 |
| LangGraph | 24K ⭐ | langchain-ai/langgraph#6824 |
| Google ADK | 18K ⭐ | ✅ Adapter built — google/adk-python#4517 |
| PydanticAI | 15K ⭐ | ✅ Adapter built — pydantic/pydantic-ai#4335 |
| OpenAI Agents SDK | — | openai/openai-agents-python#2515 |
| A2A Protocol | 21K ⭐ | a2aproject/A2A#1501 |
| Oracle Agent Spec | — | oracle/agent-spec#105 |
| AI Card Spec | — | agent-card/ai-card#16 |
The AI agent market is projected to reach $47B by 2030. As enterprises deploy autonomous agents at scale, governance becomes the critical infrastructure layer. Agent OS is the kernel that ensures every agent action is policy-enforced, auditable, and compliant — making AI agents enterprise-ready.
The problem: AI agents can execute arbitrary tools, access sensitive data, and make autonomous decisions — with no built-in governance, audit trails, or policy enforcement.
Our solution: A governance kernel that sits between agents and their actions, providing deterministic policy enforcement in <1ms with zero agent code changes.
| Tool | Focus | When it acts |
|---|---|---|
| LangChain/CrewAI | Building agents | N/A (framework) |
| NeMo Guardrails | Input/output filtering | Before/after LLM call |
| LlamaGuard | Content classification | Before/after LLM call |
| Agent OS | Action interception | During execution |
Agent frameworks build agents. Safety tools filter I/O. Agent OS intercepts actions mid-execution — the only kernel-level governance layer.
Agent OS + ecosystem covers 8 out of 10 OWASP Agentic Application Security risks:
| Risk | Coverage | Module |
|---|---|---|
| ASI01 Agent Goal Hijack | ✅ Full | GovernancePolicy.blocked_patterns |
| ASI02 Tool Misuse | ✅ Full | MCPGateway — tool filtering, rate limiting, audit |
| ASI03 Identity & Privilege | ✅ Full | require_human_approval, RBAC policies |
| ASI04 Supply Chain | ⚠️ Partial | Tool allowlisting (no deep scanning yet) |
| ASI05 Code Execution | ✅ Full | blocked_patterns, sandbox integration |
| ASI06 Memory Poisoning | ✅ Full | MemoryGuard — hash integrity, injection detection |
| ASI07 Inter-Agent Comms | ✅ Full | AgentMesh trust handshake, HMAC auth |
| ASI08 Cascading Failures | ✅ Full | Agent SRE circuit breakers, cascade detection |
| ASI09 Human-Agent Trust | ✅ Full | Human approval workflows, audit logging |
| ASI10 Rogue Agents | ⚠️ Partial | Agent Hypervisor execution rings, kill switch |
| Layer | Package | Purpose | Install |
|---|---|---|---|
| Kernel | Agent OS | Policy enforcement, action interception | pip install agent-os-kernel |
| Network | AgentMesh | Identity, trust, delegation | pip install agentmesh-platform |
| Reliability | Agent SRE | SLOs, chaos testing, circuit breakers | pip install agent-sre |
| Runtime | Agent Hypervisor | Execution rings, resource limits, saga | pip install agent-hypervisor |
| Full Stack | ai-agent-governance | All of the above | pip install ai-agent-governance[full] |
That's it! Your agent now has deterministic policy enforcement. Learn more →
🎬 See all features in action:
See examples/ for 20+ runnable demos including SQL agents, GitHub reviewers, and compliance bots.
Result: Defined policies are deterministically enforced by the kernel—not by hoping the LLM follows instructions.
For the full kernel with signals, VFS, and protection rings:
Note:
KernelSpace,AgentSignal, andAgentVFSrequire installing the control-plane module:pip install agent-os-kernel[full]
Agent OS applies operating system concepts to AI agent governance. Instead of relying on prompts to enforce safety ("please don't do dangerous things"), it provides application-level middleware that intercepts and validates agent actions before execution.
Note: This is application-level enforcement (Python middleware), not OS kernel-level isolation. Agents run in the same process. For true isolation, run agents in containers.
Prompt-based safety asks the LLM to follow rules. The LLM decides whether to comply.
Kernel-based safety intercepts actions before execution. The policy engine decides, not the LLM.
This is the same principle operating systems use: applications request resources, the kernel grants or denies access based on permissions.
| Module | Layer | PyPI Package | Description | Status |
|---|---|---|---|---|
primitives | 1 | agent-primitives | Base failure types, severity levels | ✅ Stable |
cmvk | 1 | cmvk | Verification, drift detection | ✅ Stable |
emk | 1 | emk | Episodic memory kernel (append-only ledger) | ✅ Stable |
caas | 1 | caas-core | Context-as-a-Service, RAG pipeline | ✅ Stable |
amb | 2 | amb-core | Agent message bus (async pub/sub) | ✅ Stable |
iatp | 2 | inter-agent-trust-protocol | Sidecar trust protocol, typed IPC pipes | ✅ Stable |
atr | 2 | agent-tool-registry | Tool registry with LLM schema generation | ✅ Stable |
control-plane | 3 | agent-control-plane | THE KERNEL — Policy engine, signals, VFS | ✅ Stable |
observability | 3 | agent-os-observability | Prometheus metrics + OpenTelemetry tracing | ⚠️ No tests |
scak | 4 | scak | Self-correcting agent kernel | ✅ Stable |
mute-agent | 4 | mute-agent | Decoupled reasoning/execution architecture | ⚠️ No tests |
nexus | — | Not published | Trust exchange network | 🔬 Prototype |
mcp-kernel-server | Int | mcp-kernel-server | MCP server for Claude Desktop | ⚠️ No tests |
hypervisor | ⭐ | agent-hypervisor | Runtime supervisor — Execution Rings, Joint Liability, Saga Orchestrator (own repo) | ✅ 184 tests |
Runtime supervisor for multi-agent collaboration — think "VMware for AI agents."
Now its own repo:
agent-hypervisor— 184 tests, 268μs full pipeline, zero dependencies beyond pydantic.
Just as OS hypervisors isolate virtual machines and enforce resource boundaries, the Agent Hypervisor isolates AI agent sessions and enforces governance boundaries at sub-millisecond latency.
| Feature | Description | Latency |
|---|---|---|
| Execution Rings | 4-level privilege model (Ring 0–3) based on trust score | 0.3μs |
| Joint Liability | High-trust agents vouch for low-trust agents with bonded reputation | 7μs |
| Saga Orchestrator | Multi-step transactions with timeout, retry, and auto-compensation | 151μs |
| Delta Audit | Hash-chained semantic diffs with blockchain commitment | 27μs |
| Full Pipeline | Session + join + audit + saga + terminate | 268μs |
📖 Full Hypervisor documentation →
| Extension | Description | Status |
|---|---|---|
mcp-server | ⭐ MCP Server — Works with Claude, Copilot, Cursor (npx agentos-mcp-server) | ✅ Published (v1.0.1) |
vscode | VS Code extension with real-time policy checks, enterprise features | ✅ Published (v1.0.1) |
copilot | GitHub Copilot extension (Vercel/Docker deployment) | ✅ Published (v1.0.0) |
jetbrains | IntelliJ, PyCharm, WebStorm plugin (Kotlin) | ✅ Built (v1.0.0) |
cursor | Cursor IDE extension (Composer integration) | ✅ Built (v0.1.0) |
chrome | Chrome extension for GitHub, Jira, AWS, GitLab | ✅ Built (v1.0.0) |
github-cli | gh agent-os CLI extension | ⚠️ Basic |
Or with optional components:
macOS/Linux:
Windows (PowerShell):
pip install agent-os-kernel[full])Agent OS borrows concepts from POSIX operating systems:
| Concept | POSIX | Agent OS |
|---|---|---|
| Process control | SIGKILL, SIGSTOP | AgentSignal.SIGKILL, AgentSignal.SIGSTOP |
| Filesystem | /proc, /tmp | VFS with /mem/working, /mem/episodic |
| IPC | Pipes (|) | Typed IPC pipes between agents |
| Syscalls | open(), read() | kernel.execute() |
Wrap existing frameworks with Agent OS governance:
Note: These adapters use lazy interception — they don't require the target framework to be installed until you call
.wrap().
See integrations documentation for full details.
| Framework | Governance Level | Async Support | Status | Adapter File |
|---|---|---|---|---|
| LangChain | Chain/Agent/Runnable | ✅ ainvoke | ✅ Stable | integrations/langchain_adapter.py |
| OpenAI Assistants | Run/Thread/Tool Call | ✅ Streaming | ✅ Stable | integrations/openai_adapter.py |
| AutoGen | Multi-Agent Orchestration | ❌ Sync only | ✅ Stable | integrations/autogen_adapter.py |
| Semantic Kernel | Function/Plugin/Memory | ✅ Native async | ✅ Stable | integrations/semantic_kernel_adapter.py |
| CrewAI | Crew/Agent/Task | ❌ Sync only | ✅ Stable | integrations/crewai_adapter.py |
| OpenAI Agents SDK | Agent/Tool/Handoff | ✅ Native async | ✅ Stable | integrations/openai_agents_sdk_adapter.py |
The examples/ directory contains demos at various levels:
| Demo | Description | Command |
|---|---|---|
| demo-app | Uses the stateless API (most reliable) | cd examples/demo-app && python demo.py |
| hello-world | Minimal example | cd examples/hello-world && python agent.py |
| quickstart | Quick intro | cd examples/quickstart && python my_first_agent.py |
These examples are self-contained and don't require external Agent OS imports:
| Demo | Description |
|---|---|
| healthcare-hipaa | HIPAA-compliant agent |
| customer-service | Customer support agent |
| legal-review | Legal document analysis |
| crewai-safe-mode | CrewAI with safety wrappers |
| Demo | Description | Command |
|---|---|---|
| carbon-auditor | Multi-model verification | cd examples/carbon-auditor && docker-compose up |
| grid-balancing | Multi-agent coordination | cd examples/grid-balancing && docker-compose up |
| defi-sentinel | Real-time attack detection | cd examples/defi-sentinel && docker-compose up |
| pharma-compliance | Document analysis | cd examples/pharma-compliance && docker-compose up |
Each production demo includes:
Agent OS includes pre-built safe tools via the Agent Tool Registry:
Connect agents using the async message bus:
Broker adapters available for Redis, Kafka, and NATS (requires optional dependencies).
Agent OS includes a CLI for terminal workflows:
Agent OS provides an MCP server that works with any MCP-compatible AI assistant:
npm: agentos-mcp-server
MCP Registry: io.github.imran-siddique/agentos
Add to your config file:
Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json on Windows):
Features: 10 tools for agent creation, policy enforcement, compliance checking (SOC 2, GDPR, HIPAA), human-in-the-loop approvals, and audit logging.
See MCP server documentation for full details.
| Notebook | Description | Time |
|---|---|---|
| Hello Agent OS | Your first governed agent | 5 min |
| Episodic Memory | Agent memory that persists | 15 min |
| Time-Travel Debugging | Replay and debug decisions | 20 min |
| Verification | Detect hallucinations | 15 min |
| Multi-Agent Coordination | Trust between agents | 20 min |
| Policy Engine | Deep dive into policies | 15 min |
This is a research project exploring kernel concepts for AI agent governance.
These components are fully implemented and tested:
| Component | Tests |
|---|---|
StatelessKernel — Zero-dependency policy enforcement (src/agent_os/) | ✅ Full coverage |
| Policy Engine — Deterministic rule enforcement | ✅ Tested |
| Flight Recorder — SQLite-based audit logging | ✅ Tested |
CLI — agent-os check, init, secure, validate | ✅ Tested |
| Framework Adapters — LangChain, OpenAI, Semantic Kernel, CrewAI, AutoGen, OpenAI Agents SDK | ✅ Implemented |
| AGENTS.md Parser — OpenAI/Anthropic standard agent config | ✅ Full coverage |
Primitives (agent-primitives) — Failure types, severity levels | ✅ Tested |
CMVK (cmvk) — Drift detection, distance metrics (955+ lines) | ✅ Tested |
EMK (emk) — Episodic memory with JSONL storage | ✅ 8 test files |
AMB (amb-core) — Async message bus, DLQ, tracing | ✅ 6 test files |
IATP (inter-agent-trust-protocol) — Sidecar trust, typed IPC | ✅ 9 test files |
ATR (agent-tool-registry) — Multi-LLM schema generation | ✅ 6 test files |
Control Plane (agent-control-plane) — Signals, VFS, protection rings | ✅ 18 test files |
SCAK (scak) — Self-correcting agent kernel | ✅ 23 test files |
| Component | What's Missing |
|---|---|
Mute Agent (mute-agent) | No tests; all layer dependencies use mock adapters |
Observability (agent-os-observability) | No tests; Prometheus metrics, Grafana dashboards, OTel tracing implemented |
MCP Kernel Server (mcp-kernel-server) | No tests; 1173-line implementation |
| GitHub CLI Extension | Single bash script with simulated output |
| Control Plane MCP Adapter | Placeholder — returns canned responses |
| Control Plane A2A Adapter | Placeholder — negotiation accepts all params |
| Component | What's Missing |
|---|---|
| Nexus Trust Exchange | No pyproject.toml, no tests, placeholder cryptography (XOR — not secure), all signature verification stubbed, in-memory storage only |
| Limitation | Impact | Mitigation |
|---|---|---|
| Application-level only | Direct stdlib calls (subprocess, open) bypass kernel | Pair with container isolation for production |
| Blocklist-based policies | Novel attack patterns not in rules will pass | Add AST-level parsing (#32), use defense in depth |
| Shadow Mode single-step | Multi-step agent simulations diverge from reality | Use for single-turn validation only |
| No tamper-proof audit | Flight Recorder SQLite can be modified by compromised agent | Write to external sink for critical audits |
| Provider-coupled adapters | Each SDK needs separate adapter | Abstract interface planned (#47) |
See GitHub Issues for the full roadmap.
Prompt-based safety relies on instructing the LLM to follow rules via system prompts. This approach is probabilistic — the model may still produce unsafe outputs under certain conditions.
Agent OS enforces policies at the middleware layer. Actions are intercepted and validated before execution, making enforcement deterministic rather than dependent on model compliance.
Agent OS can wrap and govern agents built with popular frameworks including LangChain, CrewAI, AutoGen, Semantic Kernel, and the OpenAI SDK. It also supports MCP-based integrations.
Core components such as the StatelessKernel and Policy Engine are production-ready. However, Agent OS provides application-level enforcement. For high-security environments, it should be combined with infrastructure isolation (e.g., containers).
Custom policies can be defined programmatically in Python or declaratively using YAML. Policies define rules that inspect and allow or deny agent actions before execution.
Policy checks are lightweight and typically introduce only minimal latency per action. The overhead depends on the number and complexity of rules configured.
ModuleNotFoundError: No module named 'agent_os'
Optional modules not available
Permission errors on Windows
Docker not working
Tests failing with API errors
What is the difference between Agent OS and prompt-based guardrails? Prompt-based guardrails ask the LLM to self-police, which is probabilistic. Agent OS enforces governance at the middleware level using deterministic policy engines and POSIX-inspired access controls. It controls what agents can do (capability-based), not just what they should not do (filter-based).
How does Agent OS work with other frameworks?
Agent OS integrates with 14+ frameworks via adapters. Install the governance layer alongside your existing framework: use langgraph-trust for LangGraph, openai-agents-trust for OpenAI Agents, or the MCP server for any MCP-compatible client. Agent OS acts as a kernel layer underneath your agent framework.
What is the Agent Governance Ecosystem? Agent OS is part of a suite of four projects: Agent OS (policy kernel), AgentMesh (trust network), Agent Hypervisor (runtime supervisor), and Agent SRE (reliability platform). Together they provide 4,310+ tests across 17 modules.
Can I use Agent OS in production?
Yes. Agent OS has 1,500+ tests, a VS Code extension, PyPI package (pip install agent-os-kernel), and is integrated into production frameworks like Dify (65K stars) and LlamaIndex (47K stars). It supports Python 3.9+ and runs on any platform.
MIT — See LICENSE