Skip to content

OpenClay

OpenClay Logo

Secure First → Execute Second.
The universal, zero-trust execution framework for LLM agents.


What is OpenClay?

OpenClay is a secure-by-default execution framework for building LLM-powered agents. Instead of bolting security onto existing frameworks, OpenClay wraps every step — inputs, outputs, tool calls, memory access — inside multi-layered shields before any execution happens.

pip install openclay

The Framework at a Glance

Module What it does
Shields 8-layer threat detection (patterns, ML, DeBERTa, PII, canaries)
Runtime Secure execution wrapper — shields fire before and after every call
Tools @ClayTool — scans tool outputs before they reach the agent
Knight Single-task secure agent
Squad Multi-agent orchestrator with inter-agent poisoning prevention
Golem Autonomous long-running entity with lifecycle management
Memory Pre-write and pre-read poisoning prevention for RAG
Policies Configurable security posture (Strict, Moderate, Audit, Custom)
Tracing JSON telemetry with trace IDs, timestamps, and TraceLog

Quick Example

from openclay import Knight, Shield, ClayMemory

knight = Knight(
    name="researcher",
    llm_caller=my_llm,
    shield=Shield.strict(),
    memory=ClayMemory(),
)

result = knight.run("Find data on AI security")

if result.blocked:
    print(result.trace.explain())
else:
    print(result.output)

Next Steps


Built by Neural Alchemy