# Agentic Commerce

Doma exposes its commerce primitives (buy, sell, register, configure) as **AI-native records** that any LLM agent can discover and execute. The discovery layer is [AgentRoot](https://agentroot.io), an open DNS-based protocol; the execution layer is the [Doma CLI](/agentic-commerce/doma-cli.md). This section covers how the stack fits together.

## The three-step model

<figure><img src="/files/A6LjN9lQXnpGegoaxrnP" alt="Three-step model: install Doma skills via AgentRoot once, prompt the agent in English for every operation, the skill drives the Doma CLI and wallet automatically."><figcaption></figcaption></figure>

[AgentRoot](/agentic-commerce/agentroot.md) is a general-purpose discovery protocol; any domain can publish capabilities through it. This section walks through the **Doma case**: the user installs Doma's skills via AgentRoot once, then talks to the agent in English to run operations on Doma. The same three steps apply to any AgentRoot-published capability at any domain.

1. **Install Doma's skills via AgentRoot (one time).** The user asks the agent to install the skills published at `doma.xyz`: e.g. *"Use AgentRoot to install the trade-tokens skill from doma.xyz"*, or *"install all doma.xyz skills"*. The agent's AgentRoot MCP resolves `doma.xyz`, fetches the matching `SKILL.md` files, and drops them into the agent's skills folder. From this point on, the skills are part of the agent's runtime context (portable across Claude Code, Cursor, Codex CLI, Gemini, OpenCode).
2. **Prompt the agent in plain English (every operation).** With the skills installed, prompts like *"buy 10 USDC of `<token>` on Doma testnet"* or *"register `mydomain.io` via MPP"* match against the installed skills' trigger phrases. The user does not pick which skill runs; the agent matches the prompt.
3. **The skill drives the Doma CLI and the wallet.** The matched skill orchestrates everything below the prompt: it calls [Doma CLI](/agentic-commerce/doma-cli.md) commands, triggers the [agentic wallet](/agentic-commerce/agentic-wallet.md) browser sign-in the first time a signature is needed, surfaces confirmations, and reports results. **The user doesn't type any `doma <command>` lines.**

## Protocol stack

<figure><img src="/files/H1cO1qpQ5aJMRGp1qvqC" alt="Protocol stack with two phases. ONE-TIME SETUP via AgentRoot: user prompt resolves _agentroot.doma.xyz through DNS, fetches the zone file, installs SKILL.md files into the agent&#x27;s skills folder. EVERY OPERATION via the installed skill: user prompt is matched to an installed skill, the skill orchestrates Doma CLI commands, the wallet signs (agentic wallet or local private key), and on-chain settlement happens on Doma, Ethereum, or Base."><figcaption></figcaption></figure>

## Prerequisites

You configure the toolchain once. After that, you talk to your agent in plain English; the skill drives the CLI, the wallet, and the on-chain calls. You don't have to remember any `doma …` commands.

* **Node.js ≥ 20.** Required for both `agent-root` (the AgentRoot CLI) and `@doma-protocol/cli`.
* **An AI agent that can load `SKILL.md` or MCP tools.** Claude Code, Claude Desktop, Cursor, Codex CLI, Gemini CLI, or OpenCode.
* **Install the Doma CLI:** `npm install -g @doma-protocol/cli` (one time).
* **Pick a wallet path:**
  * **Agentic wallet (recommended).** Nothing to configure up front. The first time a skill needs a signature, it triggers `doma auth login` for you. You click **Authorize** in the resulting browser tab once, and Privy is your signer from then on. No key on your machine. Spend cap enforced server-side. Revocable any time.
  * **Local private key.** `export DOMA_PRIVATE_KEY=0x…` once. The skill uses that key for every signature. Faster setup, no browser dance, but the key sits on disk and the wallet has unbounded spend authority. Use a dedicated test wallet.

{% hint style="info" %}
The `doma <command>` lines that appear in the [Doma CLI](/agentic-commerce/doma-cli.md) reference are what the **skill** runs on your behalf. As a user you don't need to memorize or type them. They're documented so you understand what's happening under the hood and so you can use the CLI directly if you want.
{% endhint %}

## Where to go next

* **New to AgentRoot?** Start with [AgentRoot → Protocol Overview](/agentic-commerce/agentroot.md). The protocol's home is [agentroot.io](https://agentroot.io).
* **Want to install a Doma skill in your agent?** Jump to [Discover & Use Skills](/agentic-commerce/agentroot/discover-and-use.md).
* **Ready to run transactions?** Install the [Doma CLI](/agentic-commerce/doma-cli.md) and pick a [wallet mode](/agentic-commerce/doma-cli/wallet-modes.md).
* **Building your own AgentRoot zone?** See [Publish Your Own](/agentic-commerce/agentroot/publish-your-own.md).
* **Want a worked example?** Read the [Skills](/agentic-commerce/skills.md) reference pages for `secondary-sales`, `trade-tokens`, and `MPP`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.doma.xyz/agentic-commerce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
