aura-labs.ai

AURA Framework Architecture

Overview

The AURA (Agent Universal Resource Architecture) framework enables agentic commerce — a new paradigm where AI agents negotiate and transact on behalf of consumers and merchants. This document describes the architectural design, component interactions, and key design principles.

Architecture Principles

1. User Sovereignty

2. Modularity

3. Trust & Transparency

4. Scalability

System Components

High-Level Architecture

┌─────────────────────────────────────────────────────────────┐
│                         User Layer                          │
│  (Consumers interact with their Scouts via various UIs)     │
└────────────┬────────────────────────────────────────────────┘
             │
             ▼
┌────────────────────────────────────────────────────────────┐
│                      Scout (User Agent)                     │
│ ┌──────────────────────────────────────────────────────┐   │
│ │  1. Identity & Consent Management                    │   │
│ │  2. Preference Learning & Intent Recognition         │   │
│ │  3. Discovery & Negotiation Engine                   │   │
│ │  4. Purchase Execution & Coordination                │   │
│ │  5. User Experience Layer                            │   │
│ └──────────────────────────────────────────────────────┘   │
└────────────┬───────────────────────────────────────────────┘
             │
             │ AURA Protocol (WebSocket/REST)
             │
             ▼
┌────────────────────────────────────────────────────────────┐
│                      AURA Core Platform                     │
│ ┌──────────────────────────────────────────────────────┐   │
│ │  1. Client Management (Scout/Beacon Registration)    │   │
│ │  2. Proposition Universe Gateway                     │   │
│ │  3. Model Management (Protocol & Schemas)            │   │
│ │  4. Trust & Reputation System                        │   │
│ │  5. Message Routing & Orchestration                  │   │
│ └──────────────────────────────────────────────────────┘   │
└────────────┬───────────────────────────────────────────────┘
             │
             │ AURA Protocol (WebSocket/REST)
             │
             ▼
┌────────────────────────────────────────────────────────────┐
│                   Beacon (Merchant Service)                 │
│ ┌──────────────────────────────────────────────────────┐   │
│ │  1. Inventory & Proposition Management               │   │
│ │  2. Negotiation & Pricing Engine                     │   │
│ │  3. Transaction Processing                           │   │
│ │  4. Fulfillment Integration                          │   │
│ │  5. Analytics & Optimization                         │   │
│ └──────────────────────────────────────────────────────┘   │
└────────────────────────────────────────────────────────────┘

Component Deep Dive

1. Scout (User Agent)

Purpose: Represents and acts on behalf of a consumer in the AURA ecosystem.

Key Capabilities:

1.2 Preference Learning & Intent Recognition

1.3 Discovery & Negotiation Engine

1.4 Purchase Execution

1.5 User Experience Layer

Data Flow:

User → Scout → AURA Core → Beacon(s) → AURA Core → Scout → User

2. AURA Core Platform

Purpose: Central coordination layer that manages the ecosystem, maintains standards, and routes messages between Scouts and Beacons.

Key Capabilities:

2.1 Client Management

Interfaces:

// Register a new client
POST /api/v1/clients/register
{
  "type": "beacon" | "scout",
  "name": "Client Name",
  "capabilities": ["negotiation", "loyalty-pricing"],
  "metadata": {}
}

// Authenticate
POST /api/v1/auth/authenticate
{
  "apiKey": "ak_...",
  "apiSecret": "..."
}

// Get trust score
GET /api/v1/clients/{clientId}/trust-score

2.2 Proposition Universe Gateway

Key Concepts:

Interfaces:

// Discover propositions
POST /api/v1/propositions/discover
{
  "intent": {
    "category": "electronics",
    "keywords": ["wireless", "headphones"],
    "priceRange": { "min": 100, "max": 400 }
  },
  "preferences": {
    "brands": ["Sony", "Bose"],
    "features": ["ANC", "USB-C"]
  },
  "filters": {
    "minTrustScore": 0.7,
    "inStock": true
  }
}

// Subscribe to proposition updates
WebSocket: /ws/propositions
{
  "type": "SUBSCRIBE",
  "categories": ["electronics", "audio"]
}

2.3 Model Management

2.4 Trust & Reputation System

Trust Score Calculation:

Trust Score = 
  (0.4 × Transaction Success Rate) +
  (0.2 × Response Time Score) +
  (0.1 × Tenure Score) +
  (0.1 × Volume Score) +
  (0.2 × Issue Penalty)

Range: 0.0 (untrusted) to 1.0 (fully trusted)

2.5 Message Routing & Orchestration


3. Beacon (Merchant Service)

Purpose: Represents a merchant in the AURA ecosystem, exposing inventory and handling transactions.

Key Capabilities:

3.1 Inventory & Proposition Management

3.2 Negotiation & Pricing Engine

Pricing Strategies:

// Example: Loyalty-based pricing
if (scout.purchaseHistory.count >= 3) {
  discount = 15%; // Loyalty discount
}

// Example: Inventory-based pricing
if (inventory.stock > 40) {
  discount = Math.max(discount, 15%); // Clear excess stock
}

// Example: Constraint-based pricing
if (scout.budget < basePrice && acceptable) {
  price = scout.budget; // Match budget if within limits
}

3.3 Transaction Processing

3.4 Fulfillment Integration

3.5 Analytics & Optimization


NLP Pipeline (Three-Layer Architecture)

AURA uses a shared NLP module (@aura-labs/nlp) across all three layers of the system. This eliminates duplicated parsing logic and provides a consistent understanding of buyer intent from Scout through Core to Beacon.

┌──────────────────────────────────────────────────────────────┐
│  Layer 1: @aura-labs/nlp (Shared Module)                     │
│  ┌────────────────────────────────────────────────────────┐  │
│  │  8-category tiered completeness checking               │  │
│  │  Conversational clarification generation               │  │
│  │  LLM provider abstraction (Mock / Remote)              │  │
│  │  SSRF-safe URL validation for remote providers         │  │
│  └────────────────────────────────────────────────────────┘  │
└──────────────────────────────────────────────────────────────┘
        │                    │                    │
        ▼                    ▼                    ▼
┌───────────────┐  ┌─────────────────┐  ┌────────────────────┐
│ Layer 2: Scout│  │ Layer 2: Core   │  │ Layer 3: Beacon    │
│               │  │                 │  │                    │
│ IntentSession │  │ intent-svc      │  │ interpretIntent()  │
│ Completeness  │  │ Authoritative   │  │ Catalog matching   │
│ gate before   │  │ parsing with    │  │ Keyword/tag        │
│ submission    │  │ local fallback  │  │ scoring            │
└───────────────┘  └─────────────────┘  └────────────────────┘

Design Principles:

Categories (8 total):

See ADR-002 for the full architectural specification.


Communication Protocols

WebSocket Protocol

Primary real-time communication channel between all components.

Message Format:

{
  "type": "MESSAGE_TYPE",
  "messageId": "msg_abc123",
  "timestamp": "2025-01-15T10:30:00Z",
  "from": "sct_xyz789" | "bcn_def456",
  "to": "bcn_def456" | "sct_xyz789",
  "payload": {
    // Message-specific data
  }
}

Message Types:

Scout → AURA → Beacon

// Inquiry
{
  "type": "SCOUT_INQUIRY",
  "payload": {
    "scoutId": "sct_...",
    "inquiryId": "inq_...",
    "intent": {
      "category": "electronics",
      "description": "wireless headphones",
      "keywords": ["ANC", "over-ear"]
    },
    "preferences": {
      "priceRange": { "min": 100, "max": 400 },
      "brands": ["Sony", "Bose"]
    },
    "behavioralData": {
      // Anonymous purchase history
      "purchaseHistory": {
        "totalPurchases": 5,
        "averageOrderValue": 350,
        "categories": ["electronics", "audio"]
      }
    }
  }
}

// Negotiation request
{
  "type": "NEGOTIATION_REQUEST",
  "payload": {
    "scoutId": "sct_...",
    "negotiationId": "neg_...",
    "propositionId": "prop_...",
    "constraints": {
      "maxPrice": 350,
      "requiredFeatures": ["ANC", "USB-C"]
    },
    "behavioralData": { /* ... */ }
  }
}

// Transaction request
{
  "type": "TRANSACTION_REQUEST",
  "payload": {
    "scoutId": "sct_...",
    "transactionId": "txn_...",
    "negotiationId": "neg_...",
    // Identity NOW revealed for fulfillment
    "userIdentity": {
      "name": "Jane Doe",
      "email": "jane@example.com"
    },
    "shippingAddress": { /* ... */ },
    "paymentMethod": { /* ... */ }
  }
}

Beacon → AURA → Scout

// Inquiry response
{
  "type": "INQUIRY_RESPONSE",
  "payload": {
    "beaconId": "bcn_...",
    "inquiryId": "inq_...",
    "available": true,
    "propositions": [
      {
        "propositionId": "prop_...",
        "itemId": "item_...",
        "name": "Wireless Headphones Pro",
        "priceRange": { "min": 240, "max": 300 },
        "available": true
      }
    ]
  }
}

// Negotiation offer
{
  "type": "NEGOTIATION_OFFER",
  "payload": {
    "beaconId": "bcn_...",
    "negotiationId": "neg_...",
    "round": 1,
    "price": 285.99,
    "discount": 15,
    "incentives": [
      {
        "type": "loyalty-discount",
        "description": "15% off for loyal customers"
      }
    ],
    "validUntil": "2025-01-15T11:00:00Z",
    "terms": { /* ... */ }
  }
}

// Transaction confirmation
{
  "type": "TRANSACTION_CONFIRMED",
  "payload": {
    "beaconId": "bcn_...",
    "transactionId": "txn_...",
    "orderNumber": "ORD-123456",
    "amount": 285.99,
    "estimatedDelivery": "2-5 business days"
  }
}

Data Models

Client Model

{
  "clientId": "sct_..." | "bcn_...",
  "type": "scout" | "beacon",
  "name": "Client Name",
  "capabilities": ["negotiation", "loyalty-pricing"],
  "status": "active" | "suspended" | "deactivated",
  "trustScore": 0.85,
  "reputationData": {
    "transactionCount": 127,
    "successfulTransactions": 124,
    "failedTransactions": 3,
    "averageResponseTime": 245,
    "reportedIssues": 0
  },
  "registeredAt": "2024-06-01T00:00:00Z",
  "lastActiveAt": "2025-01-15T10:30:00Z"
}

Proposition Model

{
  "propositionId": "prop_...",
  "beaconId": "bcn_...",
  "itemId": "item_...",
  "name": "Product Name",
  "category": "electronics",
  "description": "Product description",
  "priceRange": {
    "min": 200,
    "max": 300
  },
  "features": ["feature1", "feature2"],
  "available": true,
  "stock": 25,
  "metadata": {
    "brand": "Sony",
    "model": "WH-1000XM5"
  },
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-15T10:00:00Z"
}

Transaction Model

{
  "transactionId": "txn_...",
  "negotiationId": "neg_...",
  "scoutId": "sct_...",
  "beaconId": "bcn_...",
  "amount": 285.99,
  "currency": "USD",
  "status": "confirmed" | "processing" | "completed" | "failed",
  "orderNumber": "ORD-123456",
  "items": [
    {
      "propositionId": "prop_...",
      "quantity": 1,
      "price": 285.99
    }
  ],
  "timestamps": {
    "created": "2025-01-15T10:30:00Z",
    "confirmed": "2025-01-15T10:31:00Z",
    "completed": null
  }
}

Security & Privacy

Identity Abstraction

During Negotiation:

At Transaction:

Authentication & Authorization

API Keys:

Session Tokens:

Rate Limiting

Per-Client Limits:


Scalability Considerations

Horizontal Scaling

AURA Core:

Proposition Universe:

Performance Optimization

Caching Strategy:

┌─────────────────┐
│  CDN (Static)   │
└────────┬────────┘
         │
┌────────▼────────┐
│  Redis Cache    │  ← Propositions, Trust Scores
└────────┬────────┘
         │
┌────────▼────────┐
│   Database      │  ← Persistent Storage
└─────────────────┘

Message Routing:


Monitoring & Observability

Key Metrics

AURA Core:

Beacons:

Scouts:

Logging

Structured Logging Format:

{
  "timestamp": "2025-01-15T10:30:00Z",
  "level": "INFO",
  "component": "ClientManager",
  "event": "client_registered",
  "data": {
    "clientId": "bcn_...",
    "type": "beacon",
    "name": "Demo Store"
  }
}

Future Enhancements

Roadmap

Phase 1: Foundation (Q1 2026)

Phase 2: Advanced Features (Q2 2026)

Phase 3: Ecosystem Growth (Q3-Q4 2026)


Contributing

See CONTRIBUTING.md for guidelines on:


References