
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 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
Continue reading on Dev.to Tutorial
Opens in a new tab



![[MM’s] Boot Notes — The Day Zero Blueprint — Test Smarter on Day One](/_next/image?url=https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1368%2F1*AvVpFzkFJBm-xns4niPLAA.png&w=1200&q=75)