RISING_SUN BIOS v3.14
Copyright (C) 2025 Rising Sun Industries
Initializing system...
Memory check: 64GB OK
Loading kernel modules...
[OK] display.driver
[OK] network.stack
[OK] ascii.renderer
[OK] terminal.emulator
Mounting filesystems...
/dev/projects mounted
/dev/updates mounted
/dev/portfolio mounted
Starting services...
creativity.daemon [RUNNING]
code.compiler [RUNNING]
caffeine.monitor [CRITICAL]
System ready.
Welcome to RISING_SUN
Press any key to skip...

AAASP

BETA

Agent-as-a-Service Platform for multi-tenant AI deployment

#ai#elixir#infrastructure#agents#multi-tenant#otp
>View One-Pager

AAASP (Agent-as-a-Service Platform) is multi-tenant infrastructure for AI agent deployment. Built on Elixir/OTP, it handles the hard parts: session memory that persists across runs, async job queuing, per-provider HTTP pools, and usage-based billing — so agent builders focus on behavior, not infrastructure.

Core Architecture

**OTP supervision tree** gives AAASP production-grade reliability: - `DynamicSupervisor` spawns isolated agent processes per tenant - `GenServer` per active session with automatic cleanup after 30-minute idle - `Registry` provides unique naming for session lookup - `Oban` job queue with persistent PostgreSQL backing for runs, webhooks, and billing

Key Features

  • >Session Memory: Per-session GenServer with Merkle-checkpointing every 20 messages — context survives restarts
  • >Multi-Provider Routing: Anthropic, OpenAI, DeepSeek, Together, Groq, Fireworks — swappable per agent deployment
  • >Async Run Model: 202 Accepted → PubSub streaming for sync clients; batch endpoint for N-prompt atomic jobs
  • >RunBatcher: GenServer buffers 200 entries into single `insert_all` — 15.9 → 65 req/s (+300% throughput)
  • >ETS Tenant Cache: 60-second TTL with `read_concurrency: true` — sub-microsecond auth lookups
  • >Credential Vaults: Cloak AES-GCM encryption for stored provider API keys

Performance Profile

Benchmarked at 200 concurrent connections on a single node: - **~65–70 req/s** sustained throughput - **Sub-microsecond** tenant auth via ETS cache - **Single `insert_all`** per batch via RunBatcher (vs N individual inserts) - **Cross-node coordination** via Oban PG notifier for multi-node deployments

API Surface

EndpointFunction
POST /v1/runsSubmit single agent run (async or sync)
POST /v1/batchesSubmit N runs as atomic batch
GET /v1/sessionsList active sessions with memory state
POST /v1/agentsRegister agent with provider config
POST /v1/deploymentsDeploy agent to tenant with billing config

Dashboard

Phoenix LiveView dashboard with real-time OTP process tree visualization, Oban queue monitoring, per-tenant usage metrics, and live run state streaming.

Tech Stack

Elixir/Phoenix with Oban for background jobs. Finch HTTP/2 connection pools per provider. PostgreSQL with Ecto ORM. Phoenix LiveView for the dashboard. Cloak for credential encryption. Bandit HTTP server on port 8002.