Skip to content

feat: add Agentum action provider (x402-paid counterparty compliance checks) - #1629

Open
Algiras wants to merge 1 commit into
coinbase:mainfrom
Algiras:feat/agentum-action-provider
Open

Algiras wants to merge 1 commit into
coinbase:mainfrom
Algiras:feat/agentum-action-provider

Conversation

@Algiras

@Algiras Algiras commented Nov 7, 2026

Copy link
Copy Markdown

Description

Adds an agentum action provider (typescript/agentkit/src/action-providers/agentum/) with seven actions for counterparty checks an agent needs before it pays or onboards someone:

Action Purpose Price (USDC)
resolve_entity Company name / number / domain to official registry record (name, status, LEI) 0.005
verify_eu_vat EU VAT number against live VIES 0.005
screen_sanctions Company or person against OFAC, EU, UN, UK FCDO lists 0.005
check_vendor Registry + VAT + sanctions in one call, with a verdict 0.010
verify_bank_payee IBAN format, MOD-97 checksum, country match 0.003
batch_resolve 1 to 25 companies per call 0.025
screen_address Wallet address against OFAC's listed digital-currency addresses 0.002

Why it fits AgentKit: the service is paid per call with x402 (USDC on Base, exact scheme, EIP-3009), signed by the agent's own AgentKit wallet. No API key or account is needed, and the first 5 calls per day per caller IP are free. It follows the same wallet-signs-x402 pattern as the existing x402 provider, but with a fixed, known endpoint instead of arbitrary URLs.

Design choices a reviewer may want to check:

  • No new dependencies. It uses @x402/fetch, @x402/evm (registerExactEvmScheme), zod and viem (tests only), which @coinbase/agentkit already depends on. PaymentRequirements and decodePaymentResponseHeader are imported from @x402/fetch, which re-exports them.
  • Spend cap. maxPriceUsd (default 0.03) is enforced in an onBeforePaymentCreation hook, so a server asking for more than the cap is refused before anything is signed. Covered by a test.
  • Fixed host. Only the configured baseUrl (default https://agentum.asimplek.cloud) is contacted.
  • Network. supportsNetwork is base-mainnet only, because that is where the server settles.
  • Errors are returned as strings (Error calling Agentum <action>: ...), consistent with other providers.
  • Honest limits (also in the README): screen_address is an exact match against the official OFAC list, not behavioural or cluster risk, and UNKNOWN is not CLEAR; some companies in some countries are not resolved.
  • Tool results include text from public registries, so they are third-party text like any other external data (see the Managing Risk section of the root README). The README of the provider says so.

Disclosure: I operate the Agentum service, and this PR was prepared with Claude Code (AI assistance). Source of the same provider as a standalone package: https://github.com/Algiras/agentum-skills/tree/main/packages/agentum-agentkit (npm agentum-agentkit). Service docs: https://agentum.asimplek.cloud/llms.txt and https://agentum.asimplek.cloud/openapi.json.

Also touched: typescript/agentkit/README.md (provider table, alphabetical, as requested in earlier provider reviews), src/action-providers/index.ts (export), and a changeset.

Tests

Automated, run from a clean clone of main @ f2f3e8c with pnpm install --frozen-lockfile:

pnpm exec tsc --noEmit                      # no errors
pnpm exec eslint "src/action-providers/agentum/**/*.ts"   # no issues
pnpm run format:check                       # all files use Prettier code style
pnpm test                                   # 63 suites, 927 tests passed (23 new in agentumActionProvider.test.ts)

The new tests use the real x402Client and wrapFetchWithPayment with a mocked fetch: they feed a real x402 v2 PAYMENT-REQUIRED 402 response, check that an EIP-3009 authorization signed by the wallet's signer is sent in PAYMENT-SIGNATURE for the exact amount, that the PAYMENT-RESPONSE receipt is attached, and that a price above maxPriceUsd aborts before signing.

Not run end to end with an LLM chatbot: I did not have an LLM key and CDP keys wired up for typescript/examples/langchain-cdp-chatbot when opening this, so there is no chatbot transcript. A reviewer can reproduce it without funds: add agentumActionProvider() to the example's actionProviders and ask it to "screen the wallet address 0x... against OFAC sanctions" or "check vendor Siemens AG in Germany, VAT DE129274202". The first 5 calls per day per caller IP are free, so no USDC is needed. I will add a real transcript to this PR when I have one.

Checklist

A couple of things to include in your PR for completeness:

  • Added documentation to all relevant README.md files
  • Added a changelog entry

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Nov 7, 2026
@Algiras
Algiras marked this pull request as ready for review November 7, 2026 11:53
@Algiras
Algiras requested a review from murrlincoln as a code owner November 7, 2026 11:53

This branch has not been deployed

No deployments
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.

1 participant