Rust SDK for the AEO Protocol v0.1 — parse, build, validate, and fetch AEO declaration documents.
[dependencies]
aeo-protocol = "0.1"use aeo_protocol::{Document, fetch_well_known};
fn main() -> Result<(), aeo_protocol::AeoError> {
// Fetch and parse from a live well-known URL
let doc = fetch_well_known("https://mizcausevic-dev.github.io")?;
println!("{}", doc.entity.name); // "Miz Causevic"
println!("{:?}", doc.claim_ids()); // ["current-role", ...]
println!("{:?}", doc.find_claim("years-experience").map(|c| &c.value));
// Parse from a string
let raw = std::fs::read_to_string("aeo.json")?;
let parsed = Document::from_json(&raw)?;
println!("{}", parsed.to_json()?);
Ok(())
}- Parse —
Document::from_json(&str)returns a strongly-typedDocument - Build —
Document,Entity,Authority,Claim,Verification,CitationPreferences,AnswerConstraints,Auditare all public struct types withserde::Serialize+serde::Deserialize - Serialize —
doc.to_json()returns canonical pretty-printed JSON - Fetch —
fetch_well_known(origin)performs HTTP discovery against/.well-known/aeo.jsonwithAccept: application/aeo+json, application/json(featureclient, on by default) - Query —
doc.claim_ids()anddoc.find_claim(id)helpers
client(default) — HTTP discovery via ureq. Disable withdefault-features = falsefor a pure-serde build (no networking).
Supports the AEO Protocol at conformance Level 1 (Declare). Signature verification (L2) and audit-endpoint posting (L3) deferred to v0.2.
- serde and serde_json — JSON model
- thiserror — error type
- ureq — HTTP client (optional,
clientfeature only)
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-featuresFull spec at github.com/mizcausevic-dev/aeo-protocol-spec.
MIT-licensed. Free for commercial and non-commercial use with attribution. The AEO Protocol specification this SDK implements is also MIT (see aeo-protocol-spec).
| Spec | Implementation |
|---|---|
| AEO Protocol | aeo-sdk-python · aeo-sdk-typescript · aeo-sdk-rust (this) · aeo-sdk-go · aeo-cli · aeo-crawler |
| Prompt Provenance | — |
| Agent Cards | — |
| AI Evidence Format | — |
| MCP Tool Cards | — |
Connect: LinkedIn · Kinetic Gain · Medium · Skills