Section 03
Tech Stack
Every technology decision — AI frameworks, databases, APIs, infrastructure, schema standards, and security — with the rationale behind each choice.
03
3.1 Platform Identity
Primary Language
Python 3.12
Used throughout — all agents, pipelines, APIs, financial engineering, and schema definitions. Single language reduces context-switching and simplifies CI/CD.
Agent Count
17 Agents
5 Buy-Side (BS-1 to BS-5), 6 ALM Engine (AO-1 to AO-6), 6 Supply-Side (SS-1 to SS-6). Each has a distinct framework, role, and failure mode specification.
Schema Standard
Pydantic v2
Pydantic v2 · JSON Schema draft-2020-12 · FpML 5.12 · JOSE JWS. All data contracts validated at ingestion, transformation, and output boundaries.
3.2 AI & Agent Frameworks
ALM Engine · Core Orchestration
LangGraph
Stateful, long-running, conditional routing with human checkpoints. Powers the 6 ALM Optimisation agents (AO-1 to AO-6). Chosen for 10-year swap persistence, complex state machines, and human-in-the-loop approval gates.
Stateful graphs
Human checkpoints
Conditional routing
Persistent state
Buy-Side Layer · Client Agents
AutoGen + Semantic Kernel
Multi-agent group chat with bounded session, Azure service integration, and deterministic speaker order. Powers the 5 Buy-Side agents (BS-1 to BS-5). SK plugins provide ADF, ERP, and Azure OpenAI integration.
Group chat
Azure OpenAI GPT-4o
SK plugins
Bounded sessions
Supply-Side · Data Pipelines
Dagster / Prefect
Deterministic ETL with full asset lineage, registry polling schedules, and no LLM reasoning. Powers the 6 Supply-Side agents (SS-1 to SS-6). Dagster for primary orchestration; Prefect as fallback for simpler pipeline tasks.
Asset lineage
Registry polling
Deterministic ETL
No LLM overhead
LLM Model
Azure OpenAI GPT-4o
Used exclusively for LLM reasoning tasks in Buy-Side agents (BS-1 liability interpretation, BS-3 CSR narrative). All arithmetic and deterministic operations handled by pipeline code — never by LLM.
Schema interpretation
Narrative generation
Azure-hosted
Optimisation Engine
CVXPY
Convex optimisation library for the ALM matching engine (AO-2). Minimises duration mismatch between corporate liability profiles and available NRW inventory. Generates optimal ALM match sets with confidence scores.
Convex optimisation
Duration matching
CSR maximisation
API Layer
FastAPI
All internal and external API surfaces. Auto-generates OpenAPI 3.1 documentation from Pydantic v2 models. Async handlers for high-throughput registry polling and event processing.
OpenAPI 3.1 auto-gen
Async handlers
Pydantic v2
3.3 Data & Storage
Transactional Database
PostgreSQL
Primary transactional store for all client records, NRW programmes, swap book state, proof bundles, and audit logs. ACID compliance required for financial instrument records. Azure Database for PostgreSQL (managed).
ACID compliance
Swap book state
Audit logs
Time-Series Database
InfluxDB
MRV time-series data from registry polling and VVB audit feeds. Stores NRCS scores, permanence metrics, and additionality measurements over time. Enables trend analysis for proof validation.
MRV time-series
NRCS scores
Registry data
Object Storage
Azure Blob / S3
Raw file storage for VVB audit PDFs, ISDA term sheet documents, ISSB S2 disclosure packs, and FpML XML files. Versioned, encrypted at rest. Lifecycle policies for 7-year regulatory retention.
Document storage
7-year retention
Encrypted at rest
Event Streaming
Azure Event Hub
Kafka-protocol event streaming for inter-system communication. CloudEvents 1.0 standard. Handles pipeline-to-agent handoffs, CarbonSolvencyRatio events, NRCSScoredEvents, and swap execution notifications.
Kafka protocol
CloudEvents 1.0
Agent handoffs
Data Integration
Azure Data Factory
ERP data ingestion pipeline. Connects to SAP, Oracle, and Workday for GHG inventory data. Normalises to tCO₂e standard. Triggered by BS-1 Liability Aggregator agent via SK ADFPlugin.
ERP connectors
GHG normalisation
SK plugin
Cache Layer
Azure Redis Cache
Session state for AutoGen group chat sessions. Proof bundle caching for repeated validation requests. MTM price caching for daily swap book loop. TTL-based expiry aligned to market hours.
Session state
Proof caching
MTM prices
3.4 Infrastructure & Security
Cloud Platform
Microsoft Azure
Primary cloud platform. Azure Kubernetes Service (AKS) for container orchestration. Azure Container Registry for image management. Azure Monitor + Application Insights for observability. UK South region primary, UK West DR.
AKS
UK South primary
FCA-compliant region
Authentication
Azure Managed Identity
Zero-trust service-to-service authentication. No secrets in code or environment variables. All service principals use managed identities. RBAC enforced at resource level. FCA-grade audit logging of all auth events.
Zero-trust
No secrets in code
RBAC
Certificate Signing
JOSE JWS
JSON Object Signing and Encryption (JOSE) with JSON Web Signatures (JWS) for all proof certificates, audit log entries, and swap execution records. Provides cryptographic non-repudiation required for FCA compliance.
Non-repudiation
Proof certificates
FCA compliance
CI/CD
GitHub Actions + Azure DevOps
GitHub Actions for PR validation, unit tests, and container builds. Azure DevOps for deployment pipelines to staging and production. Blue-green deployments for zero-downtime releases. Quality gates block deployment if FCA-critical tests fail.
Blue-green deploy
Quality gates
FCA-critical tests
Containerisation
Docker + Kubernetes
All services containerised. Kubernetes for orchestration via AKS. Horizontal pod autoscaling for registry polling and event processing workloads. Namespace isolation between Buy-Side, ALM Engine, and Supply-Side layers.
AKS
HPA
Namespace isolation
Observability
Azure Monitor + OpenTelemetry
Distributed tracing across all 17 agents using OpenTelemetry. Azure Monitor for infrastructure metrics. Application Insights for agent performance. Custom dashboards for swap book health, proof gate latency, and registry polling status.
Distributed tracing
Agent metrics
Swap book health
3.5 Financial Engineering Standards
Swap Instrument Format
FpML 5.12
Financial products Markup Language 5.12 for all CLS term sheet generation. Combined with JSON representation for API transport. Industry standard for OTC derivative documentation.
API Standard
OpenAPI 3.1
All internal and external APIs documented to OpenAPI 3.1. Auto-generated from FastAPI + Pydantic v2 models. Enables Allfunds Connect and JPM integration without bespoke documentation.
Event Standard
CloudEvents 1.0
All inter-system events (CarbonSolvencyRatio, NRCSScoredEvent, SwapExecuted) conform to CloudEvents 1.0 specification. Enables vendor-neutral event routing via Azure Event Hub.
Accounting Standard
IFRS 9 HTM
NRW instruments classified as Held-to-Maturity under IFRS 9. Requires Big 4 opinion. Enables NRWs to sit on corporate balance sheets as financial assets rather than operating expenses.
3.6 Testing Strategy
FCA-Critical Test Requirement
Agents marked [CRITICAL] (BS-1, BS-3, AO-1, AO-2, AO-3, AO-4) require dedicated fca_critical unit test suites. These tests must pass before any deployment to staging or production. Failure blocks the CI/CD pipeline unconditionally.
Unit Tests
pytest + hypothesis
Property-based testing for all financial calculations. Deterministic functions tested with boundary conditions. FCA-critical agents require 100% branch coverage.
Integration Tests
Testcontainers
Full pipeline integration tests using Testcontainers for Postgres, InfluxDB, and Redis. Registry API mocks for deterministic supply-side testing.
Agent Tests
LangGraph test harness
State machine replay testing for all LangGraph agents. AutoGen conversation replay for Buy-Side agent group chat scenarios. Proof gate validation with synthetic data.