Skip to main content

Python SDK for LangGraph Approval Hub — human-in-the-loop approval workflows

Project description

langgraph-approval-hub

Python SDK for LangGraph Approval Hub — add human-in-the-loop approval workflows to your LangGraph agents in 3 lines.

Install

pip install langgraph-approval-hub

Usage

from langgraph_approval_hub import request_approval

decision = request_approval(
    hub_url="https://your-hub.vercel.app",
    api_token="your-api-secret-token",
    agent_name="Finance Agent",
    action_description="Process $4,200 refund batch for 12 customers",
    assignee="finance-team",
    assignee_type="team",
)

if decision == "approved":
    process_refunds()

request_approval() blocks until a human approves or rejects via the dashboard, then returns "approved" or "rejected".

Parameters

Parameter Type Required Default Description
hub_url str Your Approval Hub URL
api_token str Your API_SECRET_TOKEN env var value
agent_name str Name shown in the dashboard
action_description str Plain-English description of what the agent wants to do
assignee str Email address or team name
assignee_type str "person" or "team"
agent_reasoning str None Step-by-step reasoning shown to approver
escalate_to str None Email to escalate to if timeout exceeded
timeout_minutes int 60 Minutes before escalation
poll_interval int 10 Seconds between status polls

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_approval_hub-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgraph_approval_hub-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_approval_hub-0.1.0.tar.gz.

File metadata

  • Download URL: langgraph_approval_hub-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for langgraph_approval_hub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 192ad2193997f3c9856f5233daaa280e36f6b6017480a6380d0b77e6b26cce43
MD5 4a5dafd5daf99705a308d604a724b8a1
BLAKE2b-256 9740077b188939e22cf5e63d9a7ca93f2ad7a07f526f1ef343a0273bd2536c32

See more details on using hashes here.

File details

Details for the file langgraph_approval_hub-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langgraph_approval_hub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 039bac738779e546178e58778538a157335ddcf76089361f0f7c2d2904d529d0
MD5 4d3fbb2d7c6f1d7474033aed827fb8da
BLAKE2b-256 73b1f2c466ef1b6ffa7f588c1f41801a7e3d83da2d7d4b76b016cbcb33689dcc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page