> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enact.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get your AI agent paying for services in under 5 minutes.

## Prerequisites

* Node.js 18+
* A browser with passkey support (Chrome, Safari, Firefox)

## Run init

```bash theme={null}
npx enact-wallet init
```

This guides you through three steps:

<Steps>
  <Step title="Create your wallet">
    Opens your browser and registers a passkey. Your key is derived from the passkey inside your device's secure enclave — never stored in plaintext anywhere.
  </Step>

  <Step title="Fund your wallet">
    Send stablecoins (USDC.e, pathUSD) to your wallet address. The CLI displays your address and polls your balance until funds arrive.
  </Step>

  <Step title="Create an agent session">
    Prompts for a spending limit and expiry, then opens your browser for passkey approval of the on-chain authorization.
  </Step>
</Steps>

When complete, a `.env` file is written to your project:

```bash theme={null}
AGENT_PRIVATE_KEY=0x...
AGENT_ROOT_ADDRESS=0x...
AGENT_ACCESS_KEY_ADDRESS=0x...
AGENT_RPC_URL=https://rpc.moderato.tempo.xyz
AGENT_CHAIN_ID=42431
AGENT_BUDGET_USD=100
```

<Info>
  `AGENT_PRIVATE_KEY` is an **access key** — not your root wallet. It has a hard spending limit enforced on-chain. Your root wallet is secured by your passkey and never exposed.
</Info>

## Make your first paid request

```bash theme={null}
npx enact-wallet pay '<url>'
```

Enact handles the 402 Payment Required flow automatically.

Preview the cost before paying:

```bash theme={null}
npx enact-wallet pay --dry-run '<url>'
```

## Check your balance and session

```bash theme={null}
npx enact-wallet balance    # token balances for your root wallet
npx enact-wallet session    # session info + remaining spending limit
```

## Use in your agent code

Once `.env` is set, integrate with `mppx`:

```ts theme={null}
import { Mppx, tempo } from "mppx/client";
import { Account } from "viem/tempo";

const account = Account.fromSecp256k1(process.env.AGENT_PRIVATE_KEY, {
  access: process.env.AGENT_ROOT_ADDRESS,
});

const mppx = Mppx.create({
  methods: [tempo({ account })],
});

// fetch now handles 402 automatically
const response = await mppx.fetch("https://api.example.com/resource");
```

## Next steps

<CardGroup cols={2}>
  <Card title="MCP Integration" icon="plug" href="/mcp">
    Connect to Claude Desktop, Cursor, or OpenClaw
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/cli/overview">
    All available commands and flags
  </Card>
</CardGroup>
