r/OpenSourceeAI • • Jul 16 '26

Your agent shouldn't be able to act before it can prove it was allowed

1 Upvotes

I keep seeing the same pattern with agents that can actually do things. At first the demo looks great. The agent drafts the email, calls the API, updates the record, approves the refund, triggers the payout, whatever. How do we know it was allowed to do that? Not did it happen. Logs answer that. Not did the model explain itself. Models are very good at explaining things after the fact. The real question is whether the action cleared the right gate before it touched the real system. Most people start with a prompt instruction like “ask before taking action.” That is not a control. Then they add a Slack approval step. That is better, but it usually turns into approval spam. People rubber stamp, agents wait on humans for things that should have been automatic, and nobody has a clean proof trail when something goes wrong. I think the shape is pretty simple. Policy decides what should happen. The gate enforces it. The record proves it later. Those should be separate. The agent shouldn't decide its own oversight. The policy should. The approval shouldn't be advisory. The real function should be unreachable until the gate says allowed. And the evidence shouldn't just be a row in your own database saying “trust us.” If the question comes from a customer, auditor, partner, or someone outside your infra, self attested logs are the weak form. I built AiGentsy around this idea. We just shipped the smallest version that I think is actually useful for builders. pip install aigentsy==1.15.0 You can wrap a tool call so it evaluates the gate, exports a ProofPack, verifies the evidence honestly, and only executes if allowed. Something like this.

from aigentsy import gate_and_prove

.@gate_and_prove(action="external_api_write")

def update_record(record_id, status):

return f"updated {record_id} to {status}"

r = update_record(

"REC-4471",

"approved",

evidence={

"user_authorized": True,

"required_fields_present": True,

"within_policy": True,

},

)

print(r.consequence_state)

print(r.verification["verified"])

print(r.verification["verification_level"])

print(r.action_executed)

Allowed means the action can run. Blocked means it does not run. Held means it does not run until reviewed. Errors fail closed. The proof isn't hand waved either. Some bundles are fully anchored. Some are earlier or lighter and show pending checks. The SDK surfaces that honestly instead of pretending every result is magically perfect. That part matters to me because the whole point isn't “trust our dashboard.” It's “verify the record.” Curious how other people are handling this. If your agent can touch something real, are you using actual policy before the action runs, or is it still mostly human approval messages and logs after the fact? And has anyone here actually been asked to prove an agent was allowed to take an action, or is that still a future problem for most teams?