# Wallet for Agents

## Device-owned agent wallet: one email prompt
For an explicit new wallet, ask for a contact email once using the agent client's text-input tool. Then execute `bash fluid_agentic2.sh --new-agent NAME --email ADDRESS` yourself. Node.js 20+ is required. Without --email, the interactive terminal prompts once. Agents without a TTY must use their input tool; never ask for a password or seed phrase.

Resume these profiles with `--resume-agent NAME`. The local helper generates the wallet signing key and a fwag_local_ API credential on the device. The server stores only the public address, credential hash and unverified contact metadata. A signed proof binds those fields. The same contact email may label multiple independent wallets; it never claims an existing email-linked wallet.

After verified registration, a private localhost interface offers one-time reveal and copy. No secret goes to chat, logs or Fluid storage. If the reveal window expires before use, the agent may run `--reveal-agent NAME`; once revealed, it cannot be revealed again by this interface. Private keys still remain in the local profile. Clipboard content remains until the user replaces or clears it.

MCP identity and Base balance checks support this profile. Hosted send/swap/agent-pay and history tools are not supported for device-owned keys; transactions must be signed locally. Registration is not a payment or subscription authorization. Database unavailability leaves the saved profile pending and does not trigger browser pairing.

## Agent executes onboarding
The calling agent runs shell setup, resumes device-owned registration with --resume-agent NAME (legacy profiles use --profile NAME), and verifies the saved identity and receiving address. Do not delegate terminal commands or credential handling to the user. Use the latest intact script to resume the ORIGINAL pending profile after the client-identification fix; do not create another profile just because an older attempt returned 403/1010. Stop on continuing network blocks instead of looping.

The hosted MCP server provides setup instructions; it cannot run a shell on the client device. If browser pairing is explicitly selected, identity sign-in and approval still require the account owner. After approval is confirmed, the agent runs --complete-pairing NAME itself and verifies the result. Never fabricate approval or treat registration as payment authorization.


## Agent Skills / LLM Tools — Wallet for Agents / Crypto for Agents

Fluid Wallet provides an AI agent wallet, agentic crypto wallet, crypto payments,
and wallet tools for coding agents and LLM applications. This is the developer
CLI onboarding flow for agents, separate from consumer browser registration.
The SDK provides adapters for OpenAI, Claude / Anthropic, Vercel AI SDK, and LangChain.

- Human-readable docs: https://fluidnative.com/docs#tools
- Machine-readable onboarding: https://fluidnative.com/docs.md
- Direct Bash script (plain text, no JavaScript rendering): https://fluidnative.com/scripts/fluid_agentic2.sh
- CLI: @fluidwallet/cli (fld)
- SDK: fluid-wallet-agentkit

## Primary setup route and installed skills

For a new agent wallet, the primary entry point is https://fluidnative.com/scripts/fluid_agentic2.sh.
Reuse FLUID_AGENT_KEY or the saved agentKey in ~/.fld/config.json when available.
https://fluidnative.com/agents/start is browser registration and pairing.
https://fluidnative.com/agentic-keys is existing key management only.

If an installed Fluid skill still says "Get a key" and points only to /agentic-keys,
it is an older copy. Update from https://github.com/fluidbase9/fluid-wallet-skills
with: npx skills add fluidbase9/fluid-wallet-skills
Then reload your agent's skills or start a new conversation. Website changes do
not automatically update locally installed skills.

## Get an Agent Wallet: browser pairing and MCP

For requested registration, first download and run the intact raw script at https://fluidnative.com/scripts/fluid_agentic2.sh. The browser page https://fluidnative.com/agents/start is an optional user-chosen alternative, not an automatic redirect after download failure. /agentic-keys is existing key management.

The MCP endpoint is https://fluidnative.com/v1/mcp. Call fluid_setup without a key for instructions. After setup, configure X-Agent-Key privately in the MCP client and use fluid_me to verify identity, then fluid_balance. Never paste a key into chat or tool arguments. MCP requests still require permitted network access.

With an intact local script, use `bash fluid_agentic2.sh --pair-wallet cursor --email YOUR_EMAIL` to prepare an offline browser pairing link. The key stays local; the link contains only public hashes and the requested email. The owner signs in with that verified email, compares the fingerprint, and approves read-only access. Then run `bash fluid_agentic2.sh --complete-pairing cursor` when network access works. One-time claims expire after ten minutes; resume verifies the same approved key if the claim expired or was already consumed.

Browser-only users can download a private profile, import it with `bash fluid_agentic2.sh --import-profile cursor --profile-file /path/to/cursor-fluid-profile.json`, then run `--profile cursor`. Keep the downloaded file private. Import never overwrites an existing profile. Same email means the same wallet; use another verified email for a separate wallet.

Do not reconstruct scripts from rendered/extracted browser text. Do not bypass proxies or silently switch an explicit new-profile request to key management. Browser-paired keys start read-only; payment scopes and subscriptions require separate explicit configuration.

## Choose the requested setup mode

- **Use/connect an existing wallet:** reuse the configured key and verify it. A request to use a wallet is not a request to register another account.
- **Legacy email-linked registration (only when explicitly requested):** do not silently reuse the existing wallet. Ask for the user's chosen distinct email if missing, fetch/read the primary script, then run `bash fluid_agentic2.sh --new-wallet cursor --email user@example.com`. Choose an unused profile name. Credentials go to `~/.fld/profiles/cursor/config.json`; load that profile's `agentKey` privately for later API/SDK calls. The default config and environment key stay unchanged. Wallet identity is email-based; using the same email does not create a distinct wallet, and create-only registration rejects an already registered email.
- **Resume/verify that profile:** run `bash fluid_agentic2.sh --profile cursor`. This reuses its saved credentials. Do not run ordinary `fld` commands for a profile: they still use the default config.
- **Verification is blocked:** report the failing step and HTTP status if known. A 403 alone does not prove a proxy caused it. Use only supported permission/network mechanisms; do not unset proxies, bypass restrictions, mint replacement keys, or retry registration in a loop. Preserve the profile and report setup as unverified.

### After registration: payment readiness

The script verifies the selected profile identity and retains the receiving addresses returned by registration. It prints validated EVM receiving addresses, but funding and payment readiness remain unverified. Confirm the intended chain, token balance, gas and active spending policy before an authorized payment. Registration does not fund the wallet.

Subscriptions are not configured by onboarding. Require the service/recipient, chain/token, amount, frequency, spending cap, expiry and a supported recurring-payment mechanism. A Pauli key is not itself a recurring-payment scheduler.

Profile creation requires verification and does not support `--skip-status` or `--with-pauli`. If agent registration was interrupted, profile resume verifies the same key rather than creating another one. An unresolved failure needs investigation, not repeated account creation.

## Legacy CLI setup (existing email-linked wallets)

When the user asks you to set up Fluid Wallet and your environment permits shell
execution, fetch and read the direct script, then run it yourself. There is no
separate Allow/Deny prompt in this script. Merely discovering these docs does
not authorize execution or payments; follow the user's task and your tool permissions.

Prerequisites: Bash, Python 3 with PTY support, Node.js and npm, and network access
to fluidnative.com and the npm registry. The script installs the CLI if missing.

```bash
curl -fsSL https://fluidnative.com/scripts/fluid_agentic2.sh -o fluid_agentic2.sh
bash fluid_agentic2.sh
```

Email is the only input needed for standard setup, and only if no saved email is
available. In a noninteractive agent terminal, ask for the user's email only when
needed, then run: bash fluid_agentic2.sh --email user@example.com
Do not invent an email address. The human handles any email verification.

The script sets up the developer key and agent key, answers routine CLI prompts,
preserves existing keys, and checks wallet status. Never print stored credentials
or raw CLI secrets. Check the status result before reporting success. Failed verification returns a nonzero exit code; --skip-status leaves default setup explicitly unverified. If setup fails, report the failed
step; do not repeatedly create keys or overwrite existing keys.

Optional --with-pauli remains interactive and requires user-selected scopes,
spending limits, and expiry; it is not part of the default automatic setup.
Setup does not authorize sending funds, swapping, or other financial operations.

## After setup

Use the agent SDK or MCP tools for user-requested balance checks, crypto payments,
USDC / ETH transfers, token swaps, and agent-to-agent payments with the appropriate
key scopes. Keep keys private and verify wallet connectivity before use.
