Skip to main content

Architecture Overview

STOA Platform is designed as a cloud-native, multi-tenant gateway platform built for both traditional APIs and AI agents.

High-Level Architecture​

STOA follows a Control Plane / Data Plane separation pattern, similar to Kubernetes and Istio.

Control Plane vs Data Plane​

AspectControl PlaneData Plane
RoleConfiguration & ManagementTraffic Execution
ComponentsCore API, Portal, ConsoleMCP Gateway, webMethods
LatencyHuman-scale (ms OK)Machine-scale (sub-ms)
ScalingModerateHigh (per-request)
Architecture Decision

This separation is documented in ADR-001: API Exposure Strategy.

Core Components​

Control Plane API​

The central management API built with Python and FastAPI.

AspectDetails
LanguagePython 3.12+
FrameworkFastAPI (async)
DatabasePostgreSQL + SQLAlchemy
Event StreamingKafka/Redpanda
AuthKeycloak (OIDC)

Responsibilities:

  • Subscription management
  • Tenant provisioning
  • Tool catalog
  • Usage tracking
  • Policy enforcement

MCP Gateway​

The MCP Gateway handles Model Context Protocol interactions, enabling AI agents to securely consume enterprise tools.

AspectCurrent Implementation
LanguagePython 3.12+
FrameworkFastAPI (async)
Policy EngineOPA (Open Policy Agent)
ProtocolMCP (Model Context Protocol)

Responsibilities:

  • MCP protocol handling
  • Request routing
  • Authentication validation
  • Rate limiting
  • Metrics collection
Future Roadmap

A high-performance Rust + Tokio implementation is planned for Q4 2026, bringing kernel-level eBPF acceleration. See our Roadmap for details.

API Gateway​

Traditional API traffic is handled by webMethods Gateway (current implementation).

AspectDetails
ProductSoftware AG webMethods
FeaturesRate limiting, transformations, policies
ProtocolREST, SOAP
Future Roadmap

Migration to a native Rust/eBPF gateway is planned for Phase 16+, providing improved performance and reduced operational overhead.

Portal UI​

Self-service developer portal built with React and TypeScript.

Features:

  • API/Tool catalog browsing
  • Subscription management
  • API key generation
  • Usage dashboards
  • Documentation access

Console UI​

Admin management console built with React and TypeScript.

Features:

  • Tenant management
  • User administration
  • Policy configuration
  • System monitoring
  • Audit logs

Security Layer​

Keycloak​

Identity and access management providing:

  • OIDC/OAuth2 authentication
  • SSO (Single Sign-On)
  • RBAC (Role-Based Access Control)
  • Multi-factor authentication
  • User federation

HashiCorp Vault​

Secrets management for:

  • API key encryption
  • Database credentials
  • TLS certificates
  • Service tokens

Data Layer​

PostgreSQL​

Primary database storing:

  • Subscriptions
  • Tenants
  • Users
  • Tool definitions
  • Audit logs

Kafka/Redpanda​

Event streaming for:

  • Audit events
  • Usage metrics
  • Cross-service communication
Internal Only

Kafka is strictly internal with zero external exposure (ADR-017). All external integrations use REST APIs.

Observability Stack​

ComponentPurpose
PrometheusMetrics collection
GrafanaDashboards & visualization
LokiLog aggregation
AlertmanagerAlert routing

Request Flow​

  1. AI Agent sends a tool invocation request with an API key
  2. MCP Gateway validates the API key against Keycloak
  3. Gateway checks subscription status with Control Plane API
  4. Control Plane verifies the subscription is active
  5. Gateway forwards the request to the appropriate MCP Server
  6. MCP Server executes the tool and returns the response
  7. Gateway returns the response to the AI Agent

Deployment​

STOA Platform runs on Kubernetes and can be deployed using:

  • Helm Charts: Available in stoa-infra/charts/
  • GitOps: ArgoCD compatible
  • IaC: Terraform modules available

Kubernetes Namespace​

All components run in the stoa-system namespace:

kubectl get pods -n stoa-system

Ingress Endpoints​

ServiceURL Pattern
Portalportal.<domain>
Consoleconsole.<domain>
APIapi.<domain>
Gatewaygateway.<domain>
Authauth.<domain>

Technology Stack Summary​

LayerTechnologyNotes
Control PlanePython, FastAPIManagement API
MCP GatewayPython, FastAPI, OPAMCP protocol handling
API GatewaywebMethodsTraditional API traffic
FrontendReact, TypeScript, TailwindPortal & Console
DatabasePostgreSQLPrimary data store
Event StreamingKafka/RedpandaInternal events
StreamingKafka/RedpandaInternal events
AuthKeycloakOIDC/OAuth2
SecretsHashiCorp VaultEncryption, credentials
ObservabilityPrometheus, Grafana, LokiMetrics, logs
InfrastructureKubernetes, Helm, ArgoCDDeployment

Next Steps​