Skip to main content

What does whoami do?

The whoami command reads your local credentials and displays the current agent’s configuration. Use it to verify that login worked, check which agent is active, or confirm the wallet address before running transactions.
npx @mandate.md/cli whoami

Output

{
  "agentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "evmAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "chainId": 84532,
  "keyPrefix": "mndt_test_abc12...xyz",
  "baseUrl": "https://app.mandate.md"
}
FieldDescription
agentIdUnique agent identifier
evmAddressWallet address (or “not set” if activate has not been called)
chainIdTarget chain ID (default: 84532, Base Sepolia)
keyPrefixMasked runtime key showing the prefix (mndt_test_ or mndt_live_)
baseUrlMandate API endpoint this agent connects to
The keyPrefix tells you whether you are using a test or live key. Test keys start with mndt_test_, live keys with mndt_live_.
Run whoami after login to confirm credentials saved correctly, and after activate to confirm the wallet address was set.

Next Steps

Validate a Transaction

Run a policy check against your active agent.

Register a New Agent

Switch agents by registering a new one.