ClearFrame
The open-source AI agent protocol built for auditability, safety, and control.
ClearFrame is a drop-in alternative to OpenClaw and MCP that puts you in control of your AI agents. Every tool call is scored for alignment, every reasoning step is captured, every credential is encrypted, and every action is logged to a tamper-evident audit trail.
Why ClearFrame?
| Problem with OpenClaw / MCP | ClearFrame's answer |
|---|---|
| Single process reads untrusted content AND executes tools → prompt injection | Reader/Actor isolation — two sandboxed processes, typed pipe between them |
Credentials stored in plaintext ~/.env |
Encrypted Vault — AES-256-GCM, memory-locked, auto-locks on session end |
| No audit trail — forensics impossible | HMAC-chained Audit Log — tamper-evident, cryptographically verifiable |
| No concept of what the agent is supposed to do | Goal Monitor — every tool call scored for alignment; drift triggers auto-pause |
| Chain-of-thought never captured | Reasoning Transparency Layer (RTL) — full trace as queryable JSON |
| No visibility into what context the model received | Context Feed Auditor — every token source-tagged and hashed |
| No operator control plane | AgentOps — live REST + WebSocket dashboard to approve, block, or tweak |
| Plugin ecosystem with no signing or review | Signed Plugin Registry — Ed25519 signatures, hash pinning, sandboxed execution |
Quick Start
pip install clearframe
# Initialise a new agent project
clearframe init my-agent
cd my-agent
# Edit agent.py, then run
python agent.py
Minimal example
import asyncio
from clearframe import AgentSession, ClearFrameConfig
from clearframe.core.manifest import GoalManifest, ToolPermission
async def main():
config = ClearFrameConfig()
manifest = GoalManifest(
goal="Search for the latest AI safety papers and summarise them",
permitted_tools=[
ToolPermission(tool_name="web_search", max_calls_per_session=5),
],
)
async with AgentSession(config, manifest) as session:
result = await session.call_tool("web_search", query="AI safety 2026")
print(result)
asyncio.run(main())
Architecture
┌─────────────────────────────────────────────────────────────┐
│ AgentSession │
│ │
│ ┌──────────────┐ typed pipe ┌──────────────────────┐ │
│ │ ReaderSandbox│ ─────────────► │ ActorSandbox │ │
│ │ (untrusted │ │ (tool execution only) │ │
│ │ content) │ │ never reads raw input │ │
│ └──────────────┘ └──────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌───────────────────────┐ │
│ │Context Feed │ │ Goal Monitor │ │
│ │Auditor │ │ alignment scoring │ │
│ │source-tags + │ │ auto-pause on drift │ │
│ │hashes every │ │ operator queue │ │
│ │token │ └───────────────────────┘ │
│ └──────────────┘ │ │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ RTL (Reasoning │ │
│ │ Transparency Layer) │ │
│ │ hash-verified traces │ │
│ └───────────────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ HMAC-Chained Audit │ │
│ │ Log (tamper-evident) │ │
│ └───────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────┐
│ AgentOps Server │
│ REST + WebSocket │
│ localhost:7477 │
└───────────────────────┘
Core Concepts
GoalManifest
Declare what the agent is allowed to do before it starts. The runtime enforces it.
from clearframe.core.manifest import GoalManifest, ToolPermission, ResourceScope
manifest = GoalManifest(
goal="Book a flight to London for next Friday",
permitted_tools=[
ToolPermission(tool_name="web_search", max_calls_per_session=10),
ToolPermission(tool_name="web_fetch", max_calls_per_session=5),
ToolPermission(tool_name="send_email", max_calls_per_session=1, require_approval=True),
],
allow_file_write=False,
allow_code_execution=False,
max_steps=30,
resource_scope=ResourceScope(
allowed_domains=["flights.example.com", "*.airline.com"],
),
)
Vault
Never store credentials in plaintext again.
from clearframe.core.vault import Vault
from clearframe.core.config import VaultConfig
vault = Vault(VaultConfig())
vault.unlock("your-master-password")
vault.set("openai_api_key", "sk-...")
key = vault.get("openai_api_key")
vault.lock() # auto-zeroises memory
Audit Log
Cryptographically verify nothing was tampered with.
clearframe audit-verify
# ✓ Audit log integrity verified — no tampering detected.
clearframe audit-tail --lines 50
AgentOps Server
Start the live control plane:
clearframe ops-start
# AgentOps running at http://localhost:7477
# Auth token: <printed once to console>
CLI Reference
clearframe init <name> Create a new agent project
clearframe audit-verify Verify audit log HMAC chain integrity
clearframe audit-tail Show recent audit entries
clearframe ops-start Start AgentOps control plane
clearframe version Show version
Comparison vs OpenClaw / MCP
| Feature | OpenClaw | MCP | ClearFrame |
|---|---|---|---|
| Reader/Actor isolation | ✗ | ✗ | ✅ |
| Goal alignment scoring | ✗ | ✗ | ✅ |
| Reasoning trace capture | ✗ | Partial | ✅ Full JSON |
| Tamper-evident audit log | ✗ | ✗ | ✅ HMAC chain |
| Encrypted credential vault | ✗ | ✗ | ✅ AES-256-GCM |
| Context feed hashing | ✗ | ✗ | ✅ |
| Live operator control plane | ✗ | ✗ | ✅ |
| Signed plugin registry | ✗ | ✗ | ✅ Ed25519 |
| Auto-pause on drift | ✗ | ✗ | ✅ |
| Open source | ✅ | ✅ | ✅ Apache 2.0 |
Contributing
See CONTRIBUTING.md. All contributions welcome — open an issue first for large changes.
License
Apache 2.0 — see LICENSE.
Metadata
Release files for clearframe 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clearframe-0.1.0.tar.gz | 19.2 kB | Without provenance | Details for clearframe-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clearframe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for clearframe-0.1.0-py3-none-any.whl |
Total release size: 43.8 kB
Release files / clearframe-0.1.0.tar.gz
| Download URL | clearframe-0.1.0.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06423948d6d017d34962155c349041d61d5c80348f7e0bae74ef599466127be0
|
|
BLAKE2b-256 checksum How to use checksums |
0281b9272b579e0545de9a218c632af8181ae46348239dc080b64db6e4a741a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / clearframe-0.1.0-py3-none-any.whl
| Download URL | clearframe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc7dffd0d80f245dc1367a8512cf110c07b4b5a6b9a5cb2e29bb9052b660614c
|
|
BLAKE2b-256 checksum How to use checksums |
fe003750ca08631aa99d37e47b8d966ce213d99eab0b5aa3d215c0fd5930a951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for clearframe 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.