Shield
Official client libraries for the Highflame AI security platform. Shield is a real-time guardrails layer that operates through a resource-based client and, in Python and TypeScript, a decorator/wrapper API for low-boilerplate integration into existing agent frameworks.
The Python highflame package and the TypeScript @highflame/sdk package also expose additional namespaces, including ZeroIDClient, but this API reference page is focused on the Shield client surface that is common to the current SDK docs.
Available SDKs
Python
highflame
pip install highflame
Python 3.10+
JavaScript / TypeScript
@highflame/sdk
npm install @highflame/sdk
Node 18+
Quick Comparison
Resource-based client
Yes
Yes
Decorator / wrapper API
Yes
Yes
SSE streaming
Yes
Yes
Async support
Yes (async/await)
Native (Promise)
Runtime dependencies
httpx, pydantic
None (native fetch)
ZeroID client exported
Yes
Yes
Framework Support
Generic Shield wrappers and client.guard.* APIs
Yes
Yes
LangGraph packaged adapter
HighflameMiddleware
HighflameMiddleware
CrewAI packaged adapter
HighflameCrewHooks
HighflameCrewHooks
AWS Strands packaged adapter
HighflameStrandsHooks
HighflameStrandsHooks
Azure AI Foundry packaged adapter
HighflameFoundryMiddleware
HighflameFoundryMiddleware
Core Concepts
Resource-Based API
All SDKs provide resources on the client:
client.guard
Guard evaluation, prompt shorthand, tool-call shorthand, SSE streaming
Full detection + Cedar policy evaluation
client.detect
run()
Detection only, no policy evaluation
client.detectors
list()
List available detectors
client.debug
policies()
Inspect loaded policies
REST Endpoint Parity
POST /v1/guard
client.guard.evaluate()
client.guard.evaluate()
client.guard().evaluate()
Full request/response surface
POST /v1/guard/stream
client.guard.stream()
client.guard.stream()
client.guard().stream()
SSE stream support
POST /v1/detect
client.detect.run()
client.detect.run()
client.detect().run()
Detection only, no Cedar evaluation
GET /v1/detectors
client.detectors.list()
client.detectors.list()
client.detectors().list()
Detector metadata and health
GET /v1/debug/policies
client.debug.policies()
client.debug.policies()
client.debug().policies()
Loaded Cedar policy metadata
GET /v1/health
Not currently surfaced
Not currently surfaced
Not currently surfaced
Use the REST endpoint directly when you need service health details
Decorator / Wrapper API
Python and TypeScript support wrapping functions with guardrails:
Prompt wrapper
Incoming user messages
Blocks before function runs
Tool wrapper
Outgoing tool calls
Blocks before function runs
Tool-response wrapper
Tool return values
Function runs; blocks return value
Model-response wrapper
LLM output
Function runs; blocks return value
Enforcement Modes
enforce
Block on deny (default)
monitor
Allow + log silently
alert
Allow + trigger alerting pipeline
Authentication
All SDKs accept a service key (hf_sk_...) that is automatically exchanged for a short-lived JWT. The JWT is cached and transparently refreshed — concurrent calls share a single in-flight exchange.
Framework Integrations
Both SDKs include optional integration helpers for common agent frameworks. These intercept model calls and tool executions at the framework level.
LangGraph
HighflameMiddleware
pip install 'highflame[langgraph]'
npm install @highflame/sdk
CrewAI
HighflameCrewHooks
pip install 'highflame[crewai]'
npm install @highflame/sdk
AWS Strands
HighflameStrandsHooks
pip install 'highflame[strands]'
npm install @highflame/sdk
Azure AI Foundry
HighflameFoundryMiddleware
pip install 'highflame[foundry]'
npm install @highflame/sdk
See Framework Integrations for full documentation on each integration.
Last updated