Docs/Architecture/Platform Overview

Platform Overview

SkyKoi as the orchestration layer for AI agents on dedicated EC2 instances.

SkyKoi sits between your business and the cloud infrastructure. It's the orchestration layer that turns "I want an AI agent" into a fully provisioned, dedicated server running your personal assistant.

Architecture Diagram

text
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 SKYKOI PLATFORM                   โ”‚
โ”‚                                                   โ”‚
โ”‚  Dashboard โ”€โ”€โ–ถ API โ”€โ”€โ–ถ EC2 Provisioner            โ”‚
โ”‚      โ”‚              โ”‚                              โ”‚
โ”‚      โ”‚         Clerk Auth ยท Stripe Billing         โ”‚
โ”‚      โ”‚              โ”‚                              โ”‚
โ”‚      โ–ผ              โ–ผ                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚
โ”‚  โ”‚      AWS Infrastructure              โ”‚          โ”‚
โ”‚  โ”‚  EC2 Instances (t3.small)            โ”‚          โ”‚
โ”‚  โ”‚  IAM Instance Profiles               โ”‚          โ”‚
โ”‚  โ”‚  Security Groups                     โ”‚          โ”‚
โ”‚  โ”‚  User-Data Provisioning              โ”‚          โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚
โ”‚             โ”‚                                      โ”‚
โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                             โ”‚
โ”‚    โ–ผ        โ–ผ        โ–ผ                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”  Dedicated Instances      โ”‚
โ”‚  โ”‚EC2 โ”‚  โ”‚EC2 โ”‚  โ”‚EC2 โ”‚  (1 per user)             โ”‚
โ”‚  โ”‚ #1 โ”‚  โ”‚ #2 โ”‚  โ”‚ #3 โ”‚                           โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”˜                           โ”‚
โ”‚    โ”‚        โ”‚        โ”‚                             โ”‚
โ”‚  Agent   Agent    Agent  (Claude Opus 4.6          โ”‚
โ”‚                           via AWS Bedrock)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

What SkyKoi Manages

  • โ€ขEC2 Provisioning โ€” Launches dedicated t3.small instances with Ubuntu 22.04 and a user-data script that installs everything automatically
  • โ€ขConfig Generation โ€” config-generator.ts creates valid agent config with Bedrock model config, token auth, and Gateway settings
  • โ€ขWorkspace Provisioning โ€” Seeds agent workspaces with AGENTS.md, SOUL.md, USER.md, TOOLS.md, and IDENTITY.md
  • โ€ขTLS & Networking โ€” nginx reverse proxy with self-signed TLS (port 443 โ†’ localhost:18789)
  • โ€ขIAM & Security โ€” Instance profile skykoi-tenant-agent-profile for Bedrock access, security groups for network control
  • โ€ขBilling โ€” Maps Stripe subscriptions to resource allocation and usage tracking
  • โ€ขMonitoring โ€” Tracks Gateway health, agent status, and token usage

What the Agent Runtime Handles

  • โ€ขGateway Daemon โ€” Long-lived systemd service managing the WebSocket API, message routing, and session state
  • โ€ขAgent Runtime โ€” Claude Opus 4.6 via AWS Bedrock with workspace files, JSONL sessions, tools (exec/read/write/browser/etc.), and skills
  • โ€ขMessage Processing โ€” Queuing, debouncing, streaming, block chunking, and delivery
  • โ€ขAutomation โ€” Heartbeats, cron jobs, and proactive agent actions
  • โ€ขTool Execution โ€” Full shell access (exec.security: "full"), web browsing, file operations, and more

๐Ÿ’กSkyKoi adds the business layer (auth, billing, provisioning, monitoring) on top of the agent engine. The agent runtime provides full-featured AI capabilities out of the box.