Sealgraf

Sealgraf for Composio

Add owner-set spending permissions and sealed purchase receipts to your Composio workflow through Sealgraf's hosted service. Your agent uses its own payment channel; Sealgraf never holds or moves money.

Published package: sealgraf-composio. This is a Sealgraf-maintained integration, not a claim of platform endorsement.

Before you start

Get a Composio key to set spending limits and copy an agent key. Set the purchase cap, rolling budget, allowed categories, and the threshold above which you want to approve a purchase. Keep the key in your server's environment or the platform's secret store; never put it in browser code or a public workflow.

Install and connect

pip install sealgraf-composio

Set COMPOSIO_API_KEY as well as SEALGRAF_API_KEY. This uses Composio’s local-toolkit interface.

from composio import Composio
from sealgraf_composio import build_toolkit

composio = Composio()
session = composio.create(
    user_id="your-user-id",
    experimental={"local_toolkits": [build_toolkit(composio)]},
)
tools = session.tools()

Follow the purchase lifecycle

  1. Check the proposed purchase before using your own payment channel. A check can allow, deny, or require human approval.
  2. If approval is required, stop and notify the owner. Resume only after the owner has decided; read the original check's status and collect its decision token once authorized. Do not poll in a tight loop.
  3. A denial means no purchase. Approval thresholds do not override the mandate's hard limits.
  4. After a successful purchase, report its actual charged amount, the original preauthorization and decision token, and a stable completion nonce. Preserve these exact arguments if the response is lost.
  5. Read the sealed receipt. This integration reports a charge; it does not independently verify the payment.

Keep request identities stable when retrying. A lost check response is an unknown outcome: recover the original decision or stop. Never create a fresh decision to authorize a payment that already happened. If authorization expires after payment, preserve the original decision and payment evidence and surface the unsealed outcome.

What a receipt proves

A sealed receipt preserves the completion report and decision evidence. The amount supplied through these framework tools is reported by the caller, not independently verified against a payment rail. Public verification is masked: a stranger sees the kind of purchase, while the signed-in owner sees the amounts and details. Permission decisions, including denials, are recorded in decision history; they are not completed-purchase receipts.

Next steps