Signet: Cryptographic Enforcement of LLM Transitions A tool called Signet, installable via `pip install signet-ai`, enforces LLM agent behavior through a cryptographic state machine that blocks illegal transitions and retries calls with error feedback when hallucinations occur. Signet signs every state transition with Ed25519 for tamper-proof logs, ships a local Streamlit dashboard for visualizing agent logic, and positions itself against memory-focused frameworks such as LangGraph and AutoGen by managing trust rather than memory. Cryptographic State Enforcement for AI Agents. Problem: LLMs are probabilistic. They hallucinate. Solution: Signet is deterministic. It forces your agent to adhere to a strict Cryptographic State Machine. If your agent tries to output a state that violates your business logic e.g., refunding $100 or your process graph e.g., skipping "Approval" , Signet blocks it and auto-corrects the LLM. - Graph Enforcement: Define valid transitions START - ANALYZING - APPROVED . Signet blocks illegal jumps. - Self-Healing Middleware: Automatically retries LLM calls with error feedback when hallucinations occur. - Tamper-Proof Logs: Every state transition is cryptographically signed Ed25519 . - Visual Debugger: Includes a local Streamlit dashboard to visualize your agent's logic. pip install signet-ai python from signet import AgentState, StateMachineGuard, StateStatus from pydantic import Field from typing import Dict class RefundState AgentState : Enforce strict types on your data data: Dict str, int = Field ..., description="Must contain 'amount'" Define valid moves REFUND GRAPH = { "START": "ANALYZING" , "ANALYZING": "APPROVED", "DENIED" , "APPROVED": , "DENIED": } python from signet.middleware import SignetClient import openai guard = StateMachineGuard RefundState, REFUND GRAPH client = SignetClient openai.Client , guard Run the agent If the LLM tries to skip steps or output bad JSON, Signet catches it, feeds the error back, and retries automatically. final state = client.run messages= {"role": "user", "content": "Process a refund for $50"} , model="gpt-4" print f"Signed: {final state.signature}" Signet comes with a built-in dashboard to test your graph logic. 1. Create a file viz.py see examples folder . 2. Run: streamlit run viz.py Existing frameworks LangGraph, AutoGen manage memory . Signet manages trust . Use Signet when you need to ensure that your agent followed the rules.