Skip to content

Get Address Action

This simple action returns the public blockchain address of the agent’s smart account.

The LLM invokes this tool when asked:

  • “What is your wallet address?”
  • “Where can I send you some USDC?”
  • “Show me your public key.”

There are no arguments for this action.

import { AgentKit, GetAddressAction } from "@0xgasless/agent-sdk";
const agentKit = new AgentKit({ apiKey: "YOUR_API_KEY" });
const action = new GetAddressAction();
const address = await action.invoke(agentKit, {});
console.log(address); // "0xYourAgentSmartAccountAddress"

This action simply calls client.smartAccountAddress. If the instance was initialized with an existing OxGasClient instance from an embedded wallet user, it returns that user’s smart account address.