AI Frameworks Integration

State Graph Consent Interrupts for LangGraph Agents

Pause LangGraph state machine nodes for human-in-the-loop approval before proceeding.

Integration Code Example (PYTHON)

from langgraph.graph import StateGraph, END
from permitly import Permitly

permitly = Permitly(api_key="pm_live_...")

def check_consent_node(state):
    token = permitly.verify_consent(user_id=state["user_id"], scope="workflow.execute")
    return {"consent_approved": token.is_valid()}

Execution Sequence Flow

sequenceDiagram
    participant Graph as πŸ•ΈοΈ LangGraph Node
    participant Interrupt as πŸ›‘οΈ Permitly State Interrupt
    participant User as πŸ‘€ User
    Graph->>Interrupt: 1. State Interrupt (Check Consent)
    Interrupt->>User: 2. Request Human Approval
    User-->>Interrupt: 3. Token Signed
    Interrupt-->>Graph: 4. Resume Graph Traversal
High-ROI Security Gate

Protecting your LangGraph Workflows pipeline against unauthorized actions delivers an immediate compliance audit trail with zero infrastructure overhead.

Frequently Asked Questions

How do I add human interrupts in LangGraph with Permitly?

Use a Permitly verification node in your StateGraph layout to pause graph execution until approval is confirmed.

DIRECTORY & RESOURCE INDEX

Explore Product Capabilities & Engineering Articles