Link a payment guardrail (LangChain middleware) from the "Managing Risk" section
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 30/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- documentation
Direzione di ricerca
The request is to add a link to a third-party LangChain guardrail package from the "Managing Risk" section introduced in #1433; the payload does not name the file holding that section, so locate it there first. Check the linked PyPI and GitHub pages to confirm what the package does. Whether the link belongs in the docs is a maintainer decision, so ask in the thread before editing. Done means the link is merged with a one-line description, or the maintainers decline it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Language Implementation
- Python
- TypeScript
Feature Type
- Action Provider Template
- Wallet Provider Template
- Framework Extension
- Core Requirements
- Other
🚀 The feature, motivation and pitch
The new "Managing Risk" section (#1433) notes that AgentKit does not gate transfers behind human approval, enforce spend caps, or allowlist destinations, and points developers to LangChain middleware as one mitigation.
I've published an open-source package that does exactly that for AgentKit tools: langchain-sra-riskgate (Apache-2.0).
- PyPI: https://pypi.org/project/langchain-sra-riskgate/
- Repo: https://github.com/sriram1983007-dev/langchain-sra-riskgate
It intercepts ERC20ActionProvider_transfer, ERC20ActionProvider_approve, WalletActionProvider_native_transfer, x402ActionProvider_retry_with_x402 and x402ActionProvider_make_http_request_with_x402 before they execute, outside the model's control, and returns approve / hold / reject:
- per-payment limit and a session budget (stops an agent splitting one large payment into many small ones)
- recipient allowlist / blocklist, address validation, self-transfer check
- USDC-only by default (native and other tokens are held unless opted in)
- x402 one-step requests held unless the host is allowlisted
- fails closed: any error means hold, never approve
It works two ways:
SRARiskGateMiddlewarefor LangChain 1.xcreate_agentguard_tools(get_langchain_tools(agentkit), ...)forcoinbase-agentkit-langchain, which is on LangChain 0.3
CI runs it against the real coinbase-agentkit 0.7.4 + coinbase-agentkit-langchain 0.7.0 tools, and checks that a held payment never reaches the wallet provider.
Alternatives
A dedicated action provider (e.g. a "risk-gated transfer" action) was considered, but a hijacked agent can simply call the ungated transfer action instead. Intercepting at the tool-call layer covers every fund-moving action regardless of what the model chooses.
Additional context
Optional: after the rules approve a payment, the gate can also ask a small open model (SRA-RiskGate-4B, https://huggingface.co/sriram1983007/SRA-RiskGate-4B) via any OpenAI-compatible endpoint. It is off by default and can only make a decision stricter, never looser.
- Lingua principale
- TypeScript
- Stelle
- 1.3k
- Fork
- 871
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coinbase/agentkit
-
Moonwell redeem fails on Base Sepolia and uses 18 decimals for cbBTCForse già presa @sebxt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
ERC20 transfer reports "Transferred" when the transaction reverts (receipt status ignored)Forse già presa @AgenticFinanceGraph l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
coinbase/agentkit#1558 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
coinbase/agentkit#1532 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
coinbase-agentkit 0.7.x fails on fresh install: imports solana.rpc.api, which solana>=0.37 removedForse già presa @JulienKervarrec l’ha presa 27 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
x402 action provider: optional beforePayment hook to approve or block a paymentForse già presa @snefhew l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 1-2 giorni Idoneità per principianti 55/100
coinbase/agentkit#1576 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di coinbase/agentkit
Issue simili
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
mobile-next/mobile-mcp#526 ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 73/100
redhat-developer/rhdh-plugin-export-overlays#4470 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno