AI Integration Architecture for Legacy Systems

Table of Contents

AI Integration Architecture for Legacy Systems: Patterns and Roadmap

AI Integration Architecture for Legacy Systems_ Patterns and Roadmap

AI integration architecture for legacy systems is a decoupled technical layer that connects established systems of record with modern AI services.

API wrappers expose selected functions, while Change Data Capture (CDC), message queues, and integration services move data without placing new workloads inside the core application.

External AI services then perform prediction, classification, retrieval, or document analysis.

Governance controls manage identity, access, approvals, monitoring, and auditability, while fallback processes keep existing workflows running when an AI service fails.

This allows organisations to add AI capabilities without rewriting or destabilising critical transactional systems.

This guide presents a vendor-neutral reference architecture and seven practical integration patterns.

It also provides a framework for selecting the right pattern, guidance for managing data, security, governance, and reliability, and a phased roadmap for production deployment.

A practical architecture walkthrough shows how these components work together in a realistic, complex enterprise workflow.

Table of Contents

What Is AI Integration Architecture for Legacy Systems?

AI integration architecture for legacy systems is the technical structure that governs how established applications connect with AI models and supporting data services.

It defines which information leaves the legacy environment, how that information is prepared, and which services may access it.

The architecture also controls how predictions, classifications, generated content, or recommendations return to employees and operational workflows.

This includes interfaces, validation, and approval controls surrounding each exchange.

Integration Versus Full Legacy Modernisation

AI integration adds capabilities around an existing application while preserving its core design.

Legacy modernisation changes the application itself by decomposing functions, migrating infrastructure, replacing databases, rebuilding interfaces, or retiring the platform.

For example, a bank can connect a fraud-scoring model to its core transaction system through events and APIs.

The model evaluates activity, but the established banking platform continues to record and authorise transactions.

Keep the Transactional Core Stable

A sound architecture follows three rules.

The legacy application remains the system of record, AI components can be deployed and updated independently, and an AI failure cannot interrupt the core transaction.

These rules allow teams to test, replace, or roll back AI services without creating risk to critical operations.

What the Architecture Includes

The architecture includes interfaces and adapters, data pipelines, event streams, and AI inference services.

It also covers workflow integration, governance policies, monitoring, audit records, fallback behaviour, and human approval for decisions requiring judgement or accountability.

Why Legacy Systems Require a Separate AI Integration Layer

Legacy platforms were built for stable transactions and long release cycles.

AI services require accessible data, flexible computing, frequent updates, and continuous monitoring, making direct integration risky.

Monolithic code and limited APIs. Tightly connected applications often combine business logic, data access, and user interfaces.

Directly exposing internal functions can create security, performance, and maintenance problems.

Proprietary formats and undocumented rules. Legacy records may use custom schemas, obsolete field names, or business rules known mainly to experienced employees.

AI services need consistent, documented formats.

Batch processing versus real-time AI. Nightly jobs may support reporting but cannot meet every requirement for fraud alerts, recommendations, anomaly detection, or immediate decision support.

Limited model-hosting capacity. Older platforms rarely provide the computing, storage, or deployment flexibility required for large models, vector databases, and scalable inference.

Closed-environment security. Legacy controls often assume trusted internal users and applications.

AI introduces new service identities, data flows, cloud endpoints, and third-party dependencies requiring stronger access and audit controls.

Operational continuity. A separate layer allows AI services to be tested, updated, rolled back, or bypassed without changing the core application.

It also supports fallback and graceful degradation during outages.

The challenge is not simply whether a model can make a prediction.

It is whether the enterprise can deliver the right data, use the result safely, and keep the process operating when the AI service is unavailable.

Vendor-Neutral AI Integration Reference Architecture

A vendor-neutral architecture separates legacy transaction processing from data movement, AI execution, workflow control, and governance.

Each layer has a defined responsibility, allowing teams to change AI models or integration services without rewriting the core application.

The proposed diagram should show seven connected layers, with the governance and observability control plane extending across the full architecture.

Vendor-Neutral AI Integration Reference Architecture

1. Legacy Systems of Record

Mainframes, ERP platforms, older CRM systems, relational databases, and file-based applications sit at the foundation.

They continue to own authoritative customer, financial, inventory, claims, or operational transactions.

AI services may read approved information or request controlled actions, but they should not become an unmanaged second system of record.

2. Interface and Translation Layer

An API gateway or REST or GraphQL façade exposes selected functions without revealing the complete legacy application.

Protocol adapters connect older interfaces such as SOAP, files, terminal services, or proprietary messaging formats.

An anti-corruption layer translates legacy schemas and business concepts into a canonical data model that newer services can understand.

Authentication, authorisation, rate limiting, and request validation protect the boundary.

3. Data Movement and Event Transport

Batch ETL supports scheduled transfers for reporting, forecasting, and model training.

CDC captures database changes, while message queues and event brokers distribute time-sensitive updates to downstream AI services.

Caching can reduce repeated calls to constrained systems.

Dead-letter queues isolate failed events so teams can inspect and replay them without interrupting the source transaction.

4. AI-Ready Data Layer

A warehouse or lakehouse stores historical and curated data products for analytics and model development.

Feature stores provide reusable model inputs, while metadata catalogues and data-quality controls document ownership, meaning, freshness, and reliability.

Vector databases support semantic retrieval for RAG and enterprise search.

They supplement operational databases rather than replacing systems responsible for authoritative records and transactions.

5. AI Execution Services

This layer hosts predictive model endpoints, RAG services, document intelligence, and other inference workloads.

An LLM gateway can manage model access, routing, logging, and usage limits across approved providers.

Agent orchestration coordinates multi-step tasks and tool access.

A model registry records approved versions, evaluation results, deployment status, and rollback options.

6. Workflow and Controlled Write-Back

AI outputs should pass through business rules, confidence thresholds, and policy checks before they affect an operational process.

Higher-risk recommendations may move to a human review queue.

Approved actions return through authorised APIs rather than direct database updates.

Reconciliation processes confirm that the intended transaction was completed and record any exception requiring investigation.

7. Governance and Observability Control Plane

The control plane manages identities, permissions, audit logs, data policies, model versions, and approval requirements across every layer.

It also records which data, model, prompt, and rule contributed to an outcome.

Monitoring covers API latency, event lag, model errors, drift, infrastructure use, and cost.

Distributed tracing connects activity across legacy applications, integration services, and AI components, helping teams identify failures and maintain accountability.

Seven Patterns for Integrating AI With Legacy Systems

No single pattern suits every legacy environment. The right choice depends on data freshness, available interfaces, security requirements, operational risk, human oversight, and whether the organisation plans to preserve or gradually replace the existing platform.

It should also reflect model criticality, compliance obligations, and the availability of human review.

The selection should reflect how the application handles failures, how quickly data changes, and who must carefully approve any resulting action.

Seven Patterns for Integrating AI With Legacy Systems

Pattern 1: API Wrapper or Façade

How it works: A controlled REST or GraphQL façade exposes selected legacy functions while hiding internal code, schemas, and unsupported interfaces.

Best use case: It suits stable applications with predictable request-response workflows, such as retrieving customer records or submitting approved updates.

Main advantage: Authentication, validation, and rate limits can be applied at one boundary.

Main limitation: Synchronous AI calls may add latency, so strict timeout and fallback rules are required.

Pattern 2: Middleware and Anti-Corruption Layer

How it works: Middleware translates protocols, schemas, identifiers, and business concepts between legacy applications and modern AI services.

Best use case: It works well when several systems use incompatible formats, interfaces, or terminology.

Main advantage: The AI environment receives a consistent canonical model instead of platform-specific data.

Main limitation: Translation and orchestration rules can become difficult to maintain unless teams define ownership, versioning, testing, and clear service boundaries over time.

Pattern 3: Sidecar or Companion Intelligence Service

How it works: AI runs in a service that observes data, scores events, or produces recommendations without changing the executable.

Best use case: It supports monitoring, classification, and decision assistance around a stable application.

Main advantage: Teams can deploy and update AI independently.

Main limitation: A strict sidecar shares the parent service lifecycle, while a loosely coupled companion service does not, so state synchronisation and terminology must be defined carefully.

Pattern 4: Event-Driven Augmentation With CDC

How it works: Change Data Capture records database changes and publishes them through a queue or event broker to downstream AI workflows.

Best use case: It suits fraud detection, predictive maintenance, anomaly detection, and case prioritisation.

Main advantage: Processing remains asynchronous and loosely coupled.

Main limitation: Results may be eventually consistent, and consumers must handle duplicated, delayed, or out-of-order events through idempotency, sequencing, retries, and reconciliation in complex production environments.

Pattern 5: AI-Ready Data Platform

How it works: Selected legacy data is replicated into a warehouse, lakehouse, feature store, or vector index for AI access.

Best use case: It supports forecasting, analytics, enterprise search, model training, and retrieval-augmented generation.

Main advantage: AI workloads avoid repeated queries against constrained production systems.

Main limitation: Replicated data can become stale or inconsistent, so teams must define refresh frequency, lineage, quality thresholds, audit requirements, and source-system ownership over time.

Pattern 6: Hybrid Cloud or Edge Inference

How it works: Sensitive data or low-latency inference remains on-premises or at the edge, while approved cloud services support selected training, storage, or model workloads.

Best use case: It suits regulated, distributed, or latency-sensitive operations.

Main advantage: Workloads can be placed according to privacy, performance, and computing needs.

Main limitation: Network outages, security policies, data residency rules, model synchronisation, deployment coordination, ongoing support needs, and cross-environment monitoring increase operational complexity.

Pattern 7: Strangler Fig Modernisation

How it works: Selected functions are redirected from the legacy application to modern services, while the remaining system continues operating.

Best use case: It fits organisations using AI integration as part of a gradual replacement programme.

Main advantage: Teams can modernise one workflow at a time and reduce migration risk.

Main limitation: Old and new components may coexist for years, also creating duplicated logic, integration dependencies, and temporary governance overhead.

How to Choose the Right Integration Pattern

Choose the pattern from workflow requirements. Assess data speed, AI read or write authority, security, and how much legacy change is safe.

No pattern removes the need for testing and fallback.

Pattern Best suited to Data speed Legacy change Main risk
API wrapper Synchronous functions Real time Low–medium Core latency
Middleware Multiple formats and systems Near real time Low Orchestration complexity
Companion service External AI processing Variable Low State synchronisation
CDC and events High-volume workflows Near real time Very low Eventual consistency
Data platform Analytics and RAG Batch–near real time Very low Stale data
Hybrid Sensitive or distributed workloads Variable Low Network dependency
Strangler Fig Gradual replacement Variable Medium Long coexistence

First, ask whether the use case requires real-time data. A safe API may support synchronous requests, while CDC or events suit high-volume, asynchronous processing.

Next, confirm whether the database supports CDC and whether AI only reads information or must write results back. Write access requires validation, approval, audit, and reconciliation controls.

Data residency affects the choice. Sensitive information may require on-premises or edge processing, while approved workloads can use cloud services.

Consider the system’s future. A wrapper or companion service can preserve a stable platform. Strangler Fig is more suitable when gradual replacement is planned.

Data Architecture and System-of-Record Ownership

Data architecture should be designed before model selection because model performance depends on the quality, ownership, freshness, and meaning of the data it receives.

A capable model cannot compensate for duplicated records, inconsistent identifiers, unclear update rules, or information that arrives too late for the workflow.

Identify Authoritative Data

Teams should define which application owns every important field, transaction, and status.

For example, the ERP may own inventory quantities, while the CRM owns customer contact details.

This prevents downstream AI services from treating copied or outdated records as authoritative.

Create Versioned Data Contracts

A data contract should document field names, data types, business definitions, validation rules, update frequency, and ownership.

Versioning allows producers and consumers to change safely without breaking models, pipelines, or operational workflows.

Select the Movement Method

Batch extraction suits scheduled reporting and model training.

Micro-batching provides more frequent updates without continuous streaming.

CDC captures database changes, while event streaming distributes time-sensitive updates to multiple consumers.

Data virtualisation provides controlled access without creating another complete copy.

Prepare Data for AI

Preparation includes matching identifiers across systems, resolving missing records, removing duplicates, mapping outdated codes, and extracting useful content from documents, emails, and scanned files.

These steps should preserve context rather than simply standardising formats.

Preserve Lineage

Teams should be able to trace every model output to its source records, transformation logic, data version, model version, and policy decision.

This supports investigation, audit, and error correction.

Prevent Conflicting Updates

AI must not become an uncontrolled second system of record.

Write permissions should identify who can update each field and how conflicting changes are detected, prioritised, and reconciled.

RAG indexes, feature stores, and vector databases should therefore be built only from governed, approved, and traceable source data.

Read Paths, Write-Back, and AI Autonomy

AI use cases create different levels of risk depending on whether the system only reads information, recommends an action, or changes a business record.

Organisations should increase autonomy gradually as data quality, security, reliability, and accountability controls mature.

Read-Only AI

Read-only AI can support enterprise search, summarisation, classification, and historical analysis.

It retrieves or processes approved data but cannot update customer records, financial transactions, case statuses, or other operational information.

This is usually the lowest-risk starting point because errors remain advisory.

Recommendation AI

Recommendation systems produce outputs such as fraud scores, maintenance alerts, case priorities, or next-best-action suggestions.

A person or deterministic business rule decides whether to accept, reject, or escalate the recommendation.

This approach gives teams operational value while preserving human or policy-based control.

Controlled Write-Back

AI requires stronger controls when its output can change a legacy record or trigger a transaction.

The workflow should validate the output, apply policy and confidence thresholds, obtain approval where required, and send the action through an authorised API.

It should then record an audit event and reconcile the completed transaction against the intended action.

Direct database updates should be avoided because they can bypass business rules and create conflicting records.

Agentic AI Autonomy Levels

Observe: The agent reads approved information and reports findings.

Recommend: It suggests an action but cannot execute it.

Approve and execute: It prepares an action that proceeds only after human or policy approval.

Bounded autonomy: It acts within approved systems, tools, transaction values, and operating limits.

High-impact actions involving finance, safety, compliance, or sensitive data should begin with human review.

Autonomy should expand only after the organisation can monitor outcomes, reverse incorrect actions, and assign clear accountability.

Security, Governance, and Reliability Controls

Security, governance, and reliability should be designed as one control system rather than separate activities.

A secure model still creates risk if its outputs bypass business rules, while a reliable service remains unsuitable if no one can explain or audit its decisions.

Access and Data Protection

Use least-privilege access so each user and service receives only required permissions.

Assign separate service identities, store credentials in managed secrets systems, and encrypt data in transit and at rest.

PII masking, tokenisation, and data minimisation reduce exposure by removing or replacing information that the model does not need.

AI-Specific Governance

Organisations should define approved models, providers, data sources, use cases, and deployment environments.

Model, prompt, data, and policy versions must be recorded so teams can reproduce an output and understand which configuration produced it.

Governance should also cover output evaluation, bias testing, model and data drift, human accountability, and third-party data-retention policies.

These controls are especially important when external providers process confidential or regulated information.

Safe Output Handling

Model outputs should be treated as untrusted until they pass schema validation, content checks, business rules, and authorisation controls.

Generated instructions must not receive direct access to sensitive tools or transactions without a separate policy decision.

Reliability and Failure Handling

Timeouts prevent slow AI calls from blocking core workflows.

Retries should use controlled limits, while circuit breakers stop repeated requests to an unavailable service.

Idempotent operations prevent duplicate actions, and dead-letter queues isolate events that require investigation or manual replay.

Fallback rules should define what happens when the model, network, or integration service fails.

The legacy workflow should continue under existing rules or move to a controlled review queue when AI is unavailable.

Observability

Teams should monitor API latency, event lag, inference errors, model drift, manual overrides, and token or infrastructure costs.

Distributed tracing should connect activity across the legacy platform, integration layer, model service, policy engine, and write-back process.

Production readiness depends on how the complete workflow performs, fails, recovers, and supports accountability not on model accuracy alone.

Phased AI Integration Roadmap

A phased roadmap reduces operational risk by separating technical experimentation from production authority. Each stage should end with evidence that the organisation is ready to proceed.

Phased AI Integration Roadmap

Phase 1: Assess the Legacy Estate

Map applications, databases, interfaces, owners, dependencies, security boundaries, and known failure points.

Document critical transactions, unsupported components, batch schedules, and areas where even a small change could interrupt operations.

Phase 2: Select One Measurable Use Case

Choose a workflow with sufficient data, manageable business impact, and clear success metrics.

Suitable starting points include document classification, anomaly detection, case prioritisation, and employee knowledge retrieval.

Phase 3: Define the Integration Boundary

Specify which data, functions, tools, and environments the AI service may access.

Keep unnecessary systems and sensitive fields outside the initial scope, and define whether access is read-only or includes controlled actions.

Phase 4: Establish Data Contracts

Document data ownership, definitions, quality thresholds, freshness requirements, permitted use, and change-management rules.

Confirm how missing values, schema changes, duplicates, and processing errors will be handled.

Phase 5: Build a Sandbox Proof of Concept

Test data movement, model performance, security controls, and workflow fit in an isolated environment.

Use representative data, but do not allow the prototype to update production records or invoke operational tools.

Phase 6: Run in Shadow Mode

Generate AI outputs alongside the existing process without affecting transactions.

Compare recommendations with actual decisions, measure false positives and false negatives, and investigate disagreements before expanding access.

Phase 7: Introduce Human-Approved Production Use

Allow authorised employees to accept, reject, or correct recommendations.

Record decisions, explanations, overrides, and feedback so teams can evaluate performance and identify recurring failure patterns.

Phase 8: Enable Bounded Automation

Grant limited write authority only after security, reliability, latency, and performance requirements are met.

Apply transaction limits, policy checks, rollback controls, and automatic escalation for exceptions or uncertain outputs.

Phase 9: Reuse or Modernise

Apply proven patterns to other workflows or use them to replace selected legacy functions gradually.

Reuse shared APIs, data contracts, monitoring controls, and governance policies rather than building another isolated connection.

Stage gates should assess business value, data quality, security, technical performance, operational resilience, and user adoption before additional authority or investment is approved.

Architecture Walkthrough: Fraud Scoring for a Legacy Transaction System

Consider a bank adding fraud scoring to an established transaction platform.

The legacy system first records the transaction using its existing rules. CDC captures the database change and sends it to a message broker without modifying the original transaction code.

A transformation service validates the event, maps fields to an approved schema, and tokenises sensitive identifiers. The fraud model then produces a risk score and supporting reason codes.

A policy engine compares the result with approved thresholds. Low-risk transactions continue through the normal workflow, while medium-risk cases move to a human review queue.

A high-risk result may trigger an authorised hold through a controlled API. The model cannot update the transaction database directly.

The platform logs the source data, transformation version, model version, score, policy decision, approval, and completed action. Reconciliation confirms that the requested hold or release occurred correctly.

If the model or integration service is unavailable, existing fraud rules remain active. Failed events can move to a dead-letter queue for investigation and safe replay.

This workflow uses asynchronous events because model latency or failure should not block the core transaction. It also allows the fraud service to scale, update, and recover independently.

Suggested visual: Event-driven fraud-scoring sequence diagram.

When to Integrate, Modernise, or Replace

AI integration is appropriate only when the existing system can support the required data access, security, and operational controls.

System condition Recommended direction
Reliable core with usable interfaces Integrate AI
Recoverable data-quality problems Remediate, then integrate
No safe interfaces Modernise the integration boundary
Unsupported platform with major security exposure Replace or substantially modernise
Stable platform expected to remain for years Integrate incrementally
Broken or poorly defined workflow Redesign before adding AI
High-risk autonomous action required Modernise controls before deployment

A reliable platform with controlled interfaces can support incremental integration. Recoverable data problems should be corrected before model development.

When safe interfaces are unavailable, modernise the integration boundary first. Unsupported platforms with serious security exposure may require replacement.

Broken workflows should be redesigned rather than automated. High-risk autonomous actions require stronger identity, approval, audit, rollback, and monitoring controls.

AI should not be used to hide fundamental architecture, security, data, or process failures.

Success Metrics and Common Architecture Mistakes

Success should be measured across business, technical, and governance outcomes.

Business metrics show whether the integration improves the workflow. Track processing time, exception rates, manual effort, user adoption, and whether employees accept or bypass AI recommendations.

Technical metrics show whether the architecture performs reliably. Monitor API latency, event lag, inference error rates, service availability, recovery time, and failed or replayed events.

Governance metrics show whether controls remain effective. Measure override rates, policy violations, traceability coverage, drift alerts, and the percentage of AI-supported actions with complete audit records.

Common mistakes can undermine these results. Connecting models directly to production databases bypasses business rules and increases security risk.

Allowing AI to become another system of record creates conflicting ownership. Using synchronous inference for every workflow can add latency and failure dependencies.

Other mistakes include ignoring fallback behaviour, sending excessive data to external models, and granting write access before approval and reconciliation controls are proven.

Model accuracy alone is not enough. Teams must also measure operational value, failure behaviour, user adoption, and decision quality across the complete workflow.

How Prismetric Can Help Integrate AI With Your Legacy Systems

Integrating AI with a legacy platform requires more than selecting a model. Your organisation needs a clear use case, reliable data, controlled interfaces, and an architecture that protects existing transactions.

Prismetric can assess your current infrastructure, workflows, data sources, and business objectives to identify where AI can deliver practical value. Its AI consulting services cover opportunity mapping, technical feasibility, strategy development, and implementation planning.

The team can develop custom AI solutions and connect them with existing ERP, CRM, database, document, cloud, and internal software environments. This may include predictive models, RAG systems, enterprise copilots, AI agents, document intelligence, and workflow automation.

Prismetric also supports the journey from proof of concept to production deployment. This includes data preparation, API and backend development, security planning, integration testing, monitoring, maintenance, and ongoing model optimisation.

Depending on your legacy environment, Prismetric can help with:

  • Assessing AI readiness and prioritising suitable use cases
  • Designing APIs, middleware, data pipelines, and integration workflows
  • Building custom machine learning, generative AI, RAG, or agentic AI solutions
  • Connecting AI with enterprise applications and proprietary data
  • Developing a sandbox proof of concept before production access
  • Implementing security, access, monitoring, and human approval controls
  • Deploying, maintaining, and improving the solution as requirements evolve

This approach can help your organisation introduce AI incrementally while keeping the legacy system stable and maintaining control over sensitive data and operational decisions.

Frequently Asked Questions

Can AI Be Integrated Without Replacing a Legacy System?

Yes. API wrappers, middleware, CDC, and companion services can connect AI to an existing platform while the legacy application remains the system of record.

This works best when controlled interfaces or data access already exist.

What If the Legacy System Has No API?

Possible options include:

  • File or batch exports
  • Database CDC
  • Message-based adapters
  • RPA for terminal workflows

RPA is usually a last resort because interface changes can make it brittle.

What Is the Safest Pattern for Connecting AI to a Mainframe?

Use an external façade, message queue, or controlled replication layer rather than placing AI inside the mainframe.

Begin with read-only access, then add approved actions after security and fallback controls are proven.

When Should CDC Be Used Instead of Batch ETL?

Use CDC for near-real-time changes such as fraud alerts, anomaly detection, or case prioritisation.

Use batch ETL for reporting, model training, historical analysis, and workflows that can tolerate delayed updates.

What Is the Difference Between an API Wrapper and an Anti-Corruption Layer?

An API wrapper exposes selected functions through modern endpoints.

An anti-corruption layer also translates schemas, protocols, identifiers, and business meanings so legacy conventions do not shape newer AI services.

How Can AI Write Back to a Legacy Application Safely?

A safe write-back process should:

  • Validate the output
  • Apply policy checks
  • Obtain approval
  • Use an authorised API
  • Log and reconcile the action

Avoid direct production-database updates.

Does a Legacy AI Architecture Need a Vector Database?

Not always. Vector databases are useful for semantic search and RAG over documents or other unstructured content.

Predictive models and transactional workflows may instead use APIs, warehouses, feature stores, or event streams.

Can AI Agents Safely Operate Across Legacy Systems?

Yes, but their tools, permissions, transaction values, and accessible systems must be restricted.

High-impact agents should begin in observe or recommend mode, with human approval, audit logs, monitoring, and rollback controls.

Should AI Inference Run On-Premises or in the Cloud?

Use on-premises or edge inference when data residency, latency, or network reliability requires local processing.

Cloud services may suit approved workloads needing elastic compute. Many organisations use a hybrid approach.

How Much Does Legacy System AI Integration Cost?

There is no reliable fixed price.

Cost depends on API maturity, data quality, security requirements, connected systems, real-time processing needs, testing, governance, and whether production write-back is required.

    Our Recent Blog

    Know what’s new in Technology and Development

    Have a question or need a custom quote

    Our in-depth understanding in technology and innovation can turn your aspiration into a business reality.

    14+Years’ Experience in IT Prismetric  Success Stories
    0+ Happy Clients
    0+ Solutions Developed
    0+ Countries
    0+ Developers

        Connect With US

        x