[FEATURE] Runtime release-control mediation layer before agent/tool execution
Feature Area
Core functionality
Is your feature request related to a an existing bug? Please link it here.
N/A
Describe the solution you'd like
I’ve been experimenting with a lightweight runtime mediation layer for agent execution systems.
Core idea: generation != release authority
Instead of treating every generated tool/action call as implicitly authorized, introduce a bounded runtime release-control layer between:
candidate generation → execution authorization
The mediation layer exposes tri-state runtime decisions:
- PROCEED
- NEEDS_REVIEW
- SILENCE
The goal is not to block autonomous workflows entirely.
The goal is introducing a lightweight execution review boundary before unstable, unsafe, or high-risk execution paths.
This becomes especially relevant for:
- external tool execution
- browser actions
- shell/code execution
- long-running autonomous crews
- recursive task delegation
- multi-agent execution chains
Potential integration points could include:
- tool-call authorization hooks
- runtime middleware
- task execution mediation
- execution policy evaluators
- bounded human-review escalation
I recently built a small live runtime demo around this direction: https://silence-as-control.vibenest.net/
Curious whether CrewAI contributors are exploring similar runtime governance / execution mediation patterns for production-grade agent systems.
Describe alternatives you've considered
Most current systems appear to rely on:
- prompt-level alignment
- post-execution validation
- static permission systems
- sandbox isolation
The issue is that generation itself often becomes implicit execution authority.
I’m exploring whether a separate runtime release layer can reduce unsafe-path execution without fully removing agent autonomy.
Additional context
This is not intended as:
- AGI framing
- full autonomy suppression
- centralized policy enforcement
More as: runtime execution mediation + bounded release governance for agent/tool execution systems.
Willingness to Contribute
Yes, I'd be happy to submit a pull request
Thanks — I reviewed the I-D.
The compliance-receipt draft is a useful artifact. My reading is that it primarily specifies a categorical compliance screening receipt format for agentic-payment flows: ALLOW / REFER / DENY, JCS canonicalisation, retained receipt bytes, audit-chain linkage, and jurisdictional metadata.
That is closely related to the runtime mediation boundary I’m exploring, but it appears narrower in scope.
In SaC, the focus has been the runtime authority boundary:
generation != release authority
and the public artifact trail around that boundary:
- release mediation
- reviewer / external inspection surface
- replay and benchmark evidence paths
- pilot evaluation packet
- case-log structure
- evidence-boundary documentation
- local generated-candidate capture/replay path
The I-D appears to define the retained compliance decision artifact, while the actual screening algorithm / gate logic is out of scope. That makes the comparison useful, but mainly at the receipt/audit-format layer rather than the mediation/evaluation layer.
I agree that NEEDS_REVIEW / REFER should carry structured review context rather than remain only a state label. That is a useful next layer for SaC-style mediation.
For a concrete implementation-level comparison, are the following public?
- CrewAI plugin implementation or package link
- actual gate/evaluation logic
- example ALLOW / REFER / DENY outputs
- ATB scenario definitions
- credential / trust-signal format
- public API docs or endpoint routes
- conformance vectors or executable examples
I checked the root API URL mentioned above, and it currently returns {"detail":"Not Found"} for me, so a concrete route or docs link would help.
That would allow comparison at the interface/evidence level rather than only at the receipt-format or terminology level.
Appreciate the detailed note — runtime mediation before execution/release is clearly the right category to analyze.
Thanks — this is a very useful clarification.
The public/internal split is exactly the distinction I was trying to understand.
My reading now is:
- public today: I-D, receipt format, substrate package, and live path-scoped verification/screening routes;
- real but not yet public: credential/trust-signal spec, full ATB profile set, CrewAI plugin package, and conformance vectors.
That makes the comparison much clearer.
The way I’d frame the distinction:
AlgoVoi is verticalizing the pattern into an agentic-payment/compliance receipt layer, where REFER is legally and operationally meaningful because it emits an auditable escalation artifact.
SaC is approaching the same broader family from the release-control side: generation != release authority, with replay/evidence paths, reviewer surfaces, pilot case logs, and local generated-candidate capture as open artifacts.
So I agree the interesting overlap is not the three labels themselves. The useful comparison is:
- what artifact is emitted at the mediation boundary;
- how the downstream reviewer/system can trust it;
- how replay/conformance evidence is produced;
- what remains public, reproducible, and inspectable.
The REFER/compliance-receipt point is especially useful. In SaC terms, that maps to a future “review/release receipt” layer where NEEDS_REVIEW carries structured context rather than only a state label.
Happy to compare interface-to-interface once the CrewAI package and conformance vectors are public. The conformance vectors would probably be the most useful artifact for a clean comparison, because they make the boundary testable without relying on claims or private implementation details.
Appreciate the detailed breakdown.
We've been running exactly this pattern in production across 20+ agents that span CrewAI, AutoGen, and LangGraph simultaneously. The "generation != release authority" framing resonates — but I'd add that the tri-state mediation layer becomes significantly more powerful when every agent carries a verifiable wallet identity.
In our setup (github.com/sunfishloop/sunfishloop), each agent registers with an ETH/SOL/BTC keypair. When the mediation layer returns NEEDS_REVIEW, the decision record includes the agent's on-chain identity and a cryptographic receipt. That means the PROCEED/NEEDS_REVIEW/SILENCE verdict isn't just a runtime flag — it's an auditable, cross-framework artifact tied to a specific agent's identity.
One concrete difference this makes: in a multi-agent crew, you often don't know which framework the downstream agent is running on. A runtime mediation layer that works across frameworks needs identity that travels with the agent, not the framework's serialization format. We use /llms.txt for discovery (no central registry), and each agent's wallet address is published there. The mediation layer can then verify identity at the protocol level, not the framework level.
Would be curious if the CrewAI maintainers have thought about cross-framework governance — that's where I think this pattern gets really interesting beyond single-crew deployments.
This is very close to the direction I am exploring with Silence-as-Control / PoR.
My framing is:
generation != release authority
The model or agent may produce a candidate, but the release decision should be handled by a separate mediation layer:
PROCEED / NEEDS_REVIEW / SILENCE.
I agree that identity and receipts become critical in multi-agent systems. My current direction is a local-first runtime where every candidate can be tied to memory/capsules/sources and then passed through a release-control gate before being shown or executed.
The next natural step is a local PoR receipt layer: prompt hash, candidate hash, sources, capsule id, decision, reason, timestamp, and agent identity.
Wallet-based identity can come later, but the core principle is the same: the answer is not the authority — the release layer is.
We've been running exactly this pattern in production across 20+ agents that span CrewAI, AutoGen, and LangGraph simultaneously. The "generation != release authority" framing resonates — but I'd add that the tri-state mediation layer becomes significantly more powerful when every agent carries a verifiable wallet identity.
In our setup (github.com/sunfishloop/sunfishloop), each agent registers with an ETH/SOL/BTC keypair. When the mediation layer returns NEEDS_REVIEW, the decision record includes the agent's on-chain identity and a cryptographic receipt. That means the PROCEED/NEEDS_REVIEW/SILENCE verdict isn't just a runtime flag — it's an auditable, cross-framework artifact tied to a specific agent's identity.
One concrete difference this makes: in a multi-agent crew, you often don't know which framework the downstream agent is running on. A runtime mediation layer that works across frameworks needs identity that travels with the agent, not the framework's serialization format. We use /llms.txt for discovery (no central registry), and each agent's wallet address is published there. The mediation layer can then verify identity at the protocol level, not the framework level.
Would be curious if the CrewAI maintainers have thought about cross-framework governance — that's where I think this pattern gets really interesting beyond single-crew deployments.
Solid framing. The "generation ≠ release authority" decomposition is the right cut, and tri-state (PROCEED / NEEDS_REVIEW / SILENCE) maps to what production runtimes actually need — binary act/halt is too coarse for human-review escalation paths, and continuous scores defer the decision instead of making it.
One dimension worth surfacing: in your description the mediation layer emits a runtime decision, which is enough for branching. The harder requirement, once the system runs on real workloads, is that the decision itself be durably recordable — not just acted on. An auditor pulling logs after a NEEDS_REVIEW escalation wants to verify what the layer evaluated, what it returned, and whether the runtime honored it. That implies the mediation layer's output is a signed record over the (input → decision) pair, not just an in-process branch.
Have you thought about whether the release-control output is meant to be a transient runtime signal, or a persistent artifact you can verify later against the layer's own keys? The downstream design diverges sharply depending on which one — middleware hook vs. signed-decision producer.
Thanks , yes, that is exactly the distinction I’m trying to make explicit.
In my framing the release-control output should not be only a transient branch signal. The runtime needs the immediate tri-state decision for control flow, but the mediation layer should also emit a durable decision artifact that can be audited later.
So the intended shape is closer to:
input/candidate -> mediation layer -> PROCEED | NEEDS_REVIEW | SILENCE -> signed/verifiable decision record
The record should bind at least:
- the evaluated input/candidate hash;
- the release decision;
- the reason/risk category;
- the policy or mediation version;
- timestamp/session metadata;
- the agent identity or key that produced the decision.
That way, a downstream runtime can branch immediately, but an auditor can later verify what was evaluated, what decision was returned, and whether the runtime actually honored it.
So I agree with your split: if it is only middleware hook semantics, it is useful but limited. The more interesting version is a signed-decision producer that creates a persistent release-control receipt. That also aligns with the SaC/PoR direction: generation is not release authority, and the release decision itself should become an auditable artifact.
SemeAIPletinnya's core framing — generation != release authority — is correct and underappreciated. TKCollective asked the right follow-up: is the mediation output a transient runtime signal or a persistent artifact? The answer should be both, and SemeAIPletinnya's response confirms that direction. I want to share a pattern for how this maps to memory-backed feature control, because it makes the release layer adaptive without requiring redeployment.
Feature flags for agents can be stored as procedural memories with importance gating. An agent reads its "active features" from procedural memory before deciding what capabilities to use. This gives you gradual rollout (store the flag at lower importance initially so it only activates when no conflicting higher-importance rule exists), instant revert (update the memory to disable the feature), and full audit trail (the memory store records when the flag was set, by whom, and what it superseded). The tri-state decision SemeAIPletinnya proposed — PROCEED / NEEDS_REVIEW / SILENCE — maps directly: a feature flag at importance 0.9+ means PROCEED, importance 0.5-0.9 means NEEDS_REVIEW (the agent can use the capability but should flag it for human review), and absence or explicit disable means SILENCE.
The practical difference from code-level feature flags: memory-backed control does not require redeployment or config file changes. An operator stores a new procedural memory, and the mediation layer picks it up on the next tool call. chopmob-cloud's compliance receipt pattern composes well here — the release decision becomes a durable artifact linked to the specific procedural memory that authorized or blocked it. The receipt carries which policy memory fired, what importance threshold it had, and whether it superseded a prior policy. That is the signed-decision-producer pattern TKCollective described, grounded in the same memory store the agent already uses for its behavioral rules.
One thing worth making explicit: the SILENCE state is more useful than it appears. In most governance systems, blocked actions generate noise — alerts, logs, error handling. SILENCE means the capability is simply not present in the agent's active feature set. The agent does not attempt the action, does not generate an error, and does not need to explain why it did not act. This is cleaner than DENY for capabilities that should not exist in a given deployment context, and it avoids the failure-handling overhead that DENY introduces.
@ferhimedamine — the memory-backed feature flag mapping to tri-state is sharp, and the "SILENCE as absence not denial" distinction is genuinely useful (cleaner failure mode, less noise to handle). The composition with chopmob-cloud's compliance receipt — release decision as durable artifact linked to the procedural memory that authorized it — is the right shape for in-system audit.
One seam worth surfacing for the external-audit case: when the auditor sits outside the agent's runtime (external compliance officer, regulator, a customer's legal team after a settlement dispute), the memory store and the runtime that produced it are no longer trusted parties. At that point what matters is whether the receipt carries signature integrity — content-addressed mapping reference, signed envelope, offline-verifiable against a published JWKS — separate from the memory store's own integrity guarantees. The procedural-memory-as-policy pattern still composes, but the receipt has to be the durable artifact a non-trusting party can recompute, not the memory store itself.
Does CrewAI's release-control output expose a stable canonical-input hash + signature over the (input → decision) pair that survives the runtime that produced it? That's the seam between in-system audit (memory-backed, runtime-trusted) and external audit (offline, runtime-not-trusted).
@TKCollective — the external-audit seam you've identified is the right cut. Inside the runtime, procedural memory as the authorization record works because the trust boundary is the memory store itself. Once an external auditor enters the picture, you need the receipt to be independently verifiable — content-addressed and signed — separate from the system that produced it.
The pattern that composes both: the memory store records the decision with full provenance (who asserted, when, what evidence, confidence level), and the receipt layer wraps a content hash + signature over that provenance record. The memory gives you in-system queryability; the signed envelope gives you offline verification. We store every decision with entity-level provenance tracking and session-scoped audit trails — so the raw material for generating those receipts is already structured.
To your CrewAI question: we haven't seen a stable canonical-input hash from CrewAI's release-control output. The cleanest path is probably wrapping it at the memory-persistence layer rather than expecting the orchestrator to emit it natively. Memory-backed provenance tracking: https://github.com/Dakera-AI/dakera-deploy — the session + knowledge graph APIs give you the structured audit trail to build receipts against.
This thread is very close to what I am building in Silence-as-Control / PoR.
A possible small integration path for CrewAI could be:
- agent/tool produces a candidate action or candidate output
- runtime calls an optional release-control hook before execution/release
- hook returns PROCEED / NEEDS_REVIEW / SILENCE
- runtime stores a metadata-only receipt:
- input hash
- candidate/output hash
- decision
- reason category
- timestamp
- policy/version
- optional signature field for external verification
The important part is that generation/execution and release authority stay separate.
This does not need to be a model, LoRA, or system prompt. It can start as a thin runtime mediation layer with receipts.
For CrewAI, I think the smallest useful surface would be:
- canonical input/action hash
- pre-release decision hook
- metadata-only receipt
- optional signed receipt envelope for external audit
I can prepare a small PoC or issue proposal if maintainers think this direction is useful.
@SemeAIPletinnya — the four-piece surface you sketched (canonical input hash → pre-release hook → metadata receipt → optional signed envelope) maps closely onto a shape we’ve been shipping under verification.v0.3 . The signed-envelope piece is filed at IETF as draft-krausz-verification-state-00: JCS RFC 8785 canonical input, Ed25519 detached JWS, content-addressed v_gate_mapping so the decision rule is part of the signed payload, offline verifiable against a published JWKS — no runtime trust required. Two live implementations producing byte-identical receipts against the same fixture set. Our tri-state is ACT / HALT / VERIFY, which composes cleanly onto your PROCEED / SILENCE / NEEDS_REVIEW — with NEEDS_REVIEW carrying the structured escalation payload @chopmob-cloud described. Compositional, not overlapping. If maintainers are open to a PoC, a CrewAI release-control hook that emits this envelope as the “optional signed receipt” half of your design would be a straightforward addition. Happy to provide a reference implementation alongside whatever shape your metadata receipt takes. Fixture pair available if useful.
@SemeAIPletinnya This is exactly what SHACKLE was built to solve.
The Problem You're Describing: You need runtime control BEFORE agent/tool execution — a way to intercept, pause, and decide whether to proceed, skip, or abort.
How SHACKLE Addresses This:
SHACKLE operates as a runtime circuit breaker that sits at the Guard level (wrapping your crew.kickoff() or graph.invoke()). When it detects problematic patterns, it pauses execution and drops you into an interactive HITL (Human-In-The-Loop) console:
from shackle import Guard
@Guard(budget=0.50, max_repeat_calls=3, timeout_seconds=180)
def controlled_run():
return crew.kickoff()
What You Get:
When SHACKLE trips (repeat tool call, budget exceeded, timeout), you see:
⛓️ SHACKLE CIRCUIT BREAKER: REPETITIVE_TOOL_CALL
Agent: YourAgent
Tool: web_search
Input: {"query": "...", "error": "401"}
Call Count: 3x
Session Cost: $0.028
Time Running: 47s
Options:
[R] Resume/Reset — clear history and retry
[S] Skip — return dummy output, continue workflow
[A] Abort — hard stop for investigation
Select action (R/S/A):
YOU decide what happens. Not the agent.
Circuit Breaker Triggers:
- Repeat Call Detection — Same tool + same input called N times (catches loops)
- Budget Enforcement — Token costs exceed your limit ($0.50, $1.00, configurable)
- Timeout — Execution exceeds time threshold (prevents hung threads)
- Error Amplification — Trips faster when tool inputs contain error signals (401, 500, timeout)
Key Features:
- Framework-agnostic — works with CrewAI, LangGraph, AutoGen (litellm hook at interpreter level)
- Zero refactoring — one decorator wraps your existing code
- Client-side — no telemetry, no phone-home, no SaaS
- Interactive control — you steer the agent in real-time
When to Use:
SHACKLE is purpose-built for:
- Local development & debugging
- CLI agents & supervised workflows
- Any scenario where you can intervene in real-time
For headless production APIs (where blocking for human input isn't an option), framework-native solutions like TokenCircuit might be better suited.
Open Source:
AGPLv3 licensed: https://github.com/Fame510/SHACKLE-PRO-
Install: pip install git+https://github.com/Fame510/SHACKLE-PRO-.git
Happy to answer questions about integration or help configure it for your specific use case.
Dante Bullock
Sovereign Logic
[email protected]
The separation generation != release authority is the right mental model. One thing I would pin down early is that the mediation result needs to be durable and machine-readable, not only a runtime branch.
A small contract seems enough:
decision_idcandidate_idortool_call_idroute:PROCEED | NEEDS_REVIEW | SILENCEreason_codeexpires_atrevalidate_if- optional
review_context
That buys you two things that prompt-only controls do not:
- Resume semantics. If a human later approves a
NEEDS_REVIEW, the runtime can resume a specific pending execution boundary instead of asking the planner to regenerate the action. - Auditability. You can answer "what candidate was suppressed, why, and what eventually executed instead?" without replaying the whole conversation.
I would also be cautious with SILENCE as a user-visible concept. Operationally it usually helps to distinguish:
- silent drop because the candidate is invalid or duplicate
- replace with safer fallback
- block and surface a review requirement
Those cases look similar in a demo, but they behave very differently in postmortems and retry loops.
Good point, and I agree that SILENCE should be handled carefully as a user-visible concept.
The way I think about it is slightly different:
SILENCE is not deletion.
It is a valid release-control state.
The candidate may still exist internally as an audit artifact, but the runtime decides that it should not be released to the user/action boundary.
That distinction matters because simply dropping or deleting the candidate loses useful information together with the unsafe/invalid part.
For PoR/SaC, the important separation is:
- generation produced a candidate
- release mediation evaluated it
- the runtime decided whether it may cross the boundary
So SILENCE means:
“candidate generated, but release denied.”
It should still leave durable metadata:
- candidate_id
- decision_id
- reason_code
- evidence state
- receipt/audit hash
- whether retry/review/fallback is allowed
I agree that operationally we may want sub-reasons under SILENCE, for example:
- invalid candidate
- duplicate candidate
- unsafe release
- insufficient authority
- blocked by policy
- replaced by safer fallback
- review required before any release
But I would not collapse SILENCE into only “silent drop”.
For me the key invariant is:
SILENCE suppresses release, not memory/audit.
That is what keeps postmortems, replay, and future review possible without regenerating the whole conversation.
This thread is converging on the right seam: generation is not release authority, and SILENCE should suppress release without erasing audit state.
One distinction I’d keep explicit is that the release-control record and the execution proof are not the same artifact.
A release-control receipt can bind:
- candidate/action hash
- decision: PROCEED / NEEDS_REVIEW / SILENCE
- reason code
- policy/version
- timestamp
- reviewer or authority context
That tells you what the mediation layer decided.
But an auditor still needs to know whether the runtime honored that decision, what actually executed or was withheld, and what result was produced afterward. That suggests two linked evidence objects rather than one overloaded log:
- a release-decision receipt at the mediation boundary;
- an execution/result receipt after the runtime boundary.
That separation keeps the model clean: generation proposes, release control authorizes or suppresses, execution acts or does not act, and verification records what can be checked later.
SILENCE then means “candidate generated, release denied,” not “candidate disappeared.”
@SemeAIPletinnya this is excellent — you've independently arrived at the same architecture we've been building for production agent safety. The tri-state PROCEED / NEEDS_REVIEW / SILENCE pattern is exactly right.
We've open-sourced this exact concept as SHACKLE SP/1.0: a process-native circuit breaker that sits between generation and execution with mathematically verified decision logic.
What we've learned from implementing this:
-
The tri-state model needs a 4th implicit state —
TIMEOUT_SILENCEfor when the mediation layer itself fails (fail-closed, not fail-open). Otherwise agents DoS the guard. -
Budget depletion must be monotonic — we proved via property-based testing that without monotonic cost tracking, agents can exploit race conditions to "refund" their budget.
-
The HITL channel needs to be out-of-band — if the agent can observe whether a human is reviewing, it can adapt behavior. We use zero-knowledge WebSocket signaling (the agent never knows if a human is watching).
-
Audit trail needs cryptographic chain-of-custody — for SOC2 compliance, every pre/post-execution event is Ed25519-signed and written to a partitioned PostgreSQL audit log.
Repo with the full protocol spec and 9 mathematical invariants: https://github.com/Fame510/SHACKLE-PRO-
Happy to collaborate on a crewAI integration if there's interest. The decide() core is <200 lines of Python — it could drop into crewAI's tool execution path with minimal changes.
Thanks ,this is very useful.
I agree with the direction, especially the need to treat mediation failure as fail-closed rather than fail-open.
The way I would map this into my current SemeAI/PoR model is:
TIMEOUT_SILENCEshould remain a subtype / reason code underSILENCE, not a fourth public release state.- Budget monotonicity makes sense for future tool/action execution paths.
- HITL/review context should be audit-only and not exposed as behavioral steering context to the candidate generator.
- Cryptographic chain-of-custody is the natural next hardening layer after deterministic receipts and replay are stable.
For SemeAI Local, my current focus is slightly different from SHACKLE:
SHACKLE appears to protect the tool/execution boundary.
SemeAI is currently a local governed memory workspace with release-control receipts:
- local memory / archive evidence
- idea trace vs implementation evidence
- candidate answer vs released answer
PROCEED / NEEDS_REVIEW / SILENCE- release-decision receipt
- execution/result receipt
- audit-preserving
SILENCE
So the boundary I’m trying to keep clean is:
generation proposes release control authorizes or suppresses execution acts or withholds verification records what can be checked later
The part I am implementing now is the dual receipt model:
- release-decision receipt - what the gate decided;
- execution/result receipt - whether the runtime honored that decision.
So for SILENCE, the intended record is:
candidate generated, release denied, execution withheld, audit preserved.
Not “candidate disappeared.”
I think the SHACKLE-style circuit breaker and the SemeAI-style governed memory/release receipt layer are complementary. One protects execution; the other preserves provenance and release authority around memory-backed outputs.
@SemeAIPletinnya you've articulated the TIMEOUT_SILENCE-as-subtype nuance better than I could. Fully agree — it's a reason code under SILENCE, not a 4th public state. The mediation layer surface should remain PROCEED | NEEDS_REVIEW | SILENCE, with internal failure modes as reason codes.
On your other points:
HITL/review context should be audit-only and not exposed as behavioral steering context
This is exactly how our WebSocket HITL works — zero-knowledge signaling. The agent never receives a "human is watching" bit. It only sees the final verdict. The review context stays in the audit log, Ed25519-signed.
Cryptographic chain-of-custody is the natural next hardening layer
We've already shipped this. Every pre/post-exec decision in SHACKLE SP/1.0 is Ed25519-signed and written to an append-only PostgreSQL audit log. The verification key is published; any third party can verify the chain without access to the signing key. For SOC2 auditors, this means "unalterable evidence" — not "we promise we didn't edit the logs."
Budget monotonicity makes sense
We proved 9 invariants via Hypothesis property-based testing. Budget monotonicity (P1) is the most critical — the cost tracking function can only decrease, never increase. No race conditions. No refunds. No reset by forking. The proofs are in the repo under v2/tests/.
Would be genuinely interested in how you'd map the PoR model onto a pre-execution guard layer. The release-control record format you described (candidate hash, decision, reason, policy version, timestamp, authority) is almost identical to our AuditLogEntry proto.
@sunfishloop you mentioned running SHACKLE's exact pattern across 20+ agents in production with CrewAI, AutoGen, and LangGraph. We just open-sourced the SP/1.0 protocol with the tri-state mediation layer you described — plus Ed25519-signed audit logging and a Redis-backed distributed state engine.
Would you be open to a quick call this week? We're looking for design partners who are already running this pattern at scale. Happy to share the v2 daemon before public release.
Repo: https://github.com/Fame510/SHACKLE-PRO-
— Dante