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

# Quickstart

> Integrate AgentWallex in under 5 minutes — create an agent wallet and send your first payment.

## Prerequisites

* Node.js 18+ or Python 3.9+
* An AgentWallex API key (`awx_...`) — [sign up for early access](https://agentwallex.com)
* Basic understanding of blockchain transactions

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @agentwallex/sdk
  ```

  ```bash yarn theme={null}
  yarn add @agentwallex/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @agentwallex/sdk
  ```

  ```bash pip theme={null}
  pip install agentwallex
  ```
</CodeGroup>

## Step-by-Step Integration

<Steps>
  <Step title="Initialize the client">
    Create an AgentWallex client with your API key. Use `sandbox` for testing and `production` for mainnet.

    <CodeGroup>
      ```typescript TypeScript theme={null}
      import { AgentWallex } from "@agentwallex/sdk";

      const aw = new AgentWallex({
        apiKey: process.env.AGENTWALLEX_API_KEY!,
        environment: "sandbox", // use "production" for mainnet
      });
      ```

      ```python Python theme={null}
      from agentwallex import AgentWallex

      aw = AgentWallex(
          api_key=os.environ["AGENTWALLEX_API_KEY"],
          environment="sandbox",  # use "production" for mainnet
      )
      ```
    </CodeGroup>
  </Step>

  <Step title="Create an agent wallet">
    Each agent gets its own MPC-secured wallet with configurable policies.

    <CodeGroup>
      ```typescript TypeScript theme={null}
      const agent = await aw.agents.create({
        name: "my-trading-agent",
        chain: "eip155:84532",
        policies: {
          maxTransactionAmount: "100",   // USDC
          dailyLimit: "1000",
          allowedAddresses: ["0x..."],
        },
      });

      console.log(`Agent ID: ${agent.id}`);
      console.log(`Wallet: ${agent.wallet.address}`);
      ```

      ```python Python theme={null}
      agent = await aw.agents.create(
          name="my-trading-agent",
          chain="eip155:84532",
          policies={
              "max_transaction_amount": "100",
              "daily_limit": "1000",
              "allowed_addresses": ["0x..."],
          },
      )

      print(f"Agent ID: {agent.id}")
      print(f"Wallet: {agent.wallet.address}")
      ```
    </CodeGroup>
  </Step>

  <Step title="Fund the wallet">
    Send testnet tokens to your agent's wallet address. On Base Sepolia, you can use a [faucet](https://www.coinbase.com/faucets/base-ethereum-goerli-faucet) to get test USDC.

    <Note>
      In sandbox mode, your agent wallet is on a testnet. No real funds are at risk.
    </Note>
  </Step>

  <Step title="Send a payment">
    Execute an on-chain payment through the agent.

    <CodeGroup>
      ```typescript TypeScript theme={null}
      const tx = await aw.payments.send({
        agentId: agent.id,
        to: "0xRecipientAddress",
        amount: "10.00",
        token: "USDC",
      });

      console.log(`Transaction hash: ${tx.hash}`);
      console.log(`Status: ${tx.status}`); // "confirmed"
      ```

      ```python Python theme={null}
      tx = await aw.payments.send(
          agent_id=agent.id,
          to="0xRecipientAddress",
          amount="10.00",
          token="USDC",
      )

      print(f"Transaction hash: {tx.hash}")
      print(f"Status: {tx.status}")  # "confirmed"
      ```
    </CodeGroup>
  </Step>
</Steps>

## What Happens Under the Hood

1. **Policy Check** — The policy engine validates the transaction against your agent's rules (spending limits, address whitelist, velocity controls).
2. **MPC Signing** — The transaction is signed using 2-of-3 threshold MPC. No single party ever holds the full key.
3. **Broadcast** — The signed transaction is submitted to the network.
4. **Confirmation** — AgentWallex monitors and confirms the transaction, then delivers a webhook event.

## Next Steps

<CardGroup cols={2}>
  <Card title="TypeScript SDK" icon="js" href="/sdks/typescript">
    Full SDK reference with all methods and types.
  </Card>

  <Card title="REST API" icon="code" href="/api-reference/overview">
    HTTP endpoints for custom integrations.
  </Card>

  <Card title="x402 Micropayments" icon="credit-card" href="/features/x402-micropayments">
    Enable pay-per-API-call for your agents.
  </Card>

  <Card title="Policy Engine" icon="shield-check" href="/features/policy-engine">
    Configure spending controls and security rules.
  </Card>
</CardGroup>
