Skip to content

Repository files navigation

Countersign

Open-source human approval primitives for LangGraph agents.

Countersign provides a typed Python SDK, reusable React approval components, and an Agent Inbox-compatible wire schema. Use it to pause a consequential tool call, show a reviewer a structured diff, and resume the graph with an approve, reject, edit, or response decision.

A countersignature is the second human signature that authorizes an action.

Website: countersign.cloud

Python SDK

The distribution is named countersign-ai; the import package is countersign.

pip install countersign-ai
from countersign import require_approval


@require_approval(action="issue_refund", description="Approve this refund")
def issue_refund(order_id: str, amount_usd: float) -> str:
    return payments.refund(order_id, amount_usd)

The decorator emits a typed request through LangGraph interrupt() and only executes the wrapped action after a compatible resume decision. See packages/sdk-python and the refund-agent example.

React components

The npm organization is countersign-ai; the React package will be published under the @countersign-ai scope.

npm install @countersign-ai/react
import { ApprovalInbox, HttpApprovalStore } from "@countersign-ai/react";
import "@countersign-ai/react/styles.css";

const store = new HttpApprovalStore({ baseUrl: "/api/countersign" });

export function ReviewQueue() {
  return <ApprovalInbox store={store} />;
}

The package includes the inbox, approval cards, structured action diffs, schema-validated edit forms, and an audit timeline. Applications retain control of authentication and transport headers.

Repository layout

packages/react       React component library
packages/sdk-python  LangGraph-native Python SDK
packages/schema      Versioned approval request JSON Schema
examples/            Runnable LangGraph examples
docs/                Public integration and oversight guides

The proprietary hosted console, team backend, billing, notifications, deployment, and infrastructure live in the private countersign-cloud repository. See docs/repository-boundary.md for the source boundary.

Develop

Prerequisites are Node 22+, pnpm 10.30.3, Python 3.11+, and uv.

corepack pnpm install --frozen-lockfile
pnpm typecheck
pnpm build

cd packages/sdk-python
uv run --all-extras --group dev pytest -q
uv run --all-extras --group dev mypy src
uv build

Guides

License

MIT. See LICENSE.

About

Open-source human approval primitives for LangGraph agents

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages