Skip to main content

Platform Architecture

This guide provides a comprehensive overview of the ASCEND platform architecture, helping you understand how components interact and how to design integrations effectively.

High-Level Architecture

ASCEND follows a layered architecture designed for enterprise-scale deployments:

┌──────────────────────────────────────────────────────────────────────────────┐
│ CLIENT LAYER │
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ │
│ │ Python SDK │ │ Node.js SDK │ │ Boto3 Wrapper │ │
│ │ (ascend-ai) │ │ (@ascend-ai/sdk) │ │ (ascend-boto3) │ │
│ └───────┬────────┘ └───────┬────────┘ └───────┬────────┘ │
│ │ │ │ │
│ └───────────────────┴───────────────────┘ │
│ │ │
│ ┌───────────────────────────▼───────────────────────────────────────────┐ │
│ │ REST API (HTTPS) │ │
│ │ https://pilot.owkai.app/api │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────┐
│ GATEWAY LAYER │
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ │
│ │ AWS ALB │ │ Rate Limiter │ │ WAF Rules │ │
│ │ (Load Balancer)│ │ (SlowAPI+Redis)│ │ │ │
│ └───────┬────────┘ └───────┬────────┘ └───────┬────────┘ │
│ └───────────────────┴───────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────┐
│ APPLICATION LAYER │
│ │
│ ┌─────────────────────────────────────────────────────────────────────────┐ │
│ │ FastAPI Application │ │
│ │ │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐ │ │
│ │ │ Auth │ │ Action │ │ Policy │ │ Alert │ │ │
│ │ │ Routes │ │ Routes │ │ Routes │ │ Routes │ │ │
│ │ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └──────┬──────┘ │ │
│ │ │ │ │ │ │ │
│ │ ┌──────▼─────────────────▼─────────────────▼─────────────────▼──────┐ │ │
│ │ │ SERVICE LAYER │ │ │
│ │ │ │ │ │
│ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │
│ │ │ │ Token │ │ Policy │ │ Risk │ │ │ │
│ │ │ │ Service │ │ Engine │ │ Calculator │ │ │ │
│ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │ │
│ │ │ │ │ │
│ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │
│ │ │ │ Audit │ │ Approval │ │ Workflow │ │ │ │
│ │ │ │ Service │ │ Service │ │ Engine │ │ │ │
│ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │ │
│ │ │ │ │ │
│ │ └────────────────────────────────────────────────────────────────────┘ │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────┐
│ DATA LAYER │
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ │
│ │ PostgreSQL │ │ Redis │ │ S3 │ │
│ │ (RDS 15+) │ │ (ElastiCache) │ │ (Audit Logs) │ │
│ │ │ │ │ │ │ │
│ │ • Row-Level │ │ • Session │ │ • WORM Storage │ │
│ │ Security │ │ Cache │ │ • Compliance │ │
│ │ • Multi-tenant │ │ • Rate Limits │ │ Exports │ │
│ └────────────────┘ └────────────────┘ └────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────┘

Component Details

Client Layer

The client layer provides multiple integration options for connecting to ASCEND.

SDKs

SDKLanguagePackageKey Features
PythonPython 3.9+ascend-ai-sdkAsync support, circuit breaker, MCP integration
Node.jsNode 18+@ascend-ai/sdkTypeScript, Promise-based, streaming
Boto3 WrapperPythonascend-boto3-wrapperZero-code AWS governance

Direct API

For languages without SDK support, use the REST API directly:

# Example: Evaluate an action
curl -X POST https://pilot.owkai.app/api/authorization/agent-action \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "my-agent",
"action_type": "data_access",
"resource": "customer_db",
"action_details": {"query": "SELECT * FROM users"}
}'

Gateway Layer

The gateway layer handles authentication, rate limiting, and security.

Authentication Methods

MethodUse CaseHeader
API KeyProgrammatic access (SDKs, scripts)X-API-Key: your_key
JWT TokenUser sessions (console, OAuth)Authorization: Bearer token
CognitoSSO/SAML integrationCognito JWT

Rate Limiting

Rate limits protect the platform and ensure fair usage:

TierRequests/SecondBurstHeaders
Standard100200X-RateLimit-Limit, X-RateLimit-Remaining
Enterprise10002000Customizable

The SDK automatically handles rate limiting with exponential backoff.

Application Layer

The application layer contains the core business logic.

API Routes (200+ Endpoints)

CategoryEndpointsPurpose
Authentication30+Login, logout, token management, MFA
Agent Actions20+Action submission, evaluation, status
Agent Registry12Agent registration and management
Policies15+Policy CRUD and evaluation
Alerts14+Alert management and acknowledgment
Analytics25+Dashboards, metrics, reporting
Admin60+Organization, user, billing management
Webhooks10Event notification configuration

Service Layer

Critical services that power the platform:

Token Service

  • RS256 JWT token generation and validation
  • Multi-pool Cognito support
  • Token refresh and revocation

Policy Engine

  • Rule evaluation and matching
  • Conflict detection
  • Priority-based processing

Risk Calculator

  • Multi-factor risk assessment
  • ML-based prediction (optional)
  • Custom risk model support

Audit Service

  • Immutable WORM logging
  • Hash-chain integrity
  • Compliance export (SOC 2, HIPAA)

Data Layer

The data layer provides persistent storage with enterprise-grade security.

PostgreSQL Database

FeatureImplementation
Multi-tenancyRow-Level Security (RLS) with org_id
EncryptionAES-256 at rest, TLS 1.3 in transit
BackupAutomated daily backups, 30-day retention
High AvailabilityMulti-AZ deployment

Core Tables (28+)

organizations        # Tenant information
users # User accounts
api_keys # Hashed API keys (SHA-256)
agents # Registered agents
agent_actions # Action history
pending_agent_actions # Actions awaiting approval
enterprise_policies # Policy definitions
alerts # Security alerts
log_audit_trails # Immutable audit logs

Redis Cache

Use CaseTTLPurpose
Session data30 minUser session management
Rate limits1 minRequest throttling
Policy cache5 minReduce database load
JWT validation15 minToken verification caching

S3 Storage

BucketPurposeRetention
Audit LogsWORM compliance storage7 years
Compliance ExportsSOC 2, HIPAA reports5 years
BackupsDisaster recovery90 days

Request Flow

Understanding the request flow helps you design effective integrations.

Action Evaluation Flow

1. SDK Request
┌─────────────────────────────────────────────────────────┐
│ client.evaluate_action( │
│ action_type="database.query", │
│ resource="production_db", │
│ parameters={"sql": "SELECT * FROM users"} │
│ ) │
└─────────────────────────────────────────────────────────┘


2. Authentication (Gateway)
┌─────────────────────────────────────────────────────────┐
│ • Validate API key │
│ • Check rate limits │
│ • Verify organization membership │
└─────────────────────────────────────────────────────────┘


3. Authorization Route (Application)
┌─────────────────────────────────────────────────────────┐
│ POST /api/authorization/agent-action │
│ • Parse request body │
│ • Validate input schema │
│ • Extract organization context │
└─────────────────────────────────────────────────────────┘


4. Policy Evaluation (Service)
┌─────────────────────────────────────────────────────────┐
│ Policy Engine │
│ • Load applicable policies │
│ • Match conditions against action │
│ • Determine highest-priority match │
└─────────────────────────────────────────────────────────┘


5. Risk Calculation (Service)
┌─────────────────────────────────────────────────────────┐
│ Risk Calculator │
│ • Base score from action type │
│ • Adjust for resource sensitivity │
│ • Factor in agent trust level │
│ • Apply historical behavior modifiers │
└─────────────────────────────────────────────────────────┘


6. Decision (Service)
┌─────────────────────────────────────────────────────────┐
│ • Combine policy result + risk score │
│ • Generate action_id │
│ • If pending: create approval request │
│ • Create audit log entry │
└─────────────────────────────────────────────────────────┘


7. Response
┌─────────────────────────────────────────────────────────┐
│ { │
│ "action_id": "act_abc123", │
│ "decision": "allowed", │
│ "risk_score": 35, │
│ "reason": "Policy: Allow read-only queries" │
│ } │
└─────────────────────────────────────────────────────────┘

Approval Flow

When an action requires approval:

1. Pending Decision Returned
┌──────────────────────────────────────┐
│ decision: "pending" │
│ approval_request_id: "apr_xyz789" │
│ required_approvers: ["finance-mgr"] │
└──────────────────────────────────────┘


2. Notification Sent
┌──────────────────────────────────────┐
│ • Slack notification │
│ • Email to approvers │
│ • Console alert │
└──────────────────────────────────────┘


3. Approver Reviews (Console)
┌──────────────────────────────────────┐
│ • View action details │
│ • See risk assessment │
│ • Review context │
│ • Approve or Deny │
└──────────────────────────────────────┘


4. Agent Notified
┌──────────────────────────────────────┐
│ • Webhook callback (if configured) │
│ • Poll status endpoint │
│ • client.wait_for_decision() │
└──────────────────────────────────────┘


5. Action Proceeds (if approved)

Security Architecture

ASCEND implements defense-in-depth security:

Security Layers

┌───────────────────────────────────────────────────────────────────┐
│ Layer 1: Network Security │
│ • VPC isolation │
│ • Security groups │
│ • WAF rules │
│ • DDoS protection │
└───────────────────────────────────────────────────────────────────┘


┌───────────────────────────────────────────────────────────────────┐
│ Layer 2: Transport Security │
│ • TLS 1.3 encryption │
│ • Certificate pinning (SDKs) │
│ • HSTS headers │
└───────────────────────────────────────────────────────────────────┘


┌───────────────────────────────────────────────────────────────────┐
│ Layer 3: Authentication │
│ • API key validation (SHA-256) │
│ • RS256 JWT verification │
│ • MFA support │
└───────────────────────────────────────────────────────────────────┘


┌───────────────────────────────────────────────────────────────────┐
│ Layer 4: Authorization │
│ • RBAC (6 levels) │
│ • Row-Level Security │
│ • Organization isolation │
└───────────────────────────────────────────────────────────────────┘


┌───────────────────────────────────────────────────────────────────┐
│ Layer 5: Data Security │
│ • AES-256 encryption at rest │
│ • BYOK/CMK support │
│ • Secret management (AWS Secrets Manager) │
└───────────────────────────────────────────────────────────────────┘


┌───────────────────────────────────────────────────────────────────┐
│ Layer 6: Audit & Compliance │
│ • Immutable audit logs │
│ • Hash-chain integrity │
│ • WORM storage │
└───────────────────────────────────────────────────────────────────┘

RBAC Hierarchy

RoleLevelPermissions
Viewer1Read-only access to dashboards
Analyst2View actions, alerts, and reports
Operator3Approve/deny actions, manage alerts
Manager4Configure policies, manage agents
Admin5Full organization management
Super Admin6System-wide administration

Deployment Architecture

AWS Infrastructure

┌────────────────────────────────────────────────────────────────────┐
│ AWS Cloud (us-east-2) │
│ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ VPC │ │
│ │ │ │
│ │ ┌─────────────────────┐ ┌─────────────────────┐ │ │
│ │ │ Public Subnet │ │ Private Subnet │ │ │
│ │ │ │ │ │ │ │
│ │ │ ┌───────────────┐ │ │ ┌───────────────┐ │ │ │
│ │ │ │ ALB │──┼────┼─▶│ ECS Fargate │ │ │ │
│ │ │ │ │ │ │ │ (FastAPI) │ │ │ │
│ │ │ └───────────────┘ │ │ └───────┬───────┘ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ┌───────────────┐ │ │ ┌───────▼───────┐ │ │ │
│ │ │ │ NAT GW │──┼────┼─▶│ ElastiCache │ │ │ │
│ │ │ │ │ │ │ │ (Redis) │ │ │ │
│ │ │ └───────────────┘ │ │ └───────────────┘ │ │ │
│ │ │ │ │ │ │ │
│ │ └─────────────────────┘ │ ┌───────────────┐ │ │ │
│ │ │ │ RDS Postgres │ │ │ │
│ │ │ │ (Multi-AZ) │ │ │ │
│ │ │ └───────────────┘ │ │ │
│ │ │ │ │ │
│ │ └─────────────────────┘ │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Cognito │ │ Secrets │ │ S3 │ │ CloudWatch│ │
│ │ │ │ Manager │ │ │ │ │ │
│ └───────────┘ └───────────┘ └───────────┘ └───────────┘ │
│ │
└────────────────────────────────────────────────────────────────────┘

Scalability

ComponentScaling StrategyCapacity
API ServersECS auto-scaling2-20 instances
DatabaseVertical + Read ReplicasUp to db.r6g.16xlarge
CacheRedis Cluster3-6 nodes
StorageS3Unlimited

Integration Points

Gateway Integrations

GatewayIntegrationUse Case
AWS API GatewayLambda AuthorizerServerless APIs
KongCustom PluginAPI management
Envoy/Istioext_authzService mesh
NGINXAuth subrequestTraditional proxies

Notification Channels

ChannelEventsConfiguration
SlackAll alert typesWebhook URL
Microsoft TeamsAll alert typesWebhook URL
EmailCritical alertsSMTP or SES
WebhooksCustom eventsHTTPS endpoint

SIEM Integration

PlatformProtocolData Format
SplunkHEC (HTTPS)JSON
IBM QRadarSyslogCEF
Microsoft SentinelLog Analytics APIJSON

Performance Characteristics

Latency Targets

Operationp50p99Target
Action evaluation15ms50ms<100ms
Policy lookup5ms15ms<25ms
Risk calculation10ms30ms<50ms
Audit write2ms8ms<15ms

Throughput

TierActions/SecondConcurrent Agents
Standard10050
Professional500200
Enterprise2000+Unlimited

Next Steps

Now that you understand the architecture:

  1. Register Your First Agent: Connect your agent to ASCEND
  2. Create Your First Policy: Define governance rules
  3. Evaluate Your First Action: See the flow in action

Last Updated: 2026-01-20