layer0
Protocol layer for the Skelegent agentic AI architecture
Overview
layer0 defines the foundational protocol traits for composable agentic AI systems. It contains
no implementations — only the contracts every agentic component must satisfy.
Four protocol traits + two cross-cutting interfaces:
| Protocol | Trait | Responsibility |
|---|---|---|
| ① Operator | Operator |
One agent's work per cycle |
| ② Orchestration | Orchestrator |
Multi-agent composition + workflow routing |
| ③ State | StateStore / StateReader |
Persistent key-value memory |
| ④ Environment | Environment |
Isolation, credentials, resource limits |
| ⑤ Middleware | DispatchMiddleware, StoreMiddleware, ExecMiddleware |
Interception + policy at each boundary |
| ⑥ Lifecycle | BudgetEvent, CompactionEvent |
Cross-layer coordination events |
Exports
Operator: Operator, OperatorInput, OperatorOutput, OperatorConfig, OperatorMetadata,
SubDispatchRecord, ToolMetadata, ExitReason
Orchestrator: Orchestrator, QueryPayload
State: StateStore, StateReader, SearchResult
Environment: Environment, EnvironmentSpec
Middleware: DispatchMiddleware, StoreMiddleware, ExecMiddleware
Lifecycle: BudgetEvent, CompactionEvent, ObservableEvent
Effects: Effect, Scope, SignalPayload
Identity: OperatorId, WorkflowId, ScopeId, SessionId
Content: Content, ContentBlock
Errors: EnvError, OperatorError, OrchError, StateError
Misc: DurationMs, SecretAccessEvent, SecretAccessOutcome, SecretSource
Usage
[]
= "0.4"
Test utilities
[]
= { = "0.4", = ["test-utils"] }
The test-utils feature exports in-memory implementations useful for testing downstream crates:
EchoOperator, InMemoryStore, LocalEnvironment, LocalOrchestrator.
Implementing the Operator trait
use async_trait;
use ;
use OperatorError;
;
Part of the skelegent workspace
skelegent is a composable async agentic AI framework for Rust.