v0.3.0 — Rate Limiting, Context Guard, and Policy-as-Code
AgentArmor v0.3.0 introduces three major new shields and configuration options:
New Features
- Rate Limiting: Sliding-window throttling to prevent API spam and abuse (e.g.,
rate_limit="10/min"). - Context Window Guard: Pre-flight token checks using
tiktoken. Automatically blocks requests that exceed the model's safe context limit (e.g.,context_guard=0.95) with aContextOverflowexception. - Policy-as-Code Configuration: Load all safety parameters declaratively from an
.agentarmor.ymlorjsonfile usingagentarmor.init_from_config(). - CI Improvements: Added a conclusive job for stable branch protection gating.
Refactors & Internal Improvements
- Extracted shared
estimate_tokensutility. - Improved type safety in Context Guard module.
- Updated README documentation with comprehensive examples for all new capabilities.
Full Changelog: v0.2.2...v0.3.0