@@ -5,24 +5,25 @@ Complete reference for all environment variables used in Ampersend SDK examples.
55## Overview
66
77Examples support two modes:
8+
891 . ** Smart Account + Ampersend** (recommended) - With spend limits and monitoring
9102 . ** Standalone** - EOA + Naive mode for testing
1011
1112## Smart Account Mode (Recommended)
1213
1314### Required Variables
1415
15- | Variable | Description | Example |
16- | ----------| -------------| ---------|
17- | ` EXAMPLES_A2A_BUYER__SMART_ACCOUNT_ADDRESS ` | Agent's smart account address | ` 0x1234... ` |
16+ | Variable | Description | Example |
17+ | --------------------------------------------------- | ------------------------------------ | ----------- |
18+ | ` EXAMPLES_A2A_BUYER__SMART_ACCOUNT_ADDRESS ` | Agent's smart account address | ` 0x1234... ` |
1819| ` EXAMPLES_A2A_BUYER__SMART_ACCOUNT_KEY_PRIVATE_KEY ` | Session key (owner of smart account) | ` 0xabcd... ` |
1920
2021### Optional Variables
2122
22- | Variable | Description | Default |
23- | ----------| -------------| ---------|
24- | ` EXAMPLES_A2A_BUYER__AMPERSEND_API_URL ` | Ampersend API endpoint | ` https://api.staging.ampersend.ai ` |
25- | ` EXAMPLES_A2A_BUYER__USE_NAIVE_AUTHORIZER ` | Skip API checks | ` false ` |
23+ | Variable | Description | Default |
24+ | ------------------------------------------ | ---------------------- | ---------------------------------- |
25+ | ` EXAMPLES_A2A_BUYER__AMPERSEND_API_URL ` | Ampersend API endpoint | ` https://api.staging.ampersend.ai ` |
26+ | ` EXAMPLES_A2A_BUYER__USE_NAIVE_AUTHORIZER ` | Skip API checks | ` false ` |
2627
2728### Setup
2829
@@ -37,10 +38,10 @@ Examples support two modes:
3738
3839### Required Variables
3940
40- | Variable | Description | Example |
41- | ----------| -------------| ---------|
42- | ` EXAMPLES_A2A_BUYER__PRIVATE_KEY ` | EOA wallet private key | ` 0xabcd... ` |
43- | ` EXAMPLES_A2A_BUYER__USE_NAIVE_AUTHORIZER ` | Enable naive mode | ` true ` |
41+ | Variable | Description | Example |
42+ | ------------------------------------------ | ---------------------- | ----------- |
43+ | ` EXAMPLES_A2A_BUYER__PRIVATE_KEY ` | EOA wallet private key | ` 0xabcd... ` |
44+ | ` EXAMPLES_A2A_BUYER__USE_NAIVE_AUTHORIZER ` | Enable naive mode | ` true ` |
4445
4546### Setup
4647
@@ -57,33 +58,33 @@ All examples default to staging services (testnet, rate-limited).
5758
5859### A2A Service URLs
5960
60- | Variable | Staging (Default) | Production |
61- | ----------| -------------------| ------------|
61+ | Variable | Staging (Default) | Production |
62+ | -------------------------------------- | ------------------------------------------------ | ---------------------------------------- |
6263| ` EXAMPLES_A2A_BUYER__SELLER_AGENT_URL ` | ` https://subgraph-a2a.x402.staging.thegraph.com ` | ` https://subgraph-a2a.x402.thegraph.com ` |
6364
6465### Local Orchestrator URLs
6566
66- | Variable | Staging (Default) | Production |
67- | ----------| -------------------| ------------|
67+ | Variable | Staging (Default) | Production |
68+ | --------------------------------- | ------------------------------------------------ | ---------------------------------------- |
6869| ` EXAMPLES_A2A_BUYER__AGENT_URL_1 ` | ` https://subgraph-a2a.x402.staging.thegraph.com ` | ` https://subgraph-a2a.x402.thegraph.com ` |
69- | ` EXAMPLES_A2A_BUYER__AGENT_URL_2 ` | _ (optional)_ | _ (optional)_ |
70+ | ` EXAMPLES_A2A_BUYER__AGENT_URL_2 ` | _ (optional)_ | _ (optional)_ |
7071
7172### MCP Service URLs
7273
73- | Variable | Staging (Default) | Production |
74- | ----------| -------------------| ------------|
75- | ` EXAMPLE_BUYER__MCP__PROXY_URL ` | ` http://localhost:3000/mcp ` | ` http://localhost:3000/mcp ` |
74+ | Variable | Staging (Default) | Production |
75+ | --------------------------------------- | ------------------------------------------------ | ---------------------------------------- |
76+ | ` EXAMPLE_BUYER__MCP__PROXY_URL ` | ` http://localhost:3000/mcp ` | ` http://localhost:3000/mcp ` |
7677| ` EXAMPLE_BUYER__MCP__TARGET_SERVER_URL ` | ` https://subgraph-mcp.x402.staging.ampersend.ai ` | ` https://subgraph-mcp.x402.thegraph.com ` |
7778
7879### MCP Proxy Configuration
7980
80- | Variable | Description | Default |
81- | ----------| -------------| ---------|
82- | ` BUYER_SMART_ACCOUNT_ADDRESS ` | Smart account for proxy | _ (required)_ |
83- | ` BUYER_SMART_ACCOUNT_KEY_PRIVATE_KEY ` | Session key for proxy | _ (required)_ |
84- | ` BUYER_SMART_ACCOUNT_VALIDATOR_ADDRESS ` | Validator contract | ` 0x000000000013FDB5234E4E3162A810F54D9F7E98 ` |
85- | ` AMPERSEND_API_URL ` | Ampersend API for proxy | _ (required)_ |
86- | ` BUYER_PRIVATE_KEY ` | EOA private key (standalone) | _ (alternative)_ |
81+ | Variable | Description | Default |
82+ | --------------------------------------- | ---------------------------- | -------------------------------------------- |
83+ | ` BUYER_SMART_ACCOUNT_ADDRESS ` | Smart account for proxy | _ (required)_ |
84+ | ` BUYER_SMART_ACCOUNT_KEY_PRIVATE_KEY ` | Session key for proxy | _ (required)_ |
85+ | ` BUYER_SMART_ACCOUNT_VALIDATOR_ADDRESS ` | Validator contract | ` 0x000000000013FDB5234E4E3162A810F54D9F7E98 ` |
86+ | ` AMPERSEND_API_URL ` | Ampersend API for proxy | _ (required)_ |
87+ | ` BUYER_PRIVATE_KEY ` | EOA private key (standalone) | _ (alternative)_ |
8788
8889## Complete Configuration Examples
8990
@@ -164,6 +165,7 @@ export BUYER_PRIVATE_KEY=0x...
164165## Smart Account Configuration
165166
166167The validator address for Smart Accounts:
168+
167169```
1681700x000000000013FDB5234E4E3162A810F54D9F7E98
169171```
@@ -175,18 +177,21 @@ This is the same across staging and production.
175177### How do I know which mode I'm in?
176178
177179Check your environment variables:
180+
178181- If ` EXAMPLES_A2A_BUYER__SMART_ACCOUNT_ADDRESS ` is set → ** Smart Account mode**
179182- If only ` EXAMPLES_A2A_BUYER__PRIVATE_KEY ` is set → ** Standalone mode**
180183
181184### Can I mix variables from different modes?
182185
183186No. Choose one mode:
187+
184188- ** Smart Account** : Set ` SMART_ACCOUNT_ADDRESS ` + ` SMART_ACCOUNT_KEY_PRIVATE_KEY ` + ` AMPERSEND_API_URL `
185189- ** Standalone** : Set ` PRIVATE_KEY ` + ` USE_NAIVE_AUTHORIZER=true `
186190
187191### What happens if I don't set service URLs?
188192
189193Examples default to staging services:
194+
190195- A2A: ` https://subgraph-a2a.x402.staging.thegraph.com `
191196- MCP: ` https://subgraph-mcp.x402.staging.ampersend.ai `
192197
@@ -195,6 +200,7 @@ This is perfect for getting started!
195200### How do I switch to production?
196201
197202Update three variables:
203+
1982041 . ` AMPERSEND_API_URL=https://api.ampersend.ai `
1992052 . Service URL to production endpoint
2002063 . Ensure using production account from https://app.ampersend.ai
0 commit comments