<!--
Sitemap:
- [Newton Agent NeoBank](/index)
- [Getting Started](/getting-started)
- [Onboard an Agent](/guides/onboard-an-agent)
- [Give an Agent a Budget](/guides/agent-budget)
- [Pay for an API](/guides/pay-for-an-api)
- [Issue a Card](/guides/issue-a-card)
- [Meter Your API](/guides/meter-your-api)
- [SDK Essentials](/reference/sdk)
- [ModularVault](/reference/sdk/modular-vault)
- [PlatformClient](/reference/sdk/platform-client)
- [FacilitatorClient](/reference/sdk/facilitator-client)
- [createX402Fetch](/reference/sdk/create-x402-fetch)
- [buildPolicyParams](/reference/sdk/build-policy-params)
- [Networks & Addresses](/reference/networks)
-->

# Getting Started

Install the SDK, connect to a vault, and make an agent pay — within the budget you set.

## Install

```bash
pnpm add @newton-xyz/isaac
```

Newton Agent NeoBank works with Node 20+ and runs on Base Sepolia while in preview.

## Connect to a vault

A vault holds funds for a fleet of agents. Connect to the shared demo vault and read its balance — no setup required:

```typescript
import { ModularVault } from "@newton-xyz/isaac";
import { generatePrivateKey } from "viem/accounts";

const vault = ModularVault.connect({
  rpcUrl: "https://sepolia.base.org",
  vaultAddress: "0xa51BA69e3A9553Bd079E15b71122DA3B4E54EF01", // demo vault
  operatorKey: generatePrivateKey(), // reads don't spend; a throwaway key is fine
});

const balance = await vault.getBalance("0x8cfff8Bc9aA3d41fb9608496705CbfC83EBFc67c");
console.log("vault balance:", balance);
```

## Make an agent pay

When an agent hits an endpoint that charges for access, the SDK answers the payment automatically — as long as it stays within the agent's policy:

```typescript
import { createX402Fetch } from "@newton-xyz/isaac";

const fetch402 = createX402Fetch({
  agentKey: process.env.AGENT_KEY!,
  rpcUrl: process.env.RPC_URL!,
});

const result = await fetch402("https://api.example.com/data", {
  method: "GET",
  maxPayment: "1000000", // never pay more than 1 USDC
});

if (result.success) {
  const data = await result.response.json();
  console.log("paid in tx", result.txHash);
}
```

If the request would exceed the agent's daily limit or pay a recipient you haven't allowed, it's declined before any money moves — you stay in control.

## Next

* **[Give an Agent a Budget](/guides/agent-budget)** — set an agent's daily limit and allowlist.
* **[Pay for an API](/guides/pay-for-an-api)** — the full agent-payment flow.

More guides — issuing a card and metering your own API — are on the way.
