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

# GOAT & Metis Agent

> Attach the GOAT & Metis identity to give your agent a wallet, an ERC-8004 identity, and x402 payments on GOAT Network

The **GOAT & Metis Agent** identity gives your agent an on-chain wallet, an
ERC-8004 on-chain identity, and x402 payments on GOAT Network — by bundling three
skills that auto-install when the agent is created.

## Add the skills to your agent

Open your agent, click **Install Identity**, and choose **GOAT & Metis Agent** —
its three skills install onto that agent. (You install a curated identity, not
individual skills.)

| Skill                 | What it adds                                                 |
| --------------------- | ------------------------------------------------------------ |
| Privy Wallet          | create & manage a policy-guarded on-chain server wallet      |
| ERC-8004 Registration | register the agent's on-chain identity + reputation          |
| x402 Merchant         | accept x402 payments — receiving addresses, API keys, orders |

You don't set the identity up yourself — a node admin provisions it once (see
[Admin: provisioning](#admin-provisioning) at the bottom). The rest of this guide
covers what the agent can then do.

## How the install works

These are **external-source slugs**, installed without a ClawHub registry:

* `github.com/owner/repo[/subpath]` → `npx degit` downloads the repo (or just the
  `.claude/skills/<name>` subdirectory) as a tarball into
  `~/.openclaw/workspace/skills/<name>`.
* `https://host/path/skill.md` → the runtime fetches the single `SKILL.md` and
  writes it under a folder named after its `name:` frontmatter (e.g. Privy's
  `https://agents.privy.io/skill.md` → `skills/privy-agent-onboarding/`).

No `git` binary is required (uses `npx`/`node`, already present). Registry slugs
(no `github.com/` or `https://` prefix) still go through `clawhub install` /
`hermes skills install` as before.

## Credentials (required to transact — Phase 2)

Skills install with **no credentials**. The agent only signs/calls once these are
present in the runtime's `openclaw.json` → `env.vars`:

| Var                                                       | Used by       | Purpose                                     |
| --------------------------------------------------------- | ------------- | ------------------------------------------- |
| `PRIVY_APP_ID`, `PRIVY_APP_SECRET`                        | Privy skill   | create / manage the wallet                  |
| `GOAT_PRIVATE_KEY` *(or the Privy wallet — see "Signer")* | erc8004, x402 | sign on-chain transactions                  |
| `GOAT_NETWORK`                                            | erc8004, x402 | `goat-testnet3` (default) or `goat-mainnet` |
| `GOAT_RPC_URL`                                            | erc8004, x402 | RPC endpoint (defaults below)               |

> ClawUp injects the model key + channel tokens into runtimes today, but there is
> **no path yet to inject these custom vars** — that's the Phase-2 work (a managed
> wallet provisioner, or a bring-your-own-creds field). Until then, set them by
> editing the runtime's `openclaw.json` directly.

### Signer: who holds the key?

Privy **custodies** the wallet key, but the GOAT skills sign with a raw
`GOAT_PRIVATE_KEY` (`cast` / `node src/contract.js`). Pick one:

* **(A) Privy is the single wallet** — erc8004/x402 signing routes through Privy's
  signing API. Best custody/policy; needs a small adapter so the GOAT skills sign
  via Privy instead of a raw key.
* **(B) Separate raw key** — give the GOAT skills their own `GOAT_PRIVATE_KEY`;
  Privy is a second wallet. Simplest; two wallets.

## Using the identity: wallet → ERC-8004 → x402

The skills are *instructions the agent runs*. Once the credentials above are in
place, prompt the agent (chat) to perform each step, in order:

1. **Generate the wallet** — *Privy skill*. e.g. "set up my Privy wallet." Runs
   the Privy CLI onboarding and provisions a **server wallet**.
2. **Fund it** — testnet first: GOAT Testnet3 faucet
   `0x89e7dfd01a86e5393ce6d8A78c9aa6653Ee113A6`. (The Privy skill can also fund.)
3. **Register the ERC-8004 identity** — *erc8004-register skill*. e.g. "register my
   agent identity with URI `<agent_uri>`." Calls `register(string)` on the Identity
   Registry, signed by the wallet (\~156k gas).
4. **Onboard as an x402 merchant** — *x402-merchant-onboard skill*. e.g. "onboard me
   as an x402 merchant." Sequence: register merchant → **admin approval + fee-balance
   top-up** → login → configure receiving address per token → generate API keys
   (HMAC-SHA256).

## Walkthrough: provision the Privy wallet from chat

Step 1 above — "Generate the wallet" — end to end. The Privy skill
([`agents.privy.io/skill.md`](https://agents.privy.io/skill.md), from Privy's
[agent-CLI recipe](https://docs.privy.io/recipes/agent-integrations/agent-cli#for-agents))
runs entirely through chat. The screenshots below use Telegram.

> **Use any LLM model you like.** The setup is model-agnostic — the agent reads
> the skill and runs the same steps regardless of which model drives it. The
> screenshots happen to use `openrouter/openai/gpt-5.3-codex`, but Claude,
> GPT-5.x, DeepSeek, or any tool-capable model works just as well. Pick it at
> create time under **Model Usage** — either **Use your own API key** (BYOK) or
> **Use ClawUp-managed models** (token credits).

### 1. Create the agent

Create an OpenClaw agent, choose your model under **Model Usage**, and pair a
channel (Telegram here) if you want to drive it from your phone.

<img src="https://mintcdn.com/rb-059391b6/O0R64n01xM89Gb6J/src/images/privy/01-create-agent.png?fit=max&auto=format&n=O0R64n01xM89Gb6J&q=85&s=15ad8153046f3f9cc052b38039f70c2d" alt="Create agent — pick any model under Model Usage" width="995" height="1424" data-path="src/images/privy/01-create-agent.png" />

### 2. Install the Privy skill

In chat, point the agent at the Privy skill:

```
Set up https://agents.privy.io/skill.md
```

The agent installs the skill, then replies with a **device code** and a login
link (`https://agents.privy.io?user_code=…`), and waits for your approval in the
background.

<img src="https://mintcdn.com/rb-059391b6/O0R64n01xM89Gb6J/src/images/privy/02-install-privy-skill.png?fit=max&auto=format&n=O0R64n01xM89Gb6J&q=85&s=6370455d49e0290a9cf4569998712706" alt="Agent installs the Privy skill and returns a device code + login link" width="1530" height="451" data-path="src/images/privy/02-install-privy-skill.png" />

### 3. Log in & authorize

Open the link, log in to Privy, and **Approve agent access** — this grants the
agent's wallet CLI permission to **sign** and **send** transactions. Once you
approve, the agent finishes setup and confirms the wallet addresses.

<img src="https://mintcdn.com/rb-059391b6/O0R64n01xM89Gb6J/src/images/privy/03-login-authorize.png?fit=max&auto=format&n=O0R64n01xM89Gb6J&q=85&s=d2814b65e3db627ed5a64838ec6b80ea" alt="Privy &#x22;Approve agent access&#x22; — sign + send transactions" width="2306" height="1310" data-path="src/images/privy/03-login-authorize.png" />

> Because this login is interactive (device code → browser approval), the Privy
> wallet works **today** with no `PRIVY_APP_*` env vars to inject — you authorize
> in the browser instead of editing `openclaw.json`.

### 4. Send a transaction

The agent can now transact in natural language. Fund the wallet first (a testnet
faucet, or the **Add funds** button in the Privy sandbox), then:

```
Send 0.01 ETH to 0x234641C89538c7e9fc4539C12f0dd8E8D7c6b264 on Ethereum Sepolia
```

The agent submits through Privy's RPC and returns the tx hash and chain.

<img src="https://mintcdn.com/rb-059391b6/O0R64n01xM89Gb6J/src/images/privy/04-send-transaction.png?fit=max&auto=format&n=O0R64n01xM89Gb6J&q=85&s=28fd013915e94c35ea680e0bc99fc38b" alt="Agent submits the transaction and returns the tx hash" width="1541" height="672" data-path="src/images/privy/04-send-transaction.png" />

You can also fund your wallet via the  [GOAT Testnet Faucet](https://bridge.testnet3.goat.network/faucet) and [Metis Testnet Faucet](https://faucet.metis.io/), then test transfers on both networks:

```
Send 0.000008 BTC to 0x234641C89538c7e9fc4539C12f0dd8E8D7c6b264 on GOAT Testnet
```

```
Send 0.02 tMetis to 0x234641C89538c7e9fc4539C12f0dd8E8D7c6b264 on Metis Sepolia Testnet
```

And verify the transactions on the [GOAT Testnet Explorer](https://explorer.testnet3.goat.network/) and the [Metis Testnet Explorer](https://sepolia-explorer.metisdevops.link/) respectively.

With the wallet live, continue to ERC-8004 registration and x402 onboarding —
steps 3–4 of [Using the identity](#using-the-identity-wallet--erc-8004--x402).

## Network reference

|                              | Testnet3 (default)                           | Mainnet                                      |
| ---------------------------- | -------------------------------------------- | -------------------------------------------- |
| Chain ID                     | `48816`                                      | `2345`                                       |
| RPC                          | `https://rpc.testnet3.goat.network`          | `https://rpc.goat.network`                   |
| Explorer                     | `https://explorer.testnet3.goat.network`     | `https://explorer.goat.network`              |
| ERC-8004 Identity Registry   | `0x556089008Fc0a60cD09390Eca93477ca254A5522` | `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` |
| ERC-8004 Reputation Registry | `0xd9140951d8aE6E5F625a02F5908535e16e3af964` | `0x8004BAa17C55a88189AE136b182e5fdA19dE9b63` |
| USDC                         | `0x29d1ee93e9ecf6e50f309f498e40a6b42d352fa1` | `0x3022b87ac063DE95b1570F46f5e470F8B53112D8` |
| USDT                         | `0xdce0af57e8f2ce957b3838cd2a2f3f3677965dd3` | `0xE1AD845D93853fff44990aE0DcecD8575293681e` |

**Network support by skill:**

* **ERC-8004** — both **testnet3 and mainnet** (registries above).
* **x402** — both networks exist, but the hackathon skill **defaults to testnet3**:
  * **Mainnet** — production GoatX402 API `https://api.x402.goat.network`
    (multi-chain incl. GOAT mainnet `2345`).
  * **Testnet3** — per-instance `https://x402-api-<instance>.testnet3.goat.network`
    (portal `https://x402-merchant-<instance>.testnet3.goat.network`).
  * To run x402 on mainnet, set the skill's base URL to
    `https://api.x402.goat.network` and chain `2345`; otherwise the skill's
    hardcoded testnet endpoints keep it on testnet3. See
    [GOATNetwork/x402](https://github.com/GOATNetwork/x402) (`DEVELOPER_FAST.md`,
    `API.md`). (ClawUp's billing also uses `api.x402.goat.network` via
    `X402_API_URL`, but as ClawUp-the-merchant — separate from the agent.)

Start on testnet3; move to mainnet only after the wallet is funded and the user
approves. Network config + ERC-8004 / x402 flows are sourced from
[GOATNetwork/GOAT-Hackathon-2026](https://github.com/GOATNetwork/GOAT-Hackathon-2026)
and [GOATNetwork/x402](https://github.com/GOATNetwork/x402).

## Further reading

* [x402 on GOAT Network](https://x402.goat.network/) — the x402 payments portal and overview.
* [Privy agent-CLI recipe](https://docs.privy.io/recipes/agent-integrations/agent-cli#for-agents) — the wallet onboarding flow shown above.

## Admin: provisioning

For node admins only — end users just attach the identity (above). The identity
is data, created once in **Settings → Identities → Create New Identity** (or
edited later via the same screen, which does a full replace of the skill list
on save):

* **Slug** `GOAT Agent` · **Name** `GOAT & Metis Agent`
* **Description**: Give your agent an on-chain wallet, an ERC-8004 identity, and x402 payments on GOAT Network (and Metis-compatible EVM chains via Privy).
* Skills:

| Skill slug                                                                        | Name                  |
| --------------------------------------------------------------------------------- | --------------------- |
| `https://agents.privy.io/skill.md`                                                | Privy Wallet          |
| `github.com/GOATNetwork/GOAT-Hackathon-2026/.claude/skills/erc8004-register`      | ERC-8004 Registration |
| `github.com/GOATNetwork/GOAT-Hackathon-2026/.claude/skills/x402-merchant-onboard` | x402 Merchant         |

> **Note:** if an agent created with this identity is missing the Privy Wallet
> skill (only the two GOAT-Hackathon skills got installed), the identity's
> skill list in **Settings → Identities** is missing that row — re-add it (or
> re-save with all three skills present) and re-run **Install Identity** on
> the affected agent to pick it up.
