packages/eve-world-aws/README.md

@portfolio/eve-world-aws

A custom Workflow World backing eve's durable runtime with DynamoDB + SQS + S3 — so an eve agent runs on AWS Lambda (scale-to-zero, same account as the OpenNext portfolio; no Vercel, no cross-cloud hop, no local .workflow-data disk dependency).

Status: implemented. Storage, queueing, and live streaming are backed by DynamoDB, SQS, and S3. The method-by-method mapping and remaining live-run verification live in SPEC.md.

Why this exists

eve's default off-Vercel "world" persists run state on local disk, which is why real-eve can't run on Lambda as-is. Eve exposes pluggable worlds (experimental.workflow.world), so we externalize all state (event log, queue, hooks, streams) to AWS primitives and recover true serverless. The ecosystem ships only Postgres + Vercel worlds today — this is effectively @workflow/world-aws.

Use from an eve agent

// agent/agent.ts (Eve 0.22.4)
import { anthropic } from '@ai-sdk/anthropic';
import { defineAgent } from 'eve';

export default defineAgent({
  model: anthropic('claude-opus-4.8'),
  experimental: { workflow: { world: '@portfolio/eve-world-aws' } },
});

Config comes from env (see src/config.ts): EVE_WORLD_TABLE, EVE_WORLD_QUEUE_URL, EVE_WORLD_BUCKET, EVE_WORLD_DELIVERY_BASE_URL, EVE_WORLD_DEPLOYMENT_ID, AWS_REGION.

Develop

pnpm install          # pulls Eve-compatible Workflow SDK pins + AWS SDK v3
pnpm --filter @portfolio/eve-world-aws typecheck
pnpm --filter @portfolio/eve-world-aws build

The reference implementation to port from is @workflow/world-postgres. Pull it to read alongside this code:

npm pack @workflow/world-postgres@5.0.0-beta.19   # dist/storage.js, queue.js, streamer.js, drizzle/schema.js

Layout

FileRole
src/index.tscreateWorld() factory; composes the three surfaces + lifecycle
src/storage.tsStorage → DynamoDB event log + materialized views (+ S3 for large payloads)
src/queue.tsQueue → SQS continuation messages
src/streamer.tsStreamer → DynamoDB-polling (A) or Redis (B); the one genuinely re-architected piece
src/ddb.tsSingle-table key design
src/config.tsEnv-driven runtime config
SPEC.mdFull method-by-method mapping, table design, host-layer wiring, staged plan