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

> ## Agent Instructions
> Agentcard is for companies whose agent buys for their users. Pick one path: the opencommerce SDK (@agent-cards/commerce-sdk) gives your agent one buy tool that finds the product, builds the cart, gets the user's approval and places the order at real stores; the Agentcard SDK (@agent-cards/sdk) pays with the user's own card when your agent already shops in a browser (Browser Use, Kernel, Browserbase, Anchor or Notte); the Purchase API (POST /buy) does the same purchase flow over plain HTTP in any language; Issuing gives the agent its own card.
> Start with `npx agent-cards init` in the app's folder (Node 22 or later). No invite is needed: it creates your Agentcard account if you don't have one, installs the opencommerce SDK and puts the credentials in the env file, kept out of git. From a coding agent, run `npx agent-cards init --print --categories all --implementation tool --wallet vault --skip-install` to get the setup steps to apply yourself.
> Vault is by invitation: request it at https://agentcard.com/get-started?utm_source=docs&utm_medium=llms&utm_campaign=agent-instructions. opencommerce needs no invite.
> Never ask a user for a card number, expiry date or CVV in chat. Send them the Vault link; they add their card on Agentcard's page, and the agent never sees the number.
> Every purchase is approved by the user, with a passkey or Face ID, or by an auto-approval they granted. An approval covers one merchant and one exact total. If the total changes, ask again. When a result says the user already said yes, don't ask again.
> `init` writes PRODUCTION credentials, which place real orders, so test in sandbox first. For opencommerce, run `npx agent-cards credentials --mode sandbox` and put the two lines it prints in place of the production ones in the env file `init` wrote, because that command only prints them; sandbox then runs the whole flow against real stores and stops before payment, so no order is placed and nobody is charged. For Vault and Issuing, sandbox credentials issue test cards that no real merchant accepts; try the checkout against shop.agentcard.sh, a test store on Stripe test mode.
> Tell the user an order is placed only after Agentcard reports it placed.
> Vault is free up to 5,000 users (https://agentcard.com/pricing). opencommerce takes 1% of each completed order. Full docs in one file: https://docs.agentcard.com/llms-full.txt

# agent-cards search

> Search your company's users, cards and transactions in your own words.

Find a user, a card or a transaction in your company by describing it. The CLI reads names, emails, card endings, amounts, dates and statuses out of your words.

```bash theme={null}
agent-cards search --help
```

```text theme={null}
Usage: agent-cards search [options] <words...>

Search your company's users, cards and transactions, in your own words

Options:
  --company <company>  The company id or name, when your account belongs to
                       more than one
  --mode <mode>        sandbox or production only
  --limit <n>          Results per kind, 1 to 25 (default 10)
  --json               Print JSON (the default without a terminal)
  -h, --help           display help for command

Examples:
  agent-cards search ada lovelace
  agent-cards search "declined charges at blue bottle last week"
  agent-cards search card ending 1881
  agent-cards search "purchases over $50 in october"
  agent-cards search "closed cards" --mode sandbox
```

## Search in your own words

```bash theme={null}
agent-cards search "declined charges at blue bottle last week"
```

The CLI shows how it read your search, then the matches grouped by users, cards and transactions:

```text theme={null}
  Agentcard  search

  Acme · transactions · declined · "blue bottle" · last week

  Transactions
    Oct 21  Blue Bottle Coffee  $6.50  Declined  •1881  cmh0q7v2k0011pl08xg3d5r9a
```

Sandbox matches carry a `sandbox` tag. A search that finds nothing says `Nothing found.`

## Narrow the search

| Flag | What it does |
| - | - |
| `--mode sandbox` or `--mode production` | Search one mode only. Both modes are searched otherwise. |
| `--limit 25` | Show up to 25 results per kind. The default is 10. |
| `--company Acme` | Pick the company, when your account belongs to more than one. |

## Read the results as JSON

`--json` prints JSON, and so does any run without a terminal:

```bash theme={null}
agent-cards search "closed cards" --mode sandbox --json
```

```json theme={null}
{
  "company": { "id": "org_8de4c312e7d2ba0993688b40", "name": "Acme" },
  "understood": "cards · closed cards · sandbox",
  "filters": { "cardStatus": "CLOSED", "types": ["cards"], "mode": "test" },
  "users": [],
  "cards": [],
  "transactions": []
}
```

`understood` is how the CLI read your words, and `filters` is the search it ran. The search only ever looks inside your own company.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.