AI Infrastructure

MCP Agentic RAG System

UnyKorn integrates AI capabilities through a Model Context Protocol server exposing full network operations as structured tools, a Retrieval-Augmented Generation knowledge system, and autonomous agent workflows for monitoring, compliance, and operational intelligence.

Architecture

Three-Layer AI Infrastructure

MCP Server

Model Context Protocol server exposing UnyKorn's full API surface as structured, discoverable tools with parameter validation and execution sandboxing.

Tool DiscoveryParameter ValidationExecution SandboxAuth Scoping

RAG Knowledge System

Retrieval-Augmented Generation system indexing the complete codebase, documentation, transaction history, and network metrics for factually grounded AI responses.

Vector StoreSemantic SearchContext AugmentationSource Attribution

Agentic Workflows

Autonomous multi-step agent pipelines for bridge monitoring, compliance reporting, validator auditing, and trade finance tracking with full audit trails.

Multi-Step PipelinesEvent-DrivenAudit LoggedAuth Constrained
MCP Server

Tool Registry

The MCP server exposes 22 structured tools across 5 categories. Each tool includes full JSON Schema parameter definitions, execution sandboxing, and authorization scope enforcement.

Network State

get_block

Retrieve block by height or hash

get_transaction

Query transaction by ID with full receipt

get_account

Account balance, nonce, and DID resolution

get_validator_set

Current validator set with class and stake

get_mempool_stats

Pending transaction count and fee distribution

Transaction Composition

compose_transfer

Build UNY or token transfer transaction

compose_lc_operation

Letter of Credit lifecycle operation

compose_bridge_transfer

Cross-chain XRPL bridge transaction

compose_custody_operation

Fireblocks/BitGo custody action

compose_governance_vote

On-chain governance proposal vote

Compliance & Policy

evaluate_policy

Pre-check transaction against policy rules

get_kyc_status

DID credential verification status

get_compliance_report

Generate jurisdiction-specific report

list_policy_rules

Active policy rule sets per jurisdiction

Bridge & Custody

get_bridge_status

XRPL bridge health and transfer stats

get_escrow_status

Active escrow conditions and expirations

get_custody_positions

Cross-provider position summary

get_funding_routes

Optimal routing options for a transfer

Monitoring & Analytics

get_network_metrics

Prometheus-compatible performance metrics

get_validator_performance

Uptime, blocks produced, slashing events

get_bridge_analytics

Transfer volume, latency, circuit breaker state

generate_audit_trail

Export regulatory audit data for date range

RAG System

Knowledge Sources

The RAG system indexes four primary knowledge domains, enabling AI responses grounded in verified network data rather than generic training data.

Codebase Knowledge

Complete 37-crate Rust workspace indexed with structural understanding of module boundaries, trait interfaces, and dependency graphs.

Module architectureTrait definitionsAPI specificationsTest coverage maps

Documentation Index

Whitepaper, research papers, API documentation, and operational runbooks indexed for semantic retrieval.

Whitepaper sectionsResearch paper abstractsAPI reference docsDeployment guides

Transaction History

Historical transaction data, block production records, and validator activity logs available for analytical queries.

Transaction patternsBlock production statsFee market dataValidator metrics

Network Metrics

Real-time and historical Prometheus metrics for performance monitoring, anomaly detection, and capacity planning.

Throughput metricsLatency distributionsResource utilizationError rates
Autonomous Agents

Agentic Workflows

Pre-configured agent pipelines that combine MCP tools and RAG knowledge to execute multi-step operational workflows autonomously, with full authorization enforcement and audit logging.

Bridge Health Monitor

Continuous (30-second intervals)

Continuously monitors XRPL bridge transfer patterns, validates threshold signatures, and triggers circuit breaker alerts when anomalous activity is detected.

1Poll bridge validator status
2Analyze transfer volume against baselines
3Detect anomalous patterns (volume spikes, unusual asset types)
4Escalate to compliance validators if thresholds exceeded
5Generate incident report with full audit trail

Compliance Report Generator

Scheduled (daily/weekly) or on-demand

Automated generation of jurisdiction-specific regulatory reports by querying transaction history, policy evaluation results, and KYC/AML verification records.

1Accept report parameters (jurisdiction, date range, entity)
2Query relevant transaction and compliance data via MCP tools
3Apply jurisdiction-specific formatting rules
4Cross-reference with policy evaluation results
5Output formatted regulatory report (JSON, CSV, PDF)

Validator Performance Auditor

Continuous with hourly aggregation

Analyzes validator uptime, block production rates, and policy quorum participation to identify underperforming validators and potential slashing events.

1Aggregate validator metrics across reporting period
2Compare performance against class-specific SLA requirements
3Identify missed blocks, delayed votes, and connectivity gaps
4Calculate slashing risk scores
5Generate performance report with recommendations

Trade Finance Status Tracker

Event-driven (LC state transitions)

Monitors active Letters of Credit through their lifecycle, providing real-time status updates to participating parties and alerting on document examination deadlines.

1Monitor LC state machine transitions
2Notify relevant parties (issuing bank, advising bank, beneficiary)
3Track document presentation deadlines
4Alert on approaching UCP 600 examination time limits
5Generate settlement confirmation upon LC completion
Security

AI Authorization Framework

Execution Sandboxing

All MCP tool executions run within isolated sandboxes with resource limits on computation time, memory allocation, and network I/O. State-modifying operations require explicit authorization tokens scoped to specific tool categories and parameter ranges.

Role-Based Access Control

Agent permissions are bound to DID-verified operator credentials. Read-only operations (queries, metrics) require standard authentication. Write operations (transactions, configuration) require elevated authorization tied to the operator's validator class and institutional role.

Audit Trail

Every AI agent action — tool invocation, RAG query, workflow step execution — is recorded in an immutable audit log with operator identity, timestamp, parameters, and results. Audit data supports regulatory examination requirements across all supported jurisdictions.

Rate Limiting & Circuit Breakers

Agent operations are subject to configurable rate limits per operator, per tool category, and per time window. Circuit breakers automatically disable agent access to sensitive operations (bridge transfers, custody actions) when anomalous invocation patterns are detected.

Integrate with UnyKorn AI

Access the MCP server and RAG knowledge system for institutional AI integration. Documentation and API keys available to registered participants.