Quickstart
From zero to a funded agent
in four steps.
This page is the whole getting-started path. Full API reference, self-hosting notes, and the policy language spec live in the repository.
npm i @moneolabs/wallet @moneolabs/guard @moneolabs/tradingNode 20 or newer. TypeScript types ship with the package.
There is no API key and no account to create. The SDKs are libraries that run in your own process: policy is evaluated locally, and the signer and rail are objects you supply. What you connect them to is the part that has credentials, not Moneo.
import { createGuard } from "@moneolabs/guard"; // What this agent may do with money. Plain data, versioned,// and checked before anything is signed.const guard = createGuard({ perTransaction: { max: "$25" }, rolling24h: { max: "$100" }, counterparties: "allowlist-only", allow: ["x402:*"], escalate: { above: "$50" },}); guard.policy.version; // "pol_60577c02cc"Step 3 is the only part that touches your agent framework. Everything else is plain server code, and all of it runs offline.
Reference
The surface, in full.
@moneolabs/walletOverview
createWallet(opts)Issue an account bound to one agent identity
wallet.balance(asset?)What the rail holds for this wallet
wallet.available(asset?)Balance minus anything the guard has reserved
wallet.pay(req)Pay an address, invoice, or x402 endpoint
wallet.preflight(req)Ask whether a payment would pass, without making it
wallet.fund(amount)Move budget in, when the rail can credit
wallet.sweep(opts)Return idle balance above a floor
localSigner() / remoteSigner()Hold the key locally, or in a TEE, MPC, or KMS
memoryRail(opts)Reference rail: a real double-entry ledger, in memory
toolkit(wallet, opts)Tool definitions plus handlers for your agent host
@moneolabs/guardOverview
createGuard(policy, opts)Compile a policy and bind it to a ledger and clock
guard.check(intent)Evaluate an intent: allow, hold, or block
guard.wrap(fn, map)Put an existing spending function behind policy
guard.usage(opts?)What is left of each budget and velocity window
guard.history(query?)Read verdicts with reasons and policy versions
guard.resolve(id, out)Answer a held decision
guard.update(policy)Swap the policy; later decisions record the new version
simulate(policy, events)Replay a policy against past activity, touching nothing
memoryLedger(seed?)Default store; implement DecisionLedger for your own
@moneolabs/tradingOverview
createTrading(opts)Bind venues, a quote asset, and the guard
trading.quote(req)Best route across every venue that can trade the pair
trading.quoteAll(req)Every route, best first
trading.execute(q, o)Submit market, limit, TWAP, or bracket
order.settled()Await a terminal state: filled, partial, rejected, cancelled
trading.positions()Open positions with mark and unrealized P&L
trading.close(asset, o)Exit with the same guarantees as entry
simulatedVenue(opts)Reference venue: deterministic, driven by a price table
Everything else is in the repo.
Policy language spec, attestation verification, self-hosting the guard, and the MCP server definition.
github.com/moneolabs/moneo