Expand description
§adk-awp
Agentic Web Protocol (AWP) implementation for ADK-Rust.
This crate provides the full AWP protocol implementation including:
- Configuration: TOML-based business context loading with hot-reload
- Discovery: Auto-generated discovery documents from business context
- Manifest: JSON-LD capability manifest builder
- Detection: Requester type detection (human vs. agent)
- Trust: Trust level assignment from request headers
- Rate Limiting: Per-trust-level sliding window rate limiter
- Consent: Consent capture, check, and revocation
- Events: Event subscription system with HMAC-SHA256 webhook signing
- Health: Health state machine (Healthy/Degrading/Degraded)
- Middleware: AWP version negotiation
- Router: Axum route registration for all AWP endpoints
§Quick Start
ⓘ
use adk_awp::{BusinessContextLoader, generate_discovery_document, build_manifest, awp_routes};
let loader = BusinessContextLoader::from_file("business.toml".as_ref())?;
let ctx = loader.load();
let discovery = generate_discovery_document(&ctx);
let manifest = build_manifest(&ctx);Re-exports§
pub use config::AwpConfigError;pub use config::business_context_to_toml;pub use consent::ConsentService;pub use consent::FileConsentService;pub use consent::InMemoryConsentService;pub use detect::detect_requester_type;pub use discovery::generate_discovery_document;pub use events::AwpEvent;pub use events::EventSubscription;pub use events::EventSubscriptionService;pub use events::InMemoryEventSubscriptionService;pub use events::sign_payload;pub use events::verify_signature;pub use health::HealthState;pub use health::HealthStateMachine;pub use health::HealthStateSnapshot;pub use loader::BusinessContextLoader;pub use manifest::build_manifest;pub use rate_limit::InMemoryRateLimiter;pub use rate_limit::RateLimitConfig;pub use rate_limit::RateLimiter;pub use router::awp_routes;pub use state::AwpState;pub use state::AwpStateBuilder;pub use trust::DefaultTrustAssigner;pub use trust::TrustLevelAssigner;
Modules§
- config
- AWP configuration error types and TOML serialization utilities.
- consent
- Consent capture, check, and revocation framework.
- detect
- Requester type detection from HTTP headers.
- discovery
- Discovery document generation from
BusinessContext. - error_
response - AWP error to HTTP response conversion.
- events
- AWP event subscription system with HMAC-SHA256 webhook delivery.
- handlers
- Axum route handlers for AWP endpoints.
- health
- Health state machine with valid transition enforcement.
- loader
- Business context loader with hot-reload support via
ArcSwap. - manifest
- Capability manifest builder from
BusinessContext. - middleware
- AWP middleware for version negotiation.
- rate_
limit - Per-trust-level sliding window rate limiter.
- router
- AWP route registration for Axum.
- state
- Shared application state for AWP route handlers.
- trust
- Trust level assignment from request headers.