Expand description
§Agentic Contracts v0.2.0
Shared contracts for the AgenticOS ecosystem.
This crate defines the traits, types, and standards that ALL sisters must implement. It serves as the single source of truth for:
- Sister trait: Core lifecycle management
- SessionManagement / WorkspaceManagement: Context handling (split in v0.2.0)
- Grounding trait: Query-based evidence verification (rewritten in v0.2.0)
- EventEmitter trait: Observability events
- Queryable trait: Standard query interface
- FileFormat traits: 20-year compatible file I/O (trait-based in v0.2.0)
- Errors: Two-layer error model — ProtocolError + SisterError (new in v0.2.0)
- Hydra: Placeholder traits for orchestrator integration (new in v0.2.0)
§What changed in v0.2.0
v0.1.0 was written based on THEORY. v0.2.0 was validated against REALITY (the actual implementations in 5 shipped sisters).
Key changes:
SisterFileHeader(96-byte “AGNT”) →FileFormatReader/FileFormatWritertraitsContextManagement→ split intoSessionManagement+WorkspaceManagementGrounding→ query-based (no evidence_id), three methods: ground/evidence/suggestSisterConfig→ flexible data paths (single, multiple, or none)- Added
ProtocolErrorfor MCP/JSON-RPC errors (separate fromSisterError) - Added
hydramodule withHydraBridgeandExecutionGateplaceholders
§Usage
[dependencies]
agentic-contracts = "0.2"ⓘ
use agentic_contracts::prelude::*;
pub struct MyNewSister {
// ...
}
impl Sister for MyNewSister {
const SISTER_TYPE: SisterType = SisterType::Memory;
const FILE_EXTENSION: &'static str = "amem";
// ...
}§The Promise
- ANY sister can be consumed by Hydra uniformly
- ANY sister can work with ANY other sister
- ANY file format will be readable in 20 years
Re-exports§
pub use prelude::*;
Modules§
- context
- Context management traits for all sisters.
- errors
- Standard error types for all sisters.
- events
- Event emission trait for observability.
- file_
format - File format specifications for 20-year compatibility.
- grounding
- Grounding trait for evidence verification (V2 Pattern).
- hydra
- Hydra integration placeholder traits.
- prelude
- query
- Query trait for standard query interface.
- receipts
- Receipt integration with Identity sister.
- sister
- Core Sister trait that all sisters must implement.
- types
- Shared types used across all sisters.