Skip to content
View phamdat721101's full-sized avatar

Block or report phamdat721101

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please donโ€™t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
phamdat721101/README.md

Pham Nim ๐Ÿ‘‹

Open-Source Builder โ€” AI Agents ร— Web3 Payments

GitHub X Substack npm n-payment

I build the reliability + payment layer for AI agents โ€” open-source SDKs, skills, and MCP servers that let any agent pay, get paid, and ship correct output, across every chain and every model.


๐Ÿงญ What I do

I'm an open-source contributor shipping the plumbing that AI agents need to act autonomously in the real economy:

  • ๐Ÿ’ณ Payments โ€” one SDK call, any chain, any protocol โ†’ n-payment
  • ๐Ÿ›ก๏ธ Reliability โ€” a harness that forces agents to verify output before shipping โ†’ nim-skill
  • ๐Ÿงฉ Skills & MCP โ€” installable, host-portable packages any agent can pick up in one command โ†’ payment-skill ยท brain-skill
  • ๐ŸŒ Consumer surfaces โ€” turning any web3 dApp into something an agent can browse and pay for โ†’ HyperMove

All MIT-licensed. All shipped, not slideware โ€” see proof-of-work below.


๐Ÿ—๏ธ Product lineup

๐Ÿ’ฐ n-payment โ€” chain-agnostic agentic payments

One fetchWithPayment(url) call. Any chain, any protocol, any stablecoin. The SDK auto-detects the 402 Payment Required challenge, signs the right payment, and retries โ€” your agent's code never branches on chain.

  • ๐Ÿ”— 27+ chains across 11 chain families (EVM, XRPL, Stellar, Solana, Cosmos, Sui, Tron, TON, Bitcoin L2s, Spark, Filecoin, NEAR) via one CAIP-2 multichain wallet
  • ๐Ÿ“ก Protocol coverage: x402, MPP, GOAT x402, XRPL native, Stellar Sessions, Cosmos MsgSend, Soroban payment channels, on-chain transferWithAuthorization, NTT bridge-as-payment
  • ๐Ÿช Sell, not just buy โ€” createPaywall, paidTool, and a spec-compliant paid MCP server turn any HTTP handler into an agent-payable endpoint in <20 lines
  • ๐Ÿ›ก๏ธ Policy by default โ€” per-tx / per-hour / per-day spend caps, rate limits, facilitator allowlists, on-disk audit log
  • ๐Ÿ“ˆ Yield-bearing treasury โ€” idle agent funds auto-supply to lending markets while the agent sleeps
  • ๐Ÿชช AP2 verifiable intent โ€” cryptographic proof a payment was authorized by a specific user mandate
npm install n-payment
const client = createPaymentClient({ chains: ['base-mainnet'], ows: { wallet: 'my-agent' } });
const res = await client.fetchWithPayment('https://api.example.com/data'); // 402 handled, signed, retried

๐Ÿ”— github.com/phamdat721101/n-payment ยท npmjs.com/package/n-payment


๐Ÿ›ก๏ธ nim-skill โ€” the harness your agent runs inside

"The agent harness is the architecture โ€” the model is not the bottleneck."

An open, local-first, host-portable toolkit that wraps any agent task so it's verified before it ships, recovers from errors, and costs less โ€” without rewriting the agent into a framework.

runHarnessed(skill, input, ctx)
โ‘  guard        โ†’ cost cap ยท rate limit ยท agentjacking defense
โ‘ก context      โ†’ per-run token budget + progressive disclosure ("see")
โ‘ข errorHandler โ†’ classify โ†’ retry / backoff / circuit-breaker / fallback ("recover")
โ‘ฃ enforcer     โ†’ verify output before ship โ€” unbypassable ("enforce")
โ‘ค cache        โ†’ provider-agnostic prompt caching, 45โ€“80% input-cost cut ("save")
โ‘ฅ monitor      โ†’ trace every run: tokens, cost, latency, verify pass/fail
  • โœ… 9 installable primitives shipped and tested (173 tests passing)
  • ๐Ÿงฎ nim-profile auto-detects model tier and tightens (never loosens) reliability for weaker open-weight models
  • ๐Ÿ“‰ nim-index measures the standing token-tax of your MCP/skill tool list before it silently eats your context window
  • ๐Ÿ  Works in any host: Claude Code, Cursor, Kiro, Hermes, OpenClaw, any MCP client โ€” offline by default
npx github:phamdat721101/nim-skill install

๐Ÿ”— github.com/phamdat721101/nim-skill


๐Ÿงฉ payment-skill โ€” one install, 42 tools, 7 hosts

A single self-installing package that turns any AI host into an economic actor โ€” plain English in, signed on-chain transaction out.

  • ๐ŸŽฏ 42 tools โ€” pay any URL, monetize an endpoint, discover services in the bazaar, earn yield, cash out to fiat via MoneyGram (174 countries), bridge across chains, register on-chain identity, generate universal QR payment links
  • ๐Ÿ–ฅ๏ธ One skill, 7 hosts โ€” Claude Code, Kiro, Cursor, Windsurf, Continue, Gemini CLI, Copilot โ€” same 42 tools, zero per-host glue
  • ๐Ÿ” One wallet, every chain โ€” a single encrypted keyfile (Web3 Secret Storage v3) derives keypairs across EVM, XRPL, Stellar, Solana, Cosmos, BTC-L2
npx -y github:phamdat721101/payment-skill

๐Ÿ”— github.com/phamdat721101/payment-skill


๐Ÿš€ HyperMove โ€” make any dApp agent-callable

Paste one URL. Any AI agent can now discover it, hit a paywall, sign, and get a 200 OK โ€” the homepage is the demo.

  • ๐Ÿ•ธ๏ธ Implements WebMCP (.well-known/webmcp.json) so agents discover paid endpoints without custom integration
  • ๐Ÿ’ต Wired to n-payment for the actual x402-USDC settlement โ€” 5-minute monetization for any existing web3 dApp
  • ๐Ÿงฑ MIT, open-source, self-hostable โ€” no vendor lock-in

๐Ÿ”— hypermove.xyz ยท Build log: How HyperMove Turns Any AI Agent Into a Web3 Power-User


๐Ÿง  brain-skill โ€” long-term memory for agents

Portable, queryable memory so an agent's context survives past a single session โ€” the missing layer between "stateless chatbot" and "actual assistant."

๐Ÿ”— github.com/phamdat721101/brain-skill


๐Ÿ›๏ธ OpenX โ€” the AI-agent marketplace

Publish an agent once with one natural-language prompt (~30 seconds, no wizard, no chain-picker, no seed phrase) and it inherits the full web3 stack: payments, identity, and โ€” going further โ€” a full training pipeline so a published agent doesn't stop at "form filled," it graduates with real skills.

๐Ÿ”— Build log series: OpenX ships one-prompt agent onboarding โ†’ Your agent just enrolled in a web3 university โ†’ From "publish an agent" to "train an agent team"


๐Ÿค– Multi-model experience โ€” I don't build for one model

Every product above is engineered to be model-agnostic by design, not bolted on. Here's the real provider matrix shipped in production code:

Layer Providers wired Where
๐Ÿง  Direct API Anthropic Claude (Sonnet/Haiku/Opus family), OpenAI GPT-4o HyperMove live-agent demo, OpenX agent runtime
โ˜๏ธ Amazon Bedrock (Converse API) Anthropic Claude, Amazon Nova, Meta Llama, Mistral, Cohere โ€” one schema, swap via env var OpenX chat + agent orchestration, provider-cascading fallback (Bedrock โ†’ OpenAI on failure)
๐ŸŒ Open-weight & regional models GLM (Zhipu), MiniMax, Qwen (Alibaba), DeepSeek, Gemini, Kimi (Moonshot AI) nim-cache's provider-agnostic caching layer + nim-profile's reliability-tier detection
๐Ÿงฎ Model-tier awareness Auto-tightens guardrails for weaker open-weight models (e.g. GLM-5, MiniMax-M3) โ€” never loosens for frontier models nim-profile

๐ŸŒ™ On Kimi specifically โ€” Moonshot AI's Kimi K2 โ†’ K2 Thinking โ†’ K2.5 โ†’ K2.6 โ†’ K3 (2.8T-parameter, 1M-token context, world's first open 3T-class model, weights shipping Jul 27 2026) is one of the fastest-moving open-weight lines in the market. Kimi ships an OpenAI-compatible API, so it drops into the same implicit-prefix cache path nim-cache already uses for OpenAI/GLM/DeepSeek โ€” one base-URL swap, no adapter rewrite. I track every Kimi release as a target model for nim-profile's reliability-tier work: a 2.8T open model with agentic coding + tool-use at this level is exactly the kind of "verify, don't just trust" case the harness exists for.

Why this matters: most agent tooling is written against one lab's API and breaks the moment you swap models. My stack treats the model as a pluggable adapter โ€” the harness, the payment logic, and the caching strategy all stay correct whether you're running Opus, Nova Micro, GLM-5, Kimi K3, or DeepSeek behind it.


โšก Skill, SDK & MCP philosophy โ€” optimize for cost, not just capability

I build three layers that compose, not compete:

  1. ๐Ÿงฉ Skills (payment-skill, nim-skill) โ€” the thinnest possible install (npx github:...) that gives any host new tools in one command, with zero per-host rewrite
  2. ๐Ÿ“ฆ SDK (n-payment) โ€” the typed, testable core logic every skill/MCP server calls into โ€” one API surface, many entry points
  3. ๐Ÿ”Œ MCP servers (n-payment/mcp, nim-skill's host bridge) โ€” spec-compliant endpoints any MCP client (Claude Desktop, Cursor, AWS Bedrock AgentCore) can discover and pay over out of the box

The saving-cost angle is explicit engineering, not marketing:

  • ๐Ÿ’ธ Prompt caching, provider-agnostic โ€” nim-cache gets the 45โ€“80% input-cost cut available on modern APIs, correctly, across 7 different cache mechanics (explicit inline, resource-ref, implicit-prefix) โ€” changelog
  • ๐Ÿ“ Token-tax visibility โ€” nim-index tells you what your standing tool list costs before it silently eats your context window
  • ๐Ÿชซ Sub-cent settlement โ€” off-chain vouchers + Soroban payment channels in n-payment so agent-to-agent micropayments don't get eaten by gas
  • ๐ŸŽฏ Cheapest-model-first defaults โ€” Amazon Nova Micro as the Bedrock default (~$0.035/$0.14 per 1M tokens), swap up only when a task needs it

๐Ÿ“š Recent proof-of-work (Substack build logs)

Every post below ships with working code the same day. Full archive โ†’ phamnim.substack.com

Date Post
Jul 16 ๐Ÿ› ๏ธ Combine Nim-Skill + HyperMove โ€” a web3 builder workspace in 15 minutes
Jul 14 ๐Ÿ›ก๏ธ How to set up an AI workspace that forces agents to do the task correctly
Jul 12 ๐Ÿš€ How HyperMove turns any AI agent into a web3 power-user
Jul 6 ๐ŸŒ Agent payment rails on Stellar with MoneyGram โ€” cash out in 174 countries
Jul 5 ๐ŸŽ“ From "publish an agent" to "train an agent team"
Jun 27 ๐Ÿš€ HyperMove ร— WebMCP ร— n-payment โ€” agent-callable dApps in 5 minutes
Jun 21 ๐Ÿ’ธ Shipping an x402 RLUSD service on XRPL testnet with payment-skill + n-payment
Jun 20 ๐Ÿช™ Pay anywhere with RLUSD โ€” one SDK, five EVM chains + XRPL native
Jun 8 ๐Ÿช™ Pay any iUSD-paywalled API โ€” payment-skill ร— Initia ร— x402
Jun 3 ๐Ÿ›ฐ๏ธ Zero-crypto-setup: pay for a residential proxy in $SPACE on Creditcoin

๐ŸŒ Connect

X Substack GitHub

Open-source, chain-agnostic, model-agnostic โ€” building the plumbing so agents can transact.

GitHub Stats

GitHub Streak

Pinned Loading

  1. defi-service defi-service Public

    TypeScript 1 1