Getting_Started
This system mirrors the production backend: account wallet funding, agent-scoped API keys, layered policies, and purchase tracking through MCP or direct API.
Hosted_MCP
Stateless MCP implementation. Each request carries an agent API key forwarded to the backend.
{ "mcpServers": { "ag3n7-store": { "transport": { "type": "streamable-http", "url": "https://ag3n7.store/mcp", "headers": { "Authorization": "Bearer ask_live_xxxxx.yyyyy" } } } }}Stdio_MCP
Standard I/O implementation for clients that prefer local process spawning.
{ "mcpServers": { "ag3n7-store": { "command": "node", "args": ["/absolute/path/to/agent_store_backend/dist/mcp/server.js"], "env": { "AGENT_STORE_API_BASE_URL": "https://ag3n7.store/v1/agent", "AGENT_STORE_AGENT_API_KEY": "ask_live_xxxxx.yyyyy" } } }}Purchase_Flow
Recommended sequence: narrow the catalog, inspect checkout requirements for custom products, quote with final configuration, then purchase.
1. catalog_categories2. catalog_search { category, q, limit }3. catalog_checkout_requirements { catalogItemId }4. quote_create { catalogItemId, quantity, configuration? }5. purchase_create { quoteId | (catalogItemId, quantity, configuration?), idempotencyKey }6. purchase_get_status { purchaseId }7. service_list / service_get8. domain_* or server_* management actions9. router_api_key_create for OpenAI-compatible credit servicesLLM_Router
Buy credits with the purchase API, then mint a separate router key for an OpenAI-compatible base URL. The router key is distinct from the agent purchase key.
1. catalog_search { category: "api_tokens", q: "router credits", limit: 1 }2. catalog_checkout_requirements { catalogItemId }3. quote_create { catalogItemId, quantity: 1, configuration: { creditAmountUsd: 25 } }4. purchase_create { quoteId, idempotencyKey }5. service_get { serviceId }6. router_api_key_create { serviceId, label: "production" }7. GET https://ag3n7.store/openai/v1/models8. POST https://ag3n7.store/openai/v1/chat/completionsfrom openai import OpenAIimport os client = OpenAI( api_key=os.environ["AGENT_STORE_ROUTER_API_KEY"], base_url="https://ag3n7.store/openai/v1",) response = client.chat.completions.create( model="claude-sonnet-4", messages=[ {"role": "system", "content": "Be concise."}, {"role": "user", "content": "Summarize yesterday's deploy."}, ],) print(response.choices[0].message.content)Phone_API
Rent phone numbers across multiple countries, then manage top-ups, inbound SMS, and missed calls through agent tools after provisioning.
1. catalog_search { category: "telephony", q: "phone number", limit: 3 }2. catalog_checkout_requirements { catalogItemId }3. quote_create { catalogItemId, quantity: 1, configuration: { countryCode: "US", numberType: "local", capabilities: ["sms", "voice"], locality: "new-york" } }4. purchase_create { quoteId, idempotencyKey }5. service_get { serviceId }6. phone_balance_topup { serviceId, amountUsd: 10 }7. phone_message_list / phone_message_get8. phone_missed_call_listStorage
Object storage, block volumes, and snapshot retention follow the same quote-first managed-service pattern as other custom products.
1. catalog_search { category: "storage", q: "object" }2. catalog_checkout_requirements { catalogItemId }3. quote_create { catalogItemId, quantity: 1, configuration: { region: "us-east", storageClass: "object", capacityGb: 250 } }4. purchase_create { quoteId, idempotencyKey }5. service_get { serviceId }6. storage_bucket_credentials_create / storage_volume_attach7. storage_snapshot_restoreAgent_API
Direct API exposing full management capabilities including wallet, history, custom checkout, domains, and VPS actions. The dashboard checkout uses the same quote and purchase payloads through an internal account-scoped checkout actor.
const apiKey = process.env.AGENT_STORE_AGENT_API_KEY; const categories = await fetch('https://ag3n7.store/v1/agent/catalog/categories', { headers: { Authorization: `Bearer ${apiKey}` },}).then((res) => res.json()); const items = await fetch( 'https://ag3n7.store/v1/agent/catalog/items?category=domains&q=ai&limit=5', { headers: { Authorization: `Bearer ${apiKey}` } },).then((res) => res.json()); const quote = await fetch('https://ag3n7.store/v1/agent/quotes', { method: 'POST', headers: { Authorization: `Bearer ${apiKey}`, 'content-type': 'application/json', }, body: JSON.stringify({ catalogItemId: '<catalog-item-uuid>', quantity: 1, configuration: { domainName: 'launchpad.com', periodYears: 1, autoRenew: true, privacyProtection: true, }, }),}).then((res) => res.json()); const purchase = await fetch('https://ag3n7.store/v1/agent/purchases', { method: 'POST', headers: { Authorization: `Bearer ${apiKey}`, 'content-type': 'application/json', }, body: JSON.stringify({ quoteId: quote.quote.id, idempotencyKey: 'deploy-domain-1', }),}).then((res) => res.json());API_BASE_URL="https://ag3n7.store/v1/agent"API_KEY="ask_live_xxxxx.yyyyy" curl -X POST "$API_BASE_URL/quotes" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{ "catalogItemId": "<catalog-item-uuid>", "quantity": 1, "configuration": { "domainName": "launchpad.com", "periodYears": 1, "autoRenew": true, "privacyProtection": true } }' curl -X POST "$API_BASE_URL/purchases" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{ "quoteId": "<quote-id>", "idempotencyKey": "deploy-domain-1" }'import osimport requests api_base_url = "https://ag3n7.store/v1/agent"api_key = os.environ["AGENT_STORE_AGENT_API_KEY"]headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json",} quote_response = requests.post( f"{api_base_url}/quotes", headers=headers, json={ "catalogItemId": "<catalog-item-uuid>", "quantity": 1, "configuration": { "domainName": "launchpad.com", "periodYears": 1, "autoRenew": True, "privacyProtection": True, }, }, timeout=30,)quote_response.raise_for_status()quote = quote_response.json() purchase_response = requests.post( f"{api_base_url}/purchases", headers=headers, json={ "quoteId": quote["quote"]["id"], "idempotencyKey": "deploy-domain-1", }, timeout=30,)purchase_response.raise_for_status()purchase = purchase_response.json()Endpoints: GET /v1/agent/catalog/categories, GET /v1/agent/catalog/items, GET /v1/agent/catalog/items/:catalogItemId/checkout, GET /v1/agent/wallet, GET /v1/agent/policies/effective, POST /v1/agent/quotes, POST /v1/agent/purchases, GET /v1/agent/purchases, GET /v1/agent/purchases/:purchaseId, GET /v1/agent/services, GET /v1/agent/services/:serviceId, domain endpoints under /v1/agent/services/:serviceId/domain, and server endpoints under /v1/agent/services/:serviceId/server.
Security_Model
SECURITY_PROTOCOL Keep agent keys server-side, use stable idempotency keys for retries, and treat approval states as authoritative.