# Architecture
## Overview
The Agentic OS Protocol (OSP) is built on a modular architecture that separates concerns and enables flexible composition of agent systems.
## Philosophy and Foundations
OSP doesn't create everything from scratch. Instead, it adapts proven philosophies and patterns that have demonstrated effectiveness in production environments, combined with our own contributions and experience in infrastructure design.
### Influences and Adaptations
OSP draws inspiration from several key sources:
* **[Anthropic: Building Effective Agents](https://www.anthropic.com/engineering/building-effective-agents)**: Workflow patterns (Routing, Prompt Chaining, Orchestrator-Workers, Parallelization, Evaluator-Optimizer) form the foundation of our workflow taxonomy.
* **[Agent Communication Protocol](https://agentcommunicationprotocol.dev/core-concepts/agent-run-lifecycle)**: The concept of **Runs**—essential for multi-agent systems—provides the lifecycle management framework.
* **[Claude Agent SDK](https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk)**: The **Agent Loop** execution pattern (Gather Context → Take Action → Verify Work → Iterate) defines our core cognitive cycle.
These patterns have been adapted and extended to work together in a unified protocol specification that emphasizes interoperability, scalability, and system-level orchestration.
### The Operating System Concept
Where OSP contributes uniquely is in the **Operating System** abstraction—a layer that provides system intelligence through standardized APIs. This OS layer manages the lifecycle, coordination, and resource management that multi-agent systems require.
> **Understanding the Metaphor**: Just as traditional operating systems abstract hardware resources (CPU, memory, disk), an Agentic OS abstracts cognitive resources (inference, context, knowledge, tools). The [Agentic OS concept](/docs/concepts/agentic-os) defines this paradigm—OSP is the protocol specification that implementations follow.
Just as traditional operating systems provide process management, memory management, and I/O interfaces, OSP's Operating System provides:
* **Agent Registry**: Discovery and capability management
* **System APIs**: Environment, Filesystem, Settings
* **Context Management**: Memory, Documents, Persistence
* **Quality Assurance**: Audit, Rules, Fallback
## Architecture Layers
The protocol architecture is organized into four core layers:
### 1. Skills Framework
The foundation of agent capabilities, defining specialized roles that agents can assume:
* **Orchestrator**: Coordinates multiple agents, manages task distribution, load balancing, and conflict resolution
* **Planner**: Breaks down complex objectives into actionable tasks with dependency analysis
* **Executor**: Handles the actual execution of agent tasks using tools, APIs, and scripts
These skills work together: Orchestrators delegate to Planners for decomposition, which then assign tasks to Executors for implementation.
### 2. Operating System (System Intelligence)
The OS layer provides infrastructure services that all agents depend on. Unlike traditional protocols that focus solely on agent-to-agent communication, OSP includes system-level intelligence:
* **Registry**: Manages agent registration, discovery, and capability matching
* **Environment**: Handles configuration and environment variable management
* **Filesystem**: Provides standardized file system operation interfaces
* **Settings**: Manages preferences, configurations, and user-defined parameters
* **MCP Client**: Integrates with Model Context Protocol for external tool access
### 3. Context Management
Context is what enables agents to maintain state, share information, and build upon previous interactions:
* **Memory**: Persistent storage for agent knowledge and experiences
* **Documents**: Document processing, ingestion, and retrieval interfaces
* **Embeddings**: Vector database integration for semantic search (optional)
* **Apps**: Application-specific context isolation and sharing
* **Persistence**: State management and checkpointing for long-running agents
### 4. Quality Assurance
Built-in mechanisms for ensuring reliability, compliance, and quality:
* **Audit**: Comprehensive monitoring and logging of agent behavior
* **Judge**: LLM-based evaluation of agent outputs and decisions (optional)
* **Rules**: Behavioral constraints and validation frameworks
* **Screenshot**: Visual validation for UI-related tasks (optional)
* **Fallback**: Error handling, retry logic, and recovery mechanisms
## Core Execution Model
### The Agent Loop
At the heart of every agent is the **Agent Loop**, the cognitive cycle that drives execution:
This loop executes within workflows and is managed by the Operating System during the Execution phase of the Agent Lifecycle.
Learn more: [Agent Loop](/docs/concepts/agent-loop)
### The Agent Lifecycle
At the system level, agents follow a **Lifecycle** that spans their entire existence:
* **Registration**: Agents declare capabilities to the Registry
* **Discovery**: The OS matches agents to tasks based on capabilities
* **Execution**: The Agent Loop runs within workflows
* **Evaluation**: Performance, quality, and compliance are assessed
Learn more: [Agent Lifecycle](/docs/concepts/lifecycle)
## Integration Patterns
OSP is designed to integrate with existing protocols and systems:
### MCP Integration
OSP includes native support for the Model Context Protocol, allowing agents to access external tools and resources through standardized MCP servers. The OS provides MCP client functionality that any agent can leverage.
### Workflow Orchestration
The protocol defines workflow patterns that can be composed and combined:
* **Task Workflows**: Routing, Prompt Chaining, Orchestrator-Workers, Parallelization, Evaluator-Optimizer
* **Quality Workflows**: Rules Validation, Visual Feedback, LLM-as-Judge
* **Recovery Workflows**: Retries, Fallback, Timeouts
* **Human-in-the-Loop**: Approval Workflows, Manual Delegation
Learn more: [Workflow Taxonomy](/docs/concepts/workflows-taxonomy)
### Multi-Agent Coordination
OSP enables agents from different implementations to work together through standardized interfaces. Agents can coordinate tasks, share context (with proper isolation), and participate in distributed workflows.
## Design Philosophy
The architecture prioritizes:
* **Modularity**: Components can be used independently or together
* **Extensibility**: New components and capabilities can be added without breaking existing implementations
* **Interoperability**: Different implementations can work together through standardized contracts
* **Reliability**: Built-in error handling, recovery mechanisms, and quality assurance
* **Observability**: Comprehensive monitoring, auditing, and evaluation capabilities
* **Scalability**: Designed to grow from single-agent systems to complex multi-agent environments
## Next Steps
* Explore **[Skills](/docs/skills/orchestrator)** to understand agent capabilities
* Learn about **[System Intelligence](/docs/system/registry)** for infrastructure services
* Understand **[Context Management](/docs/context)** for state and persistence
* Review **[Quality Assurance](/docs/checks/rules)** mechanisms
* See the complete specification in [AGENTS.md Section 4](https://github.com/synerops/osprotocol/blob/main/AGENTS.md#4-protocol-architecture)
# Introduction
import { Orbit, Boxes, CircuitBoard, Server } from 'lucide-react';
## What is the Agentic OS Protocol?
The Agentic OS Protocol (OSP) is a specification—a shared contract that defines the interfaces, behaviors, and data formats for orchestrating AI agents at scale.
Think of it as the blueprint you implement: it tells you which modules exist (Skills, System, Context, Checks, Actions, Runs, Workflows), how they interact, and what “conformant” behavior looks like. It’s not a runtime or framework—you build to it.
```json
{
"$schema": "https://osprotocol.dev/v1/schema.json"
}
```
## Getting Started
OSP defines the contract for building agent systems that can work together seamlessly, with standardized patterns for coordination, quality assurance, and context management. Below are the key entry points to understand and implement the protocol.
} href="/docs/architecture" title="See the big picture">
Explore the architecture, how everything fits before you dive into details.
} href="/docs/concepts/agent-loop" title="Agent Loop">
Gather Context → Take Actions → Verify Results
} href="/docs/system" title="System Intelligence">
Registry, Environment, Filesystem, Settings—the infrastructure layer.
} href="/docs/concepts/agentic-os" title="What is Agentic OS?">
The architectural paradigm where LLM functions as the Kernel of the system.
# Motivation
## The Challenge
As AI agents become more sophisticated and capable, we face new challenges in orchestrating, managing, and executing them at scale. Traditional approaches to agent management often fall short when dealing with the reality that comes when systems grow beyond a single agent running in isolation.
Picture this: you start with one agent handling a simple task. It works perfectly. Then you need two agents to work together. Still manageable. But as you add more agents—each with different capabilities, running across different environments, coordinating complex workflows—things quickly become messy. What seemed simple at small scale reveals complexity you didn't anticipate.
## When Systems Grow
Orchestration, at its core, is about coordinating multiple agents to work together toward a common goal. When you have a handful of agents, coordination feels straightforward. But scale changes everything. Your agents start running across different environments—some in the cloud, others on edge devices, each with different capabilities and constraints. Coordinating them becomes a challenge in itself. Then workflows get complex: one agent's output becomes another's input, creating chains of dependencies that span multiple agents and environments. A failure in one step can cascade through the entire process. You find yourself managing not just individual agents, but intricate relationships between them—who depends on whom, what happens when something fails, how to retry, how to recover.
As your system grows, new questions emerge that traditional approaches struggle to answer. How do you ensure quality when you can't monitor everything manually? How do you maintain context when agents operate independently across sessions? How do you scale from ten agents to a thousand without everything breaking? In distributed systems where agents collaborate, quality is emergent—it's about how agents interact, not just how each performs alone. Context management becomes critical: agents need to share information but also maintain isolation. Without standardized approaches, everyone solves these problems differently. Agent platforms built by different teams can't interoperate. The ecosystem fragments, and innovation slows because everyone is reinventing the same solutions.
## Why a Protocol
This is where protocols shine. A protocol defines a shared contract—the interfaces, behaviors, and data formats that enable interoperability. Just as HTTP allows any web browser to communicate with any web server, a protocol for agent orchestration would allow different implementations to work together while remaining free to innovate in their specific domains.
A protocol, unlike a framework or library, doesn't prescribe implementation details. It defines *what* must be supported and *how* components should interact, but leaves *how* you build it up to you. This flexibility is crucial: teams working in different languages, with different constraints, and different use cases can all implement the same protocol and achieve interoperability.
## What OSP Does
OSP provides standardized patterns for agent coordination, quality assurance, and resource management—proven patterns that are reusable but not prescriptive. It means providing infrastructure for common problems: agent discovery, context management, quality monitoring. It means designing for scale from the start, so systems can grow from a single agent to complex multi-agent environments without fundamental redesigns.
With a standardized protocol, the entire ecosystem benefits. Developers can build agent systems knowing they'll interoperate with others. Teams can share agents, workflows, and patterns. Agents from different platforms can collaborate on complex tasks. Workflows can span multiple systems. The ecosystem becomes composable—you can combine agents and tools from different sources, knowing they'll work together because they follow the same protocol. This creates the foundation for systems where agents collaborate at unprecedented scale, where workflows span organizations and platforms, where the whole ecosystem is greater than the sum of its parts.
## Building in the Open
The Agentic OS Protocol is in active development, maintained by [SynerOps](https://synerops.com), and we're building it in the open.
Why? Because the protocol needs to solve real problems, work in real environments, and evolve based on how people actually use it.
We welcome contributions, feedback, and collaboration. Whether you're implementing the protocol, using it in production, researching agent systems, or just curious about what's possible—your perspective matters. Together, we're not just defining a protocol; we're shaping how agents will work together for years to come.
# MCP Servers
## Overview
MCP (Model Context Protocol) Servers provide standardized communication between agents, enabling tool and resource sharing, context propagation, and synchronization.
## Features
* **Server Management**: Register and manage MCP servers
* **Protocol Compliance**: Ensure compliance with MCP standards
* **Context Sharing**: Share context between agents via MCP
* **Tool Sharing**: Share tools and resources across agents
## Usage
MCP servers enable agents to communicate and share resources in a standardized way, facilitating distributed agent architectures.
## Integration
MCP servers integrate with:
* **MCP Client**: Client-side MCP implementation
* **Registry**: Server registration and discovery
* **Tools**: Tool sharing via MCP protocol
# Operations
## Overview
Operations (ops) define the core actions that agents can perform. This module provides the fundamental building blocks for agent behavior and task execution.
## Features
* **Operation Definitions**: Define standard operations for agents
* **Operation Execution**: Execute operations with proper context
* **Operation Chaining**: Chain multiple operations together
* **Error Handling**: Robust error handling for operation failures
## Usage
Operations are the atomic units of work that agents perform. They can be combined to create complex workflows and task sequences.
## Integration
Operations integrate with:
* **Executor**: Executes operations as part of agent tasks
* **Planner**: Breaks down objectives into operations
* **Orchestrator**: Coordinates operation execution across agents
# Tools
## Overview
Tools provide agents with the ability to interact with external systems and perform actions. The tools module manages tool registration, discovery, execution, and monitoring.
## Features
* **Tool Registration**: Register and manage available tools for agents
* **Tool Discovery**: Dynamic discovery of tools based on task requirements
* **Tool Execution**: Execute tools with proper error handling and validation
* **Tool Monitoring**: Monitor tool usage and performance
## Usage
Tools are essential for agents to perform actions beyond their core capabilities. They enable integration with external APIs, file systems, databases, and other services.
## Integration
Tools work closely with:
* **Executor**: Executes tools as part of agent tasks
* **Registry**: Manages tool registration and discovery
* **MCP Servers**: Provides standardized tool interfaces
# Schema
## Overview
The schema module defines data structures and schemas for applications within the Agent OS Protocol. It provides type definitions and validation for application-specific context and data.
## Features
* **Schema Definitions**: Define data structures for applications
* **Type Validation**: Validate data against schemas
* **Schema Evolution**: Support for schema versioning and evolution
* **Data Transformation**: Transform data between schema versions
## Usage
Schemas ensure data consistency and type safety across the protocol, enabling reliable data exchange between agents and applications.
## Integration
Schemas integrate with:
* **Context Apps**: Application-specific context management
* **Documents**: Document structure definitions
* **Persistence**: Data persistence with schema validation
# Agent Loop
## Overview
The Agent Loop is the fundamental execution pattern that all agent implementations MUST support. It defines the iterative cycle through which agents gather context, take actions, verify their work, and iterate until completion.
## The Four Steps
### 1. Gather Context
Agents collect information needed to complete their task through:
* **Agentic search**: File systems, grep, tail, structured queries
* **Semantic search**: Vector embeddings for concept-based queries
* **Subagents**: Isolated context windows for parallel information gathering
* **Context compaction**: Summarization for long-running agents
Learn more: [Context Management](/docs/context)
### 2. Take Action
Agents execute operations using:
* **Tools**: Primary building blocks with clear interfaces
* **Bash/Scripts**: Command execution and automation
* **Code Generation**: Dynamic code creation and execution
* **MCP Integration**: Standardized protocol for external services
Learn more: [Actions](/docs/actions/tools)
### 3. Verify Work
Agents validate outputs through:
* **Rules-based validation**: Defined criteria and constraints
* **Visual feedback**: Screenshots and renders for UI tasks
* **LLM-as-judge**: Model-based evaluation
Learn more: [Checks](/docs/checks/rules)
### 4. Iterate
The loop repeats until:
* Task completion criteria are met
* Iteration limits are reached
* Termination conditions are triggered
## Cognitive Micro-Pattern
The loop maps to an internal cognitive cycle:
1. **Think/Reason** → Plan next action (Gather Context)
2. **Act** → Execute tools (Take Action)
3. **Observe** → Process results (Verify Work)
4. **Reflect** → Evaluate progress (Verify Work)
5. **Decide** → Continue or stop (Iterate)
Reference: [Anthropic: Building Agents with Claude Agent SDK](https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk)
## Next Steps
* Understand how the loop fits into the **[Agent Lifecycle](/docs/concepts/lifecycle)**
* Explore **[Workflow Patterns](/docs/concepts/workflows-taxonomy)** that orchestrate the loop
* Read the full specification in [AGENTS.md Section 2](https://github.com/synerops/osprotocol/blob/main/AGENTS.md#2-core-execution-pattern-agent-loop)
# Agentic OS
## Overview
An **Agentic OS** is a design paradigm where the **Large Language Model (LLM)** functions conceptually as the **Kernel** of the system. Unlike traditional operating systems designed for human interaction, an Agentic OS is a **backend infrastructure layer** that manages the lifecycle and resources of autonomous software agents.
This concept is foundational to understanding the Agentic OS Protocol (OSP). OSP defines the standardized interfaces and behaviors that implementations of an Agentic OS must follow—the contract that enables different agent systems to interoperate.
## Resource Abstraction
Just as traditional operating systems abstract hardware resources (CPU, memory, disk, devices), an Agentic OS abstracts the cognitive resources of AI systems. The Agentic OS manages cognitive resources just as a traditional kernel manages physical hardware:
* **CPU Cycles → Inference / Tokens**: Managing the compute required for reasoning and generation
* **RAM (Memory) → Context Window**: Managing the finite amount of information active in the model's immediate attention
* **Disk / Filesystem → Vector Store / RAG**: Managing long-term retrieval and persistent knowledge
* **Device Drivers → Tools / MCP**: Standardizing interfaces for external interaction (APIs, browsers, code execution)
* **Process Scheduler → Agent Orchestrator**: Determining which agent runs when, and for how long
Learn more: [System Intelligence](/docs/system/registry)
## The "User" of the OS
In this paradigm, **the "User" of the Operating System is the Agent itself**, not the human.
* The **Agent** requests resources from the OS ("I need to read this file", "I need to store this memory")
* The **OS** enforces permissions, manages limits, and provides the requested capabilities
* The **Human** acts as the external administrator or the user of the *application* built on top of the OS, but does not interact with the Agentic OS layer directly
This distinction is critical: an Agentic OS is the invisible infrastructure that enables complex, multi-agent systems to function reliably at scale.
## Scope and Purpose
The Agentic OS solves **Orchestration Complexity**, not User Experience. Its primary goals are:
1. **Context Hygiene:** Preventing context pollution and managing finite window sizes
2. **Process Isolation:** Ensuring agents operate within defined boundaries without interfering with each other
3. **Inter-Process Communication:** Enabling standardized communication between disparate agents
These goals align directly with the challenges outlined in our [Motivation](/docs/motivation): as systems grow, managing context, isolation, and communication becomes increasingly complex. The Agentic OS provides the infrastructure layer that addresses these challenges systematically.
Learn more: [Motivation](/docs/motivation) | [Architecture](/docs/architecture)
## Agentic OS vs OSP
It's important to understand the distinction:
* **Agentic OS** is the conceptual paradigm—the architectural metaphor
* **OSP (Agentic OS Protocol)** is the specification—the standardized contract that implementations must follow
Just as "operating system" describes a category of software (Linux, Windows, macOS), "Agentic OS" describes a category of systems that manage agent resources. OSP defines the protocol specification that different implementations can follow to achieve interoperability.
Think of it this way: Linux and Windows are both operating systems, but they follow different architectures. Multiple implementations can follow OSP and each be an "Agentic OS" with different internal designs—but they'll all interoperate because they follow the same protocol contract.
## How OSP Implements the Agentic OS
OSP defines the standardized interfaces and behaviors that make an Agentic OS possible:
* **[System Intelligence](/docs/system/registry)**: Registry, Environment, Filesystem, Settings—the infrastructure layer
* **[Skills Framework](/docs/skills/orchestrator)**: Orchestrator, Planner, Executor—agent capabilities
* **[Context Management](/docs/context)**: Memory, Documents, Persistence—state and knowledge
* **[Quality Assurance](/docs/checks/rules)**: Audit, Rules, Fallback—reliability and compliance
These components work together to provide the resource abstraction, process isolation, and inter-process communication that define an Agentic OS.
Learn more: [Architecture](/docs/architecture)
## Next Steps
* Understand the **[Agent Loop](/docs/concepts/agent-loop)**—the core execution pattern within agents
* Explore the **[Agent Lifecycle](/docs/concepts/lifecycle)**—how the OS manages agent resources
* Review **[Workflow Patterns](/docs/concepts/workflows-taxonomy)**—operational execution patterns
# Agent Lifecycle
## Overview
The Agent Lifecycle is a System/Control Workflow that defines how agents are managed within the system. Unlike the [Agent Loop](/docs/concepts/agent-loop) (which describes internal execution), the Lifecycle governs system-level responsibilities: registration, discovery, execution management, and evaluation.
## The Four Phases
### 1. Registration
Agents declare their capabilities and constraints to the system:
* Capability declaration
* Resource requirements specification
* Constraint definition
* Metadata registration
Learn more: [System Registry](/docs/system/registry)
### 2. Discovery
The system exposes agents for selection and routing:
* Capability-based discovery
* Dynamic service discovery
* Load balancing mechanisms
* Failover protocols
Learn more: [System Registry](/docs/system/registry)
### 3. Execution Management
The OS assigns tasks and monitors progress:
* Task assignment interfaces
* Real-time monitoring
* Error handling
* State management
* Policy enforcement
Learn more: [Runs](/docs/runs/cancel), [Actions](/docs/actions/ops)
### 4. Evaluation
Outputs, logs, and performance are reviewed:
* Performance monitoring
* Quality assessment
* Compliance verification
* Adaptation mechanisms
Learn more: [Audit](/docs/checks/audit), [Judge](/docs/checks/judge)
## Lifecycle vs Loop vs Workflows
Understanding the distinction is crucial:
| Concept | Layer | Purpose | Scope |
| -------------------------------------------------- | ----------- | ------------------ | ---------------------- |
| **Lifecycle** | System | Agent management | OS/Platform governance |
| **[Loop](/docs/concepts/agent-loop)** | Cognitive | Internal execution | Single agent reasoning |
| **[Workflows](/docs/concepts/workflows-taxonomy)** | Operational | Task orchestration | Multi-step processes |
* **Lifecycle** exists *outside* any specific workflow—it's the system contract
* **Loop** executes *inside* workflows—it's the cognitive engine
* **Workflows** orchestrate *during* Execution/Evaluation phases—they're the macro patterns
Reference: [Anthropic: Building Effective Agents](https://www.anthropic.com/engineering/building-effective-agents)
## Next Steps
* Explore [Workflow Taxonomy](/docs/concepts/workflows-taxonomy) to see operational patterns
* Read the full specification in [AGENTS.md Section 3.2.1](https://github.com/synerops/osprotocol/blob/main/AGENTS.md#321-agent-lifecycle-workflow)
# Workflows Taxonomy
## Overview
Workflows are operational execution patterns that define how tasks are executed during the Execution/Evaluation phases of the [Agent Lifecycle](/docs/concepts/lifecycle). They are macro-level orchestration patterns, distinct from the [Agent Loop](/docs/concepts/agent-loop) (micro-execution) and the Lifecycle (system layer).
## The Six Categories
### 1. System/Control Workflows
Govern agent management at the platform level. The primary workflow is the [Agent Lifecycle](/docs/concepts/lifecycle): Registration → Discovery → Execution → Evaluation.
### 2. Task Workflows
Operational patterns for executing work:
* **[Routing](/docs/workflows/routing)**: Classify inputs and direct to specialized tasks
* **Prompt Chaining**: Sequential steps with validation gates
* **[Orchestrator-Workers](/docs/workflows/orchestrator-worker)**: Central orchestrator delegates to workers
* **[Parallelization](/docs/workflows/parallelization)**: Simultaneous execution with aggregation
* **[Evaluator-Optimizer](/docs/workflows/evaluator-optimizer)**: Generate-evaluate-refine loops
Reference: [Anthropic: Building Effective Agents](https://www.anthropic.com/engineering/building-effective-agents)
### 3. Quality Workflows
Ensure outputs meet standards:
* **[Rules Validation](/docs/checks/rules)**: Defined criteria and constraints
* **[Visual Checks](/docs/checks/screenshot)**: Screenshots and renders
* **[LLM-as-Judge](/docs/checks/judge)**: Model-based evaluation
### 4. Recovery Workflows
Handle failures and errors:
* **[Retries](/docs/runs/retries)**: Automatic retry mechanisms
* **[Fallback](/docs/checks/fallback)**: Alternative paths when primary fails
* **[Timeouts](/docs/runs/timeout)**: Long-running operation handling
### 5. Human-in-the-Loop Workflows
Integrate human oversight:
* **[Approval Workflows](/docs/runs/human-in-the-loop)**: Human approval before proceeding
* **Manual Delegation**: Human task assignment
### 6. Multi-Agent Workflows
Coordinate multiple agents:
* **Agent Coordination**: Multiple agents working together
* **Distributed Execution**: Tasks distributed across agents
## Key Distinctions
* **Workflows** are macro-level orchestration patterns used *during* Execution/Evaluation
* **[Agent Loop](/docs/concepts/agent-loop)** is the micro-level cognitive cycle *inside* workflows
* **[Lifecycle](/docs/concepts/lifecycle)** is the system-level governance *around* workflows
## Next Steps
* Explore specific [Task Workflows](/docs/workflows/routing)
* Understand [Quality Assurance](/docs/checks/audit) mechanisms
* Learn about [Recovery Patterns](/docs/runs/retries)
* Read the full specification in [AGENTS.md Section 3](https://github.com/synerops/osprotocol/blob/main/AGENTS.md#3-workflow-patterns)
# Audit
## Overview
The audit module monitors agent behavior and ensures compliance with defined rules and guidelines. It provides comprehensive logging and tracking of agent actions.
## Features
* **Behavior Monitoring**: Monitor agent actions and decisions
* **Compliance Checking**: Verify agent behavior against rules
* **Audit Logging**: Comprehensive logging of agent activities
* **Anomaly Detection**: Detect unusual or non-compliant behavior
## Usage
Audit ensures agents operate within defined boundaries and provides transparency into agent decision-making processes.
## Integration
Audit integrates with:
* **Rules**: Validates behavior against defined rules
* **Judge**: Provides audit data for quality evaluation
* **Registry**: Tracks agent registration and capabilities
# Fallback
## Overview
The fallback module provides error handling and recovery mechanisms for agent operations. It ensures system resilience and graceful degradation when errors occur.
## Features
* **Error Detection**: Detect errors and failures
* **Recovery Strategies**: Implement recovery strategies
* **Fallback Actions**: Define fallback actions for failures
* **Error Reporting**: Report errors for analysis and improvement
## Usage
Fallback mechanisms ensure system reliability by handling errors gracefully and providing alternative execution paths when primary methods fail.
## Integration
Fallback integrates with:
* **Executor**: Handles execution errors
* **Orchestrator**: Coordinates recovery across agents
* **Retries**: Works with retry mechanisms
# Judge
## Overview
The judge module evaluates agent performance and output quality. It provides assessment mechanisms to ensure agents meet quality standards and performance requirements.
## Features
* **Performance Evaluation**: Assess agent performance metrics
* **Quality Assessment**: Evaluate output quality and correctness
* **Scoring System**: Provide scores and ratings for agent outputs
* **Feedback Generation**: Generate feedback for improvement
## Usage
Judge provides objective evaluation of agent performance, enabling continuous improvement and quality assurance.
## Integration
Judge integrates with:
* **Audit**: Uses audit data for evaluation
* **Rules**: Evaluates against quality rules
* **Orchestrator**: Provides feedback for task distribution
# Rules
## Overview
The rules module defines behavioral constraints and guidelines that agents must follow. It provides a framework for enforcing policies and ensuring consistent agent behavior.
## Features
* **Rule Definition**: Define behavioral rules and constraints
* **Rule Enforcement**: Enforce rules during agent execution
* **Rule Validation**: Validate agent actions against rules
* **Rule Management**: Manage and update rules dynamically
## Usage
Rules ensure agents operate within defined boundaries and maintain consistent behavior across the system.
## Integration
Rules integrate with:
* **Audit**: Rules are checked during audit
* **Judge**: Rules inform quality evaluation
* **Executor**: Rules constrain agent actions
# Screenshot
## Overview
The screenshot module provides visual validation and monitoring capabilities for agents. It enables visual verification of agent actions and outcomes.
## Features
* **Visual Capture**: Capture screenshots of agent interactions
* **Visual Validation**: Validate visual outcomes
* **Visual Monitoring**: Monitor visual state changes
* **Visual Comparison**: Compare visual states over time
## Usage
Screenshots provide visual evidence of agent actions and enable visual validation of outcomes, particularly useful for UI automation and visual testing.
## Integration
Screenshot integrates with:
* **Audit**: Visual evidence for audit logs
* **Judge**: Visual validation for quality assessment
* **Executor**: Visual verification of task completion
# Apps Context
## Overview
The apps context module manages application-specific context and data. It provides isolation and organization of context for different applications within the protocol.
## Features
* **Context Isolation**: Isolate context per application
* **Context Management**: Manage application-specific data
* **Context Sharing**: Share context between related applications
* **Context Persistence**: Persist application context
## Usage
Apps context enables multiple applications to operate within the same protocol instance while maintaining data isolation and organization.
## Integration
Apps context integrates with:
* **Schema**: Uses schemas for context structure
* **Memory**: Stores application context in memory
* **Persistence**: Persists application context
# Documents
## Overview
The documents module provides document processing and management capabilities. It handles document ingestion, processing, storage, and retrieval.
## Features
* **Document Ingestion**: Ingest documents from various sources
* **Document Processing**: Process and parse documents
* **Document Storage**: Store documents with metadata
* **Document Retrieval**: Retrieve documents efficiently
## Usage
Documents enable agents to work with structured and unstructured document data, supporting knowledge management and information retrieval.
## Integration
Documents integrate with:
* **Embeddings**: Generate embeddings for documents
* **Vector**: Store documents in vector databases
* **Memory**: Cache frequently accessed documents
# Embeddings
## Overview
The embeddings module generates and manages vector embeddings for semantic search and similarity matching. It enables agents to work with high-dimensional vector representations of data.
## Features
* **Embedding Generation**: Generate embeddings for text and data
* **Embedding Storage**: Store embeddings efficiently
* **Similarity Search**: Perform similarity searches using embeddings
* **Embedding Management**: Manage embedding models and versions
## Usage
Embeddings enable semantic search and similarity matching, allowing agents to find relevant information based on meaning rather than exact matches.
## Integration
Embeddings integrate with:
* **Vector**: Store embeddings in vector databases
* **Documents**: Generate embeddings for documents
* **Memory**: Use embeddings for semantic memory retrieval
# Context
Hello World
# Memory
## Overview
The memory module provides persistent memory and knowledge storage for agents. It enables agents to remember past interactions, learn from experience, and maintain long-term knowledge.
## Features
* **Memory Storage**: Store memories persistently
* **Memory Retrieval**: Retrieve relevant memories efficiently
* **Memory Organization**: Organize memories by context and type
* **Memory Search**: Search memories semantically and by keywords
## Usage
Memory enables agents to maintain context across sessions and learn from past experiences, improving performance over time.
## Integration
Memory integrates with:
* **Embeddings**: Use embeddings for semantic memory search
* **Vector**: Store memories in vector databases
* **Persistence**: Persist memories to storage
# Persistence
## Overview
The persistence module provides data persistence and retrieval mechanisms for the protocol. It ensures data durability and enables state management across sessions.
## Features
* **Data Persistence**: Persist data to storage systems
* **Data Retrieval**: Retrieve persisted data efficiently
* **State Management**: Manage application and agent state
* **Backup and Recovery**: Support backup and recovery operations
## Usage
Persistence ensures data durability and enables agents to maintain state across sessions, supporting long-running operations and workflows.
## Integration
Persistence integrates with:
* **Memory**: Persist agent memories
* **Context**: Persist context data
* **System**: Persist system configuration and state
# System Context
## Overview
The system context module manages system-level context and configuration. It provides access to system-wide settings, environment variables, and global state.
## Features
* **System Configuration**: Manage system-wide configuration
* **Environment Context**: Access environment variables and settings
* **Global State**: Manage global system state
* **System Information**: Provide system information and metadata
## Usage
System context provides agents with access to system-level information and configuration, enabling system-aware behavior.
## Integration
System context integrates with:
* **Environment**: Access environment configuration
* **Settings**: Access system settings
* **Registry**: Access system registry information
# Cancel
## Overview
The cancel module provides mechanisms to cancel running tasks and agent runs. It enables graceful cancellation and cleanup of in-progress operations.
## Features
* **Task Cancellation**: Cancel individual tasks
* **Run Cancellation**: Cancel entire agent runs
* **Graceful Shutdown**: Gracefully shutdown operations
* **Cleanup**: Clean up resources after cancellation
## Usage
Cancellation enables users and systems to stop agent operations when needed, ensuring resource efficiency and user control.
## Integration
Cancel integrates with:
* **Timeout**: Works with timeout mechanisms
* **Executor**: Cancels executing tasks
* **Orchestrator**: Coordinates cancellation across agents
# Human-in-the-Loop
## Overview
The human-in-the-loop module enables human oversight and intervention in agent operations. It provides approval workflows, manual task delegation, and human feedback mechanisms.
## Features
* **Approval Workflows**: Require human approval for critical actions
* **Manual Delegation**: Allow manual task delegation
* **Human Feedback**: Collect and incorporate human feedback
* **Intervention Points**: Define points where human intervention is required
## Usage
Human-in-the-loop ensures human oversight of agent operations, enabling control over critical decisions and providing opportunities for human expertise.
## Integration
Human-in-the-loop integrates with:
* **Orchestrator**: Coordinates human approval workflows
* **Executor**: Pauses execution for human input
* **Planner**: Incorporates human feedback into planning
# Retries
## Overview
The retries module provides retry mechanisms for failed operations. It enables automatic retry of failed tasks with configurable strategies and backoff policies.
## Features
* **Retry Strategies**: Define retry strategies (exponential backoff, linear, etc.)
* **Retry Limits**: Set maximum retry attempts
* **Error Classification**: Classify errors to determine retry eligibility
* **Retry Tracking**: Track retry attempts and outcomes
## Usage
Retries improve system reliability by automatically retrying failed operations, handling transient errors and network issues.
## Integration
Retries integrate with:
* **Executor**: Retries failed task executions
* **Fallback**: Works with fallback mechanisms
* **Timeout**: Respects timeout constraints
# Timeout
## Overview
The timeout module manages timeouts for agent operations. It ensures operations complete within specified time limits and handles timeout scenarios gracefully.
## Features
* **Timeout Configuration**: Configure timeouts for operations
* **Timeout Enforcement**: Enforce timeout limits
* **Timeout Handling**: Handle timeout scenarios
* **Timeout Notifications**: Notify about timeout events
## Usage
Timeouts prevent operations from running indefinitely, ensuring system responsiveness and resource efficiency.
## Integration
Timeout integrates with:
* **Executor**: Enforces timeouts on task execution
* **Cancel**: Cancels operations on timeout
* **Retries**: Works with retry mechanisms
# Executor
## Overview
The executor is a core component of the Skills Framework that handles the actual execution of agent tasks. It performs tool usage, API interactions, and data processing.
## Features
* **Task Execution**: Execute tasks assigned by planners
* **Tool Usage**: Use tools to perform actions
* **API Interactions**: Interact with external APIs
* **Data Processing**: Process and transform data
## Usage
Executors are the workhorses of the agent system, performing the actual operations needed to complete tasks and achieve objectives.
## Integration
Executor integrates with:
* **Planner**: Receives tasks from planners
* **Orchestrator**: Reports back to orchestrators
* **Tools**: Uses tools to perform actions
* **Operations**: Executes operations
## Agent Type
Executor Agents are specialized agents designed to execute specific tasks and operations.
# Orchestrator
## Overview
The orchestrator is a core component of the Skills Framework that coordinates multiple agents and manages task distribution. It handles load balancing, conflict resolution, and workflow coordination.
## Features
* **Task Distribution**: Distribute tasks across available agents
* **Load Balancing**: Balance workload across agents
* **Conflict Resolution**: Resolve conflicts between agents
* **Workflow Coordination**: Coordinate complex multi-agent workflows
## Usage
Orchestrators enable complex multi-agent systems by coordinating agent activities and ensuring efficient task distribution.
## Integration
Orchestrator integrates with:
* **Planner**: Receives plans and coordinates execution
* **Executor**: Distributes tasks to executors
* **Registry**: Discovers available agents
* **Workflows**: Coordinates workflow execution
## Agent Type
Orchestrator Agents are specialized agents designed to coordinate multiple agents and manage complex workflows.
# Planner
## Overview
The planner is a core component of the Skills Framework that breaks down high-level objectives into actionable tasks. It performs task decomposition, dependency analysis, and resource estimation.
## Features
* **Task Decomposition**: Break down objectives into tasks
* **Dependency Analysis**: Analyze task dependencies
* **Resource Estimation**: Estimate resources needed for tasks
* **Plan Optimization**: Optimize plans for efficiency
## Usage
Planners enable agents to handle complex objectives by breaking them down into manageable, executable tasks with proper dependencies and resource allocation.
## Integration
Planner integrates with:
* **Orchestrator**: Receives objectives and provides plans
* **Executor**: Provides tasks for execution
* **Registry**: Considers available agent capabilities
## Agent Type
Planner Agents are specialized agents designed to break down high-level objectives into actionable tasks.
# Environment
## Overview
The environment module handles configuration and environment management for the protocol. It manages environment variables, configuration files, and runtime settings.
## Features
* **Environment Variables**: Manage environment variables
* **Configuration Management**: Manage configuration files
* **Runtime Settings**: Handle runtime configuration
* **Environment Isolation**: Isolate environments for different deployments
## Usage
Environment management ensures proper configuration across different deployment environments and enables secure handling of sensitive configuration data.
## Integration
Environment integrates with:
* **System Context**: Provides environment context
* **Settings**: Manages environment-specific settings
* **Installer**: Configures environments during installation
# Filesystem
## Overview
The filesystem module provides file system operations and management for agents. It enables agents to read, write, and manage files within the protocol environment.
## Features
* **File Operations**: Read, write, and manage files
* **Directory Management**: Create and manage directories
* **File Permissions**: Handle file permissions and access control
* **File Monitoring**: Monitor file changes and events
## Usage
Filesystem operations enable agents to work with files, supporting data persistence, configuration management, and file-based workflows.
## Integration
Filesystem integrates with:
* **Persistence**: Persists data to files
* **Documents**: Manages document files
* **System**: Manages system configuration files
# Introduction
import { Database, Settings as SettingsIcon, FolderOpen, Server, Wrench, User, Plug } from 'lucide-react';
## Overview
The System Intelligence layer provides infrastructure services that all agents depend on. Unlike traditional protocols that focus solely on agent-to-agent communication, OSP includes system-level intelligence through the Operating System abstraction.
This layer manages the lifecycle, coordination, and resource management that multi-agent systems require, providing the foundation for reliable, scalable agent orchestration.
## The Operating System Abstraction
Just as traditional operating systems abstract hardware resources (CPU, memory, disk), the System Intelligence layer abstracts cognitive resources (inference, context, knowledge, tools). It provides standardized APIs for:
* **Agent Registry**: Discovery and capability management
* **System Configuration**: Environment and settings management
* **File Operations**: Standardized file system interfaces
* **Protocol Integration**: MCP client and external tool access
* **Installation & Setup**: System deployment and configuration
Learn more: [Agentic OS Concept](/docs/concepts/agentic-os) | [Architecture](/docs/architecture)
## System Components
} href="/docs/system/registry" title="Registry">
Agent registration, discovery, and capability matching for dynamic service allocation.
} href="/docs/system/env" title="Environment">
Configuration and environment variable management for deployment-specific settings.
} href="/docs/system/fs" title="Filesystem">
Standardized file system operations and management for agent file access.
} href="/docs/system/settings" title="Settings">
System and agent settings management for centralized configuration.
} href="/docs/system/mcp-client" title="MCP Client">
Model Context Protocol client for standardized external tool and resource access.
} href="/docs/system/installer" title="Installer">
System installation, setup, and dependency management for deployment.
} href="/docs/system/preferences" title="Preferences">
Agent preferences and user settings for customization and personalization.
## How System Intelligence Works
The System Intelligence layer operates at the infrastructure level, providing services that agents use rather than defining agent behavior directly:
1. **Registration**: Agents register capabilities with the Registry
2. **Discovery**: The OS matches agents to tasks based on capabilities
3. **Configuration**: Environment and settings provide runtime context
4. **Execution**: Filesystem and MCP enable tool access and file operations
5. **Management**: Installer and preferences configure the system
These components work together to provide the resource abstraction, process isolation, and inter-process communication that define an Agentic OS.
## Integration with Other Layers
System Intelligence integrates with:
* **[Skills Framework](/docs/skills/orchestrator)**: Orchestrators use Registry for agent discovery
* **[Context Management](/docs/context)**: Filesystem and Environment provide context storage
* **[Quality Assurance](/docs/checks/audit)**: Settings and Preferences configure audit behavior
* **[Actions](/docs/actions/tools)**: MCP Client enables standardized tool access
## Next Steps
* Explore **[Registry](/docs/system/registry)** to understand agent discovery and matching
* Learn about **[Environment](/docs/system/env)** for configuration management
* Review **[MCP Client](/docs/system/mcp-client)** for external protocol integration
* Understand how System Intelligence fits into the **[Architecture](/docs/architecture)**
# Installer
## Overview
The installer module handles system installation and setup for the Agent OS Protocol. It manages dependencies, configuration, and initial system setup.
## Features
* **Dependency Installation**: Install required dependencies
* **System Setup**: Set up system components
* **Configuration**: Configure system during installation
* **Verification**: Verify installation success
## Usage
The installer ensures proper system setup and configuration, enabling smooth deployment and onboarding of the protocol.
## Integration
Installer integrates with:
* **Environment**: Configures environment during installation
* **Registry**: Sets up initial agent registry
* **System**: Configures system components
# MCP Client
## Overview
The MCP client provides client-side implementation of the Model Context Protocol. It enables agents to connect to MCP servers and communicate using the standardized protocol.
## Features
* **Server Connection**: Connect to MCP servers
* **Protocol Communication**: Communicate using MCP protocol
* **Tool Access**: Access tools via MCP servers
* **Context Sharing**: Share context via MCP protocol
## Usage
The MCP client enables agents to interact with MCP servers, accessing shared tools and resources in a standardized way.
## Integration
MCP Client integrates with:
* **MCP Servers**: Connects to MCP servers
* **Tools**: Accesses tools via MCP
* **Registry**: Discovers MCP servers
# Preferences
## Overview
The preferences module manages agent preferences and user settings. It enables customization of agent behavior and system configuration based on user preferences.
## Features
* **Preference Storage**: Store user and agent preferences
* **Preference Management**: Manage and update preferences
* **Preference Application**: Apply preferences to agent behavior
* **Preference Validation**: Validate preference values
## Usage
Preferences enable customization of the protocol to match user needs and agent requirements, providing flexibility and personalization.
## Integration
Preferences integrate with:
* **Settings**: Manages preference-based settings
* **Agents**: Applies preferences to agent behavior
* **System**: Configures system based on preferences
# Registry
## Overview
The registry manages agent registration and discovery within the protocol. It enables agents to register their capabilities and allows other agents to discover available services.
## Features
* **Agent Registration**: Register agents with capabilities and constraints
* **Service Discovery**: Discover available agents and services
* **Capability Matching**: Match agents to task requirements
* **Load Balancing**: Support load balancing across agents
## Usage
The registry is the central directory for agents in the system, enabling dynamic service discovery and efficient agent selection.
## Integration
Registry integrates with:
* **Orchestrator**: Discovers agents for task distribution
* **Planner**: Considers agent capabilities in planning
* **System**: Manages system-wide agent registry
## Agent Lifecycle
The registry is central to the agent lifecycle:
* **Registration**: Agents register with the registry
* **Discovery**: Agents are discovered for tasks
* **Execution**: Registry information guides task assignment
# Settings
## Overview
The settings module manages system and agent settings. It provides a centralized way to configure system behavior and agent parameters.
## Features
* **Settings Storage**: Store system and agent settings
* **Settings Management**: Manage and update settings
* **Settings Validation**: Validate setting values
* **Settings Persistence**: Persist settings across sessions
## Usage
Settings provide centralized configuration management, enabling consistent behavior across the system and easy configuration updates.
## Integration
Settings integrate with:
* **Environment**: Uses environment-specific settings
* **Preferences**: Applies user preferences as settings
* **System**: Configures system components
# Evaluator Optimizer
## Overview
The evaluator optimizer module evaluates and optimizes workflows. It analyzes workflow performance and suggests improvements for efficiency and effectiveness.
## Features
* **Workflow Evaluation**: Evaluate workflow performance
* **Optimization Suggestions**: Suggest workflow optimizations
* **Performance Analysis**: Analyze workflow performance metrics
* **Optimization Application**: Apply optimizations to workflows
## Usage
The evaluator optimizer helps improve workflow efficiency by identifying bottlenecks and suggesting optimizations based on performance analysis.
## Integration
Evaluator Optimizer integrates with:
* **Orchestrator**: Optimizes orchestration workflows
* **Routing**: Optimizes routing strategies
* **Parallelization**: Optimizes parallel execution
# Orchestrator Worker
## Overview
The orchestrator worker module implements the worker pattern for orchestrator workflows. It enables distributed execution of orchestration tasks across multiple workers.
## Features
* **Worker Management**: Manage worker instances
* **Task Distribution**: Distribute tasks to workers
* **Worker Coordination**: Coordinate worker activities
* **Load Balancing**: Balance load across workers
## Usage
The orchestrator worker pattern enables scalable orchestration by distributing work across multiple worker instances, improving throughput and reliability.
## Integration
Orchestrator Worker integrates with:
* **Orchestrator**: Implements worker pattern for orchestrators
* **Parallelization**: Works with parallel execution
* **Routing**: Routes tasks to appropriate workers
# Parallelization
## Overview
The parallelization module enables parallel task execution and workflow parallelization. It manages concurrent execution of independent tasks, improving overall system throughput.
## Features
* **Parallel Execution**: Execute tasks in parallel
* **Dependency Management**: Manage task dependencies for parallel execution
* **Resource Optimization**: Optimize resource usage for parallel tasks
* **Concurrency Control**: Control concurrency levels
## Usage
Parallelization improves system performance by executing independent tasks concurrently, reducing overall execution time and improving resource utilization.
## Integration
Parallelization integrates with:
* **Orchestrator**: Enables parallel orchestration
* **Executor**: Executes tasks in parallel
* **Routing**: Routes tasks for parallel execution
## Workflow Orchestration
Parallelization is a key component of workflow orchestration, enabling efficient execution of complex workflows with multiple independent tasks.
# Routing
## Overview
The routing module provides task routing and workflow routing strategies. It determines how tasks and workflows are routed to appropriate agents and resources.
## Features
* **Task Routing**: Route tasks to appropriate agents
* **Workflow Routing**: Route workflows to appropriate resources
* **Routing Strategies**: Implement various routing strategies
* **Load Balancing**: Balance load through routing
## Usage
Routing ensures tasks and workflows are directed to the most appropriate agents and resources, optimizing system efficiency and performance.
## Integration
Routing integrates with:
* **Orchestrator**: Routes tasks in orchestration
* **Registry**: Uses registry for agent selection
* **Parallelization**: Routes tasks for parallel execution
## Workflow Orchestration
Routing is essential for workflow orchestration, ensuring tasks reach the right agents at the right time.