P
PAGE

Architecture

Event-driven orchestration running on AWS. Claude reasons, Python orchestrates, humans approve. Here's everything that's actually deployed.

Design Principles

โšก

Event-Driven, Not Autonomous

Every action starts with an external event (Slack message, email, JIRA ticket, cron schedule). PAGE never acts on her own impulse โ€” deterministic Python workflows with Claude as the reasoning engine.

๐Ÿง 

LLM as Brain, Not Orchestrator

Claude generates content and classifies intent, but control flow is always in Python code. No ReAct loops, no tool-calling chains. The orchestrator decides what to do; Claude decides how.

๐Ÿ”

Graduated Autonomy

Every content output flows through Slack approval gates. As reliability is demonstrated over time, approval thresholds relax. Trust is earned incrementally, never assumed.

๐Ÿ“‹

Auditable & Debuggable

Structured logging on every handler call. Full JIRA ticket lifecycle tracking. Every Claude API call logged with token counts. No black boxes โ€” every decision is traceable.

How a Task Flows Through PAGE

From external event to published content โ€” every step is deterministic, logged, and human-approved.

1

Intake

External event arrives via webhook or schedule

Slack message โ†’ Lambda โ†’ SQS, Gmail โ†’ Lambda โ†’ SQS, JIRA webhook โ†’ Lambda โ†’ SQS, EventBridge cron โ†’ SQS

โ–ผ
2

Queue

Message lands in the right SQS queue

6 task queues (content, community, feedback, growth, meeting, report) with DLQs for failed messages

โ–ผ
3

Orchestrate

Orchestrator polls SQS, classifies intent

Intent classifier uses Claude to score confidence โ†’ task rubric validates required fields โ†’ dispatches to the right handler

โ–ผ
4

Execute

Handler generates content via Claude

Blog drafts (800-1500 words), social posts (300 chars ร— 3 platforms), email replies, code gists, Slack reports

โ–ผ
5

Approve

Slack approval gate with approve/reject/revise

Content preview posted to Slack โ†’ human clicks Approve, Reject, or Request Revision โ†’ action recorded in JIRA

โ–ผ
6

Publish

Approved content pushed to destination

Blog โ†’ GitHub Actions rebuild โ†’ S3 + CloudFront. Social โ†’ Bluesky/LinkedIn/Threads APIs. Email โ†’ Gmail API

Live Infrastructure

Everything below is deployed and running in AWS us-east-1. Managed by Terraform (10 modules, ~80 resources).

Compute & API

FastAPI Backend
Python 3.12 ยท Uvicorn

Core orchestrator, webhook router, blog API โ€” runs on ECS Fargate behind API Gateway

ECS Fargate Cluster
6 worker services

Content, Community, Feedback, Growth, Meeting, and Report workers โ€” each a dedicated task definition

Lambda Webhook Router
API Gateway โ†’ Lambda โ†’ SQS

Receives Slack interactions, JIRA webhooks, and scheduled events โ€” routes to SQS queues

Messaging & Events

SQS Task Queues
6 queues + 6 DLQs

content-tasks, community-tasks, feedback-tasks, growth-tasks, meeting-tasks, report-tasks โ€” each with a dead-letter queue

EventBridge Scheduler
Cron-based triggers

Fires scheduled tasks (daily reports, weekly summaries) into SQS queues

Data & Storage

PostgreSQL + pgvector
RDS db.t3.micro ยท us-east-1

Tasks, BlogPosts, content pipeline state, and 1536-dim embeddings for semantic memory and RAG

S3 Storage
3 buckets

content-drafts (working artifacts), published-artifacts (final outputs), meeting-recordings (Recall.ai transcripts)

Secrets Manager
AWS Secrets Manager

API keys for Claude, Slack, Gmail, JIRA, GitHub, Bluesky, LinkedIn โ€” rotated and encrypted at rest

Frontend & CDN

page.nomis-ai.com
Next.js 16 ยท Static Export

Main site โ€” features, architecture, about. Served from S3 via CloudFront with HTTP/2+3

page-blog.nomis-ai.com
Next.js 16 ยท Static Export

Blog โ€” posts built at deploy time from PostgreSQL. Rebuilds automatically when a post is approved

CloudFront CDN
2 distributions ยท OAC

PriceClass_100, TLS 1.2+, origin access control for S3. ACM cert covers both subdomains

Route 53 DNS
nomis-ai.com zone

A-alias records for both subdomains, MX for Gmail, ACM validation CNAMEs

CI/CD Pipeline

GitHub Actions
OIDC ยท pages-code/PAGE

On push to main or workflow_dispatch โ†’ build โ†’ S3 sync โ†’ CloudFront invalidation

IAM Deploy Role
OIDC federation

Scoped to pages-code/PAGE main branch โ€” S3 put/delete + CloudFront invalidation only

Monitoring & Alerting

CloudWatch Alarms
SNS โ†’ Email

DLQ message alerts, RDS CPU/storage, API Gateway 5xx rate, ECS task failures

CloudWatch Dashboard
Unified metrics

SQS queue depths, API latency, DB connections, Lambda invocations โ€” single-pane view

Integration Map

13+ external services connected via APIs, webhooks, and protocols.

Intake

SlackEvents API + Socket Mode
GmailGoogle Workspace service account
JIRAWebhooks + REST API
EventBridgeCron schedule rules

AI & Reasoning

Claude (Anthropic)Messages API ยท claude-sonnet-4-20250514
pgvector1536-dim embeddings ยท cosine similarity

Publishing

BlueskyAT Protocol ยท createRecord
LinkedInUGC Posts API ยท OAuth 2.0
ThreadsMeta Graph API
GitHubREST API ยท Gists + workflow_dispatch
GmailGoogle Workspace ยท send

Meetings & Media

Recall.aiMeeting bot + transcription
HeyGenInteractive Avatar API
ElevenLabsText-to-Speech streaming

Infrastructure as Code

10
Terraform modules
~80
AWS resources
1
AWS account
us-east-1
Region
โ†’modules/networking โ€” VPC, subnets, security groups
โ†’modules/database โ€” RDS PostgreSQL + pgvector
โ†’modules/storage โ€” S3 buckets (drafts, artifacts, recordings)
โ†’modules/messaging โ€” SQS queues + EventBridge
โ†’modules/secrets โ€” Secrets Manager entries
โ†’modules/compute โ€” ECS cluster, ECR repos, IAM roles
โ†’modules/api โ€” API Gateway + Lambda webhook router
โ†’modules/monitoring โ€” CloudWatch alarms + dashboard
โ†’modules/static-sites โ€” S3 + CloudFront + ACM + Route 53
โ†’modules/cicd โ€” GitHub OIDC + IAM deploy role