Parent
Part of #41 — design-only precursor to a scoped skill PR. Research matrix and v1 recommendation: #41 (comment) (approved direction by @rosspeili).
Goal
Ship a thin Skillware skill for spend-capped / short-lived agent payment sessions that settle x402 HTTP 402 challenges using a dedicated CDP / AgentKit-style funded wallet — not classic virtual-card PANs in v1.
Working skill ID (open to rename): finance/agent_pay or finance/ephemeral_wallet with description clarified to agent payment session, not card Issuing.
Non-goals (v1)
- Stripe Issuing / Privacy.com-class PAN minting (optional later adapter)
- Stripe MPP as primary rail (fiat adapter later)
- AP2 mandates as primary backend (compose in v2)
- Depending on
@asgcard/pay (TS reference only)
- Live chain / live facilitator in CI
Proposed actions
| Action |
Purpose |
create_session |
Create session metadata: spend_cap_usd, ttl_seconds, optional allowlist; bind to configured agent wallet |
status |
Session remaining cap, expiry, last payment / receipt refs (no secrets) |
pay |
Given a URL (or 402 challenge payload): follow x402 flow (402 → sign/settle → retry); enforce session cap + TTL |
revoke |
Expire session immediately (fail closed on further pay) |
Optional later: quote (inspect 402 without settling).
Env / config (draft)
- Dedicated agent wallet secrets only in
.env (e.g. CDP / private key env names TBD after CDP+x402 SDK pass) — never in tool args or YAML
- Optional: facilitator URL (default public x402 facilitator), network (
base-sepolia for demo)
config.yaml.example: default cap, TTL, network — gitignored real config
Constitution (draft)
- Dedicated agent wallet only — never personal/treasury keys
- Never return private keys, seed phrases, or full PANs/CVVs in tool output
- Fail closed on missing env, over-cap, expired session, or unverifiable settlement
- Not financial advice; on-chain results may differ from quotes
- Redact secrets in logs / agent_hint; instructions teach agents not to echo secrets
Provider interface
Keep a small internal provider boundary so v1 is x402+CDP but later adapters (MPP, Issuing) can plug in without rewriting the action router.
Tests
- Mocked HTTP 402 → payment header → 200 path
- Cap exceeded / TTL expired → structured error
- Missing wallet env →
missing_config (agent-friendly), not bare traceback
- No live Base / facilitator in CI
Acceptance for design sign-off
Implementation plan (after sign-off)
- PR1: bundle skeleton — manifest, instructions, constitution, mocked
create_session / status / revoke, stub or mocked pay
- PR2: real x402 client path behind mocks + optional demo script (
EVM_TX_HANDLER-style demo flag)
Assignee
@Hendobox — continuing from #41 research spike.
Parent
Part of #41 — design-only precursor to a scoped skill PR. Research matrix and v1 recommendation: #41 (comment) (approved direction by @rosspeili).
Goal
Ship a thin Skillware skill for spend-capped / short-lived agent payment sessions that settle x402 HTTP 402 challenges using a dedicated CDP / AgentKit-style funded wallet — not classic virtual-card PANs in v1.
Working skill ID (open to rename):
finance/agent_payorfinance/ephemeral_walletwith description clarified to agent payment session, not card Issuing.Non-goals (v1)
@asgcard/pay(TS reference only)Proposed actions
create_sessionspend_cap_usd,ttl_seconds, optional allowlist; bind to configured agent walletstatuspayrevokepay)Optional later:
quote(inspect 402 without settling).Env / config (draft)
.env(e.g. CDP / private key env names TBD after CDP+x402 SDK pass) — never in tool args or YAMLbase-sepoliafor demo)config.yaml.example: default cap, TTL, network — gitignored real configConstitution (draft)
Provider interface
Keep a small internal provider boundary so v1 is x402+CDP but later adapters (MPP, Issuing) can plug in without rewriting the action router.
Tests
missing_config(agent-friendly), not bare tracebackAcceptance for design sign-off
finance/…)Implementation plan (after sign-off)
create_session/status/revoke, stub or mockedpayEVM_TX_HANDLER-style demo flag)Assignee
@Hendobox — continuing from #41 research spike.