Skip to content

v0.2.0 — Sphinx docs, hooks & middleware, framework integrations

Choose a tag to compare

@ankitlade12 ankitlade12 released this 28 Feb 15:32
· 237 commits to main since this release

What's New

🔌 Hooks & Middleware System

  • @agentarmor.before_request — inject custom logic before API calls
  • @agentarmor.after_response — process responses with custom analytics
  • @agentarmor.on_stream_chunk — mutate streaming chunks in real-time
  • RequestContext and ResponseContext dataclasses for typed hook interfaces

📖 Sphinx Documentation

  • Full documentation site with Furo theme
  • Guide pages: Quickstart, The Four Shields, Hooks & Middleware, Framework Integrations
  • Auto-generated API reference from docstrings
  • Build locally: pip install -e ".[docs]" && cd docs && make html

🔗 Framework Integration Examples

  • LangChain, LlamaIndex, CrewAI, AutoGen, and custom SDK examples
  • All examples in examples/ directory

🛡️ Core Improvements

  • Expanded prompt injection patterns (base64 decode, system=override, etc.)
  • Custom pattern support for Shield and Filter modules
  • Context isolation with contextvars for async safety
  • Improved error handling with PatchError and HookError exceptions

📦 Install

pip install agentarmor