Skip to content

feat(agentkit): add Agent Guild trust and payment safety provider - #1446

Open
AgentTanuki wants to merge 15 commits into
coinbase:mainfrom
AgentTanuki:codex/agent-guild-provider
Open

feat(agentkit): add Agent Guild trust and payment safety provider#1446
AgentTanuki wants to merge 15 commits into
coinbase:mainfrom
AgentTanuki:codex/agent-guild-provider

Conversation

@AgentTanuki

@AgentTanuki AgentTanuki commented Aug 14, 2026

Copy link
Copy Markdown

Description

Adds a TypeScript agentGuildActionProvider that lets AgentKit agents run a free endpoint preflight before delegation, then optionally quote and purchase Agent Guild trust and payment-safety decisions before delegation or payment.

The provider exposes five explicit actions:

  • preflight_agent_endpoint — free, read-only, and uses no wallet, Agent Guild account, API key, signer, or payment client
  • quote_agent_trust and purchase_agent_trust
  • quote_payment_safety and purchase_payment_safety

Safety properties:

  • The preflight action performs one ordinary GET for an exact public A2A or MCP endpoint. It never pays, signs, registers, writes, installs, delegates, or follows links returned by the service.
  • Preflight output is explicitly treated as untrusted point-in-time evidence: callers must report failed and unknown checks, and a clean result is not an endorsement or authorization to delegate.
  • Quote actions never pay.
  • Purchase actions require the exact prior x402 v2 option plus confirmPayment: true.
  • The live 402 is re-fetched and must still match the selected scheme, Base mainnet network, Base USDC asset, amount, payee, timeout, extra fields, and exact resource URL before a payment payload can be created.
  • The provider uses the official @x402/fetch and @x402/evm client paths with both a registered payment policy and a final pre-signing hook.
  • maxPaymentUsdc is a hard per-request ceiling and defaults to 0.01 USDC.
  • An overridden Agent Guild base URL is quote-only unless the developer explicitly enables payments to it; the model cannot change either constructor option.
  • Post-signing transport failures report settlement as unknown rather than claiming no payment occurred.

The default hosted service requires no Agent Guild account or API key. The provider currently supports Base mainnet EVM wallet configurations; the free preflight itself does not access the wallet.

Tests

  • Full @coinbase/agentkit test suite: 62 suites, 876 tests, 0 failures.
  • Scoped TypeScript typecheck, ESLint, and Prettier checks passed.
  • The free-action test proves the exact URL and headers, paid: false, and that neither the payment wrapper nor wallet signer is invoked.
  • Provider tests cover quote-only behavior, exact request bodies, wrong-token and over-cap filtering, hard-cap enforcement, direct-call confirmation enforcement, custom-root quote-only behavior, live-quote drift and resource-drift aborts, Base-only support, and honest unknown settlement reporting.
  • The official @x402/fetch interoperability test creates a test-only EIP-3009 payload entirely offline, checks the exact accepted/resource fields, and parses a mock settlement receipt. It uses no funds and makes no payment.
  • A live direct-action quote-only check against Agent Guild returned payment_required, paid: false, 10,000 atomic units of Base mainnet USDC, and the exact treasury payee. It created no signature and made no payment.

No model-backed chatbot test was run because no model API key is available in this environment. No live paid test was run; no funds were used.

Checklist

  • Added documentation to all relevant README.md files
  • Added a changelog entry
  • All commits are GitHub-verified

@cb-heimdall

cb-heimdall commented Aug 14, 2026

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Aug 14, 2026
@AgentTanuki
AgentTanuki marked this pull request as ready for review August 14, 2026 20:30
@AgentTanuki
AgentTanuki force-pushed the codex/agent-guild-provider branch from 504efda to c633364 Compare August 16, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

2 participants