// infrastructure stack
A layered reference for building production AI infrastructure. Each tier adds complexity, operational overhead, and architectural surface area. Start at the top and expand downward as your system grows. Every layer includes technology options with production-readiness signals — not popularity contests.
Static Site / Frontend
detailsAstro
Content-first static site generator. Islands architecture, zero JS by default. Best for blogs, docs, marketing sites.
Cloudflare Pages
Global edge deployment, free tier, automatic HTTPS, instant rollback. Pairs with Astro natively.
Next.js / Remix
Full-stack React frameworks. SSR, API routes, middleware. More complexity, more capability.
SvelteKit
Lightweight framework, less boilerplate. Growing ecosystem. Good for interactive apps with less JS overhead.
Data / Storage
detailsSQLite
Embedded, zero-config, single-file. Ideal for single-server apps, local dev, Ghost CMS. Scales to medium traffic.
PostgreSQL
Production relational database. Extensions, JSONB, full-text search. Standard choice when you outgrow SQLite.
R2 Object Storage
S3-compatible, no egress fees. Images, assets, backups. Integrated with Cloudflare ecosystem.
Redis / KV
In-memory cache, session store, rate limiting, pub/sub. Cloudflare KV for edge-cached key-value.
Authentication / Identity
detailsClerk
Managed auth, MFA, social providers, organization management. Generous free tier, embeddable components.
Auth.js / NextAuth
Open-source auth for any framework. 70+ providers, database adapters, JWT/session. Self-hostable.
Supabase Auth
Built on PostgreSQL Row-Level Security. Free tier, integrates with Supabase DB, realtime, storage.
Zitadel
Self-hosted identity platform. OIDC, SAML, LDAP, custom domains, audit logs. Enterprise-grade, open-source.
Backend / API Services
detailsHono
Lightweight, ultrafast web framework. Works on Cloudflare Workers, Deno, Bun. TypeScript-first, middleware-rich.
FastAPI
Python async API framework. Auto-generated OpenAPI docs, Pydantic validation. Preferred for AI/ML service backends.
tRPC
End-to-end typesafe APIs. No schema generation — your function types ARE the API contract. Full-stack TypeScript.
Pulumi / Terraform
Infrastructure as Code. Pulumi uses real programming languages (Python, TS, Go). Terraform is HCL-based.
Search / Content Management
detailsGhost CMS
Headless CMS for content. SQLite-backed, webhook-friendly, member management. Used for ToolBrain.
Pagefind
Static search index. Zero server, runs at build time. Integrated with Astro, no external service needed.
SearXNG
Self-hosted metasearch engine. No tracking, no ads. Useful for agent tool-calling and research pipelines.
Meilisearch
Rust-based search engine. Typo-tolerant, instant, filtering/faceting. Self-host or managed cloud.
Observability / Analytics
detailsGoatCounter
Privacy-first web analytics. No cookies, no tracking. Simple dashboard, self-hostable. Lightweight JS snippet.
OpenTelemetry
Observability standard. Traces, metrics, logs. Vendor-neutral — export to any backend (Grafana, Datadog, SigNoz).
Grafana + Loki
Metrics + logs stack. Grafana for dashboards, Loki for log aggregation. Self-hosted or Grafana Cloud.
SigNoz
Open-source APM. Distributed tracing, metrics, logs in one place. OpenTelemetry-native. Self-hostable.
AI / Agent Frameworks
detailsLangGraph
Graph-based stateful agent orchestration. 36K+ stars, 34.5M monthly downloads. Best for complex multi-step workflows with branching state.
CrewAI
Multi-agent role-based coordination. 53K stars, 27M+ PyPI downloads, 2B+ agent executions. DocuSign, IBM, PwC in production.
Microsoft Agent Framework
Unified Semantic Kernel + AutoGen. GA April 2026. Production SDK with Azure integration, enterprise governance, and .NET/Python/Java support.
Dify
Visual AI platform. 144K stars, $30M Series Pre-A, 280+ enterprises. Drag-and-drop workflow builder, RAG pipelines, model management.
Haystack
Enterprise NLP pipelines. Strong observability, pipeline tracing, component library. Mature for document processing and search systems.
Pydantic AI
Type-safe production agents. Pydantic-validated structured outputs, dependency injection, logfire observability. Fast-growing ecosystem.
Agent Infrastructure / Orchestration
detailsHermes Agent
AI agent framework powering this blog empire. Cron-driven content pipelines, multi-model arena, MCP tools, gateway bots, 17K+ test suite.
MCP Protocol
Model Context Protocol — standardized tool-calling interface. Growing ecosystem: databases, APIs, file systems as MCP servers.
OpenAI Agents SDK
Lightweight agent framework. Handoffs, guardrails, tracing. Simpler than LangGraph, good for single-agent tasks.
Temporal / Inngest
Durable execution for agent workflows. Retries, state recovery, long-running processes. When cron isn't enough.
Agno
High-performance agent framework (formerly Phidata). 41K+ stars, v2.7.3. Multi-modal, AgentOS runtime, multi-agent teams. Claims 5,000× faster instantiation than LangGraph.
// infrastructure decisions for this blog empire
This stack reference is also a live decision record. Each green-taggedtechnology is currently in use. As the empire grows, expansion generally movesdownward — adding data, auth, backend, then AI orchestration as needed.
Current expansion candidates (based on gap analysis):
- L3 — Authentication: Required before adding gated content, paid subscriptions, or user-specific agent sessions. Clerk has the lowest integration overhead.
- L4 — Backend: Needed when cron-driven pipelines need interactive user input or real-time response. Hono on Workers keeps the footprint small.
- L7–L8 — AI orchestration: The Hermes Cron + arena-direct-runner pattern is already proven. Formalizing with LangGraph or Temporal becomes relevant when multi-agent workflows exceed single-script complexity.
→ Agent harness architecture ·→ Durable execution patterns ·→ MCP vs A2A vs function calling