Quick start
kawasekit moves agents from a settled JPYC payment on Polygon Amoy in under ten minutes, using only a ZeroDev project, an owner private key, and the public Polygon Amoy faucet for JPYC.
This walkthrough gets you to a working setup. The deeper examples (agent paywall, observability) build on the same primitives.
Prerequisites
- Node 22+
- pnpm 11+
- A burner Ethereum private key — use a fresh one for testnet, never an owner key that holds real funds
- A ZeroDev project ID
- Polygon Amoy POL from the official faucet
- Polygon Amoy JPYC from the JPYC faucet
Steps
-
Clone the repository
Terminal window git clone https://github.com/k0yote/kawasekitcd kawasekitpnpm installpnpm --filter kawasekit build -
Scaffold a
.envTerminal window pnpm cli initcp .env.example .envOpen
.envand fill inOWNER_PRIVATE_KEY(the burner key) andZERODEV_PROJECT_ID. -
Compute the smart-account address
Terminal window pnpm cli account create --chain polygonAmoyYou will see something like:
Chain: Polygon Amoy testnet (80002)Owner (EOA): 0x2f5eb6A1...Smart account address: 0xdbe30607...The smart account is a counterfactual address at this point — it exists deterministically based on your owner key but has not been deployed on-chain. The first UserOp deploys it via the paymaster.
-
Fund the smart account
Send Polygon Amoy JPYC to the smart account address from step 3:
You only need 1 JPYC for the rest of this tutorial.
-
Issue a session key
The session key is what an agent holds. The owner controls revocation; the session key is bounded by an on-chain daily-limit policy.
Terminal window pnpm cli session-key issue \--chain polygonAmoy \--ephemeral-session \--max-per-tx 1 \--max-per-day 10 \--output envelope.json--ephemeral-sessiongenerates a fresh session-key private key for this run. The key is printed at the end of the command — save it now, it is not stored to disk. -
Transfer JPYC via the smart account
The owner can transfer JPYC directly through the smart account (the session-key path lives in the agent example):
Terminal window pnpm cli transfer \--chain polygonAmoy \--amount 0.001The output prints the bundler tx hash and a Polygonscan link. Open it to see your first kawasekit-driven JPYC transfer settle on Polygon Amoy.
What just happened
kawasekit cli account createderived a Kernel v3.1 smart account counterfactually from your owner key. No on-chain action yet.kawasekit cli session-key issuebuilt a session-key envelope — a portable JSON document the agent will use to restore the smart-account client without ever seeing the owner key.kawasekit cli transferbroadcast a sponsored UserOp that callsJPYC.transfer()from the smart account. The paymaster (ZeroDev) paid POL for gas.
The same primitives compose into:
- An x402 paywall — see Agent paywall.
- Observability — wire
kawasekit/observability/prometheusto any kawasekit surface and the dashboards fill in. See Observability.
Next steps
- Try the agent paywall example — an agent that pays for a weather API call-by-call.
- Read the CLI reference for the full command surface.
- Read the threat model before you take this to mainnet.
Going to mainnet
Every command that touches a network takes --chain polygonAmoy (testnet)
or --chain polygon (mainnet). Mainnet broadcasts additionally require
KAWASEKIT_ALLOW_MAINNET=1 in the environment. Set this only when you
intend to spend real JPYC + real POL. Plan to start with a 0.001 JPYC
gradual rollout before scaling.
The v0.1.0 release notes will record the first mainnet broadcast tx URLs for traceability.