Getting Started
OAW ships as @oaw/core — a runnable, tested TypeScript SDK. You can try it with zero
install on Node 22, or consume it as a normal npm package.
Prerequisites
- Node.js 22.6+ (native TypeScript type-stripping + built-in test runner)
- pnpm (optional, for the full build/typecheck)
Run it (zero install)
git clone https://github.com/Abelhubprog/open-agent-wallet.git
cd open-agent-wallet
# 61 tests, no dependencies needed
node --test --experimental-strip-types --no-warnings "test/**/*.test.ts"
# the north-star demo: bind → fund → trade, all from chat
node --experimental-strip-types examples/north-star.ts
Build & install as a package
@oaw/core compiles to dist/ (JS + .d.ts); consuming it does not require
--experimental-strip-types.
pnpm install # also builds dist/ via the prepare script
pnpm build # tsc → dist/index.js + dist/index.d.ts
pnpm check # typecheck + tests + build
npm pack --dry-run # inspect the publishable tarball (dist + src only)
Use it
import { createOAW, PrivyProvider, PolymarketAdapter } from "@oaw/core";
const oaw = createOAW({
primaryProvider: new PrivyProvider({
ensureAgentWallet: async ({ userId }) => myPrivy.createOrLoadAgentWallet(userId),
getDepositAddresses: async (i) => myPrivy.depositAddresses(i), // fund from any chain
}),
config: { venueFundingExecuteEnabled: false, liveExecutionVenues: new Set() }, // fail-closed
});
oaw.registerVenue(new PolymarketAdapter());
// "Bind Polymarket, fund it with $50, buy YES"
const intent = await oaw.intent.classify(userMessage); // reasoning, not keywords
if (intent?.capability === "bind" && intent.isAction)
await oaw.venues.bind(user, intent.venue!, {}, { allowAutoCreate: true }); // Mode A auto-created
const plan = await oaw.funding.resolve({ user, venue: "polymarket", amountUsd: 50 });
const res = await oaw.venues.execute(user, "polymarket",
{ kind: "trade", side: "YES", market, amountUsd: 50 }, { execute: confirmed });
// agent_authority-aware · policy/funding/live-flag gated · receipted · the brain held no keys
Where to next
- Agent authority — Modes A/B and the decisive Virtuals question
- Venue binding — the universal pre-bind gate
- Cross-chain funding — deposit anywhere, fund the venue
- Execution & safety —
agent_authority+ gating - Capability status — what's reference vs production-ready
Two consumption models
The zero-install path (--experimental-strip-types over src/) is great for trying
OAW. The built package (dist/ + types) is how you ship it into a real project.