One Decorator to Audit Every AI Agent Call
Your AI agent makes hundreds of API calls a day. Can you prove what it did last Tuesday at 3pm? asqav signs every function call with quantum-safe cryptography. One decorator. Setup pip install asqa...

Source: DEV Community
Your AI agent makes hundreds of API calls a day. Can you prove what it did last Tuesday at 3pm? asqav signs every function call with quantum-safe cryptography. One decorator. Setup pip install asqav Sign any function import asqav asqav.init(api_key="sk_...") @asqav.sign def call_model(prompt: str): return openai.chat.completions.create( model="gpt-4", messages=[{"role": "user", "content": prompt}] ) result = call_model("Summarize this document") # Function runs normally. A signed audit record is created automatically. The decorator detects async functions too. No changes needed. @asqav.sign async def async_call(prompt: str): return await client.chat.completions.create(...) Custom action types Default action type is function:call. Override it: @asqav.sign(action_type="deploy:production") def deploy(version: str): ... Group signs with sessions with asqav.session() as s: s.sign("step:fetch", {"source": "api"}) s.sign("step:process", {"records": 150}) s.sign("step:store", {"table": "result