Files
Everything in this kit: 33 files. Open one to read it, copy it, or download it. To try the feature, use the POC script page. These files are for whoever maintains or redeploys the kit; its poc/README.md explains how, and they run inside the full project: download the whole project (zip).
Makefile
SHELL := /bin/bash
.SHELLFLAGS := -eu -o pipefail -c
KIT := $(notdir $(CURDIR))
PROJECT := field-kit-$(KIT)
ROOT := $(abspath $(CURDIR)/../..)
TF := terraform -chdir=poc/terraform
PROFILE ?= supernova
REGION ?= us-east-1
COST_CENTER ?= poc
COST_DAYS ?= 7
CFG := build/config.json
WEB_CFG := poc/web/config.json
PORT ?= 8787
export AWS_PROFILE := $(PROFILE)
export AWS_REGION := $(REGION)
export TF_VAR_project_name := $(PROJECT)
export TF_VAR_cost_center := $(COST_CENTER)
.DEFAULT_GOAL := help
.PHONY: help preflight deps deploy outputs web verify screenshots diagram cost destroy
help: ## Show targets
@grep -E '^[a-zA-Z0-9_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-12s %s\n", $$1, $$2}'
preflight: ## Check credentials and tools
@out=$$(aws sts get-caller-identity --query Arn --output text 2>&1) || { \
echo "AWS profile $(PROFILE) has no valid credentials: run mwinit, then retry."; echo "$$out" | tail -1 | cut -c1-200; exit 1; }; \
echo "AWS identity: $$(echo "$$out" | sed -E 's/[0-9]{12}/<account>/')"
@for t in terraform aws jq python3 curl node npm; do command -v $$t >/dev/null || { echo "missing tool: $$t"; exit 1; }; done
deps: poc/node_modules ## Install the Bedrock SDK that local mode and verify use (the Lambda uses its runtime's SDK)
poc/node_modules: poc/package.json
npm --prefix poc install --no-audit --no-fund
@touch $@
deploy: preflight ## Create the POC, write its outputs to build/config.json and the page config to poc/web/config.json
$(TF) init -input=false
$(TF) apply -input=false -auto-approve
$(MAKE) outputs
outputs:
@mkdir -p build
$(TF) output -json > $(CFG)
@jq -n --slurpfile o $(CFG) --slurpfile p poc/prices.json \
'{api_url: $$o[0].api_url.value, auth: $$o[0].auth.value, model_id: $$o[0].model_id.value, prices: $$p[0]}' > $(WEB_CFG)
@echo "API: $$(jq -r .api_url.value $(CFG))"
@echo "Wrote $(WEB_CFG). Publish the page with 'make deploy' at the repo root."
web: preflight deps ## Local mode: serve the playground at http://127.0.0.1:PORT and call Ergo with local credentials (no sign-in)
node poc/local.mjs $(PORT)
verify: preflight deps ## Prove the POC works end to end
poc/verify.sh
screenshots: preflight deps ## Capture docs/screenshots/*.png from the POC running in local mode
PORT=$(PORT) poc/screenshots.sh
diagram: ## Render docs/architecture.png
python3 docs/diagram.py
$(ROOT)/shared/diagrams/render.sh docs/architecture.html docs/architecture.png
cost: ## Cost Explorer: last COST_DAYS days by service for this kit (needs make cost-tags at the repo root; lags up to 24h)
@start=$$(date -u -v-$(COST_DAYS)d +%F); end=$$(date -u +%F); \
echo "Unblended cost $$start to $$end, tag Project=$(PROJECT)"; \
aws ce get-cost-and-usage --region us-east-1 --time-period Start=$$start,End=$$end --granularity DAILY --metrics UnblendedCost \
--group-by Type=DIMENSION,Key=SERVICE --filter '{"Tags":{"Key":"Project","Values":["$(PROJECT)"]}}' \
--query 'ResultsByTime[].Groups[].[Keys[0],Metrics.UnblendedCost.Amount]' --output text \
| awk -F'\t' '{ s[$$1] += $$2; t += $$2 } END { for (k in s) printf " %10.2f %s\n", s[k], k; printf " %10.2f TOTAL\n", t }' | sort -rn
destroy: preflight ## Remove everything and list leftovers (each list should be empty)
$(TF) init -input=false
@$(TF) apply -destroy -input=false -auto-approve || { echo "destroy failed; retrying once"; $(TF) apply -destroy -input=false -auto-approve; }
@rm -rf build
@rm -f $(WEB_CFG)
@echo "== Leftover check for tag Project=$(PROJECT) (KMS keys pending deletion are expected)"
@aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=$(PROJECT) \
--query 'ResourceTagMappingList[].ResourceARN' --output text | tr '\t' '\n' | grep -v ':kms:' || true
@echo "-- log groups:"; for p in /$(PROJECT)/ /aws/lambda/$(PROJECT) aws-waf-logs-$(PROJECT); do \
aws logs describe-log-groups --log-group-name-prefix $$p --query 'logGroups[].logGroupName' --output text; done
@echo "-- terraform state entries: $$($(TF) state list | wc -l | tr -d ' ')"
README.md
# Amazon Ergo
An open weight model for coding and agent work that you call on Amazon Bedrock.
## At a glance
| | |
|---|---|
| Status | GA. Turbo mode is limited preview with no price |
| Announced | 2026-12-01 |
| Regions | Cross-Region inference only: US profile or global profile |
| Price | $1.00 in, $3.00 out per 1M tokens (global profile) |
| Demo | [Live demo](https://reinvent.krenken.cloud/kits/amazon-ergo/demo/index.html) (sign-in required), [POC script](poc/quickstart.py) |
## Why it matters
- Fast. Docs say over 400 output tokens per second. Observed on coding prompts: 308 to 409.
- Cheap. One coding request cost $0.009 to $0.037, measured.
- Open weights. Run on Bedrock, self-host, or fine-tune on SageMaker AI.
## Good fit
- Coding agents and high-volume agent workflows where cost and latency per call add up.
- Developers on OpenCode, Codex CLI, Kiro, or Claude Code through a LiteLLM proxy.
- Long context work: 1M token context, 131,072 max output.
## Not a fit
- Data that must stay in one Region, or in a geography other than the US.
- RAG on Bedrock Knowledge Bases: not supported.
- Tasks that need the strongest model: Amazon says Ergo "trails the strongest closed models".
## Gotchas
- Cross-Region inference only. Ask the data residency question first.
- The base ID `amazon.ergo-1.0` is not callable. Use `global.amazon.ergo-1.0` or `us.amazon.ergo-1.0`.
- Reasoning is billed as output but not streamed: 10 to 26 seconds pass before the answer appears.
- Reasoning effort is set with `outputConfig.effort`. `none` is rejected, so reasoning cannot be turned off.
- Minimum output limit is 8,192, and each request reserves its full limit against quota.
## Try it
Copy and run the [POC script](poc/quickstart.py). No allowlist was needed.
Source: [model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html), [coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html), [pricing](https://aws.amazon.com/products/ergo/pricing/), read 2026-12-01.
docs/architecture.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Amazon Ergo playground</title>
<style>
html, body { margin: 0; padding: 0; background: #FFFFFF; }
svg { display: block; font-family: "Amazon Ember", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.title { font-size: 26px; font-weight: 700; fill: #232F3E; }
.subtitle { font-size: 16px; fill: #455A64; }
.grp { font-size: 15px; font-weight: 700; }
.name { font-size: 15px; font-weight: 600; fill: #212121; }
.sub { font-size: 13px; fill: #545B64; }
.mono { font-size: 12.5px; fill: #37474F; font-family: Menlo, Consolas, monospace; }
.note { font-size: 13px; fill: #37474F; }
.ital { font-size: 13px; fill: #455A64; font-style: italic; }
.leg { font-size: 14.5px; fill: #212121; }
.edge { font-size: 13px; fill: #37474F; font-style: italic; paint-order: stroke; stroke: #FFFFFF; stroke-width: 5px; stroke-linejoin: round; }
.lane { font-size: 13px; font-weight: 700; fill: #7D8998; letter-spacing: 1.5px; }
.big { font-size: 17px; font-weight: 700; fill: #212121; }
.load { fill: none; stroke: #232F3E; stroke-width: 2.6; }
.canary{ fill: none; stroke: #1B66D6; stroke-width: 2; stroke-dasharray: 8 5; }
.ctl { fill: none; stroke: #5A6B7B; stroke-width: 1.5; }
.tel { fill: none; stroke: #1D8102; stroke-width: 1.6; stroke-dasharray: 2 4; stroke-linecap: round; }
.acc { fill: none; stroke: #7B3FE4; stroke-width: 1.6; stroke-dasharray: 10 3 2 3; }
.pull { fill: none; stroke: #90A4AE; stroke-width: 1.4; stroke-dasharray: 3 4; }
.kill { fill: none; stroke: #D13212; stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.badge circle { fill: #ED7100; }
.badge text { fill: #FFFFFF; font-size: 14px; font-weight: 700; text-anchor: middle; }
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" width="1500" height="880" viewBox="0 0 1500 880">
<defs>
<marker id="a-load" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#232F3E"/></marker>
<marker id="a-canary" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#1B66D6"/></marker>
<marker id="a-ctl" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#5A6B7B"/></marker>
<marker id="a-tel" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#1D8102"/></marker>
<marker id="a-acc" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#7B3FE4"/></marker>
<marker id="a-pull" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#90A4AE"/></marker>
<marker id="a-kill" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#D13212"/></marker>
<!-- official AWS architecture icons (awslabs/aws-icons-for-plantuml, 64 px), embedded so the file is self-contained -->
<symbol id="i-apigw" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMISURBVHgB7Zs/aBRBFMa/FUFBSCqv0iKolTbGIminjWmOWGkabfxTprESUgZsFMEyYq9Wio1V7BQLrWInWNhpZSBFquQ+Xh432WySnd33dg9mfnDM3u7e7rxv3ns7b9grni1sbyNhjiFxsgBInCwAEicLgMTJAiBxjsOBs5eA+SXZfvUIrXi4Ku2XN8DPNZhjKsD0ALi5JAJYMTWQdn73ul9HQvz/CzNMBDhxCpgdAleGsr21Ka0lGyOjL96QD73hx0e5T1ta5wB2iG56bVGMZsfaun0Vb5fHIcB73Xsh925LYw+gO15dHLv7n3VxT7Ye0AM+vZTRv7MiocGwoBjvlpuHRbQAHGUaTncndMPPr30SVBUUgh7G0afxFOLBqty/SX6IEkAN1zinu383isVYaPCvb9If9ouC0BvZH/arLrUFYJxrRqab0x03DLNxEyg8Q2J9TbyBIly/L6LUzUO1BVDjGW9ecd4UzQ/sF/OC9rUO0U+BSTM+pEkecpkJhjx+L+3zW3u/x+zzJNcCcEZH9KDvR+3z9oRcDiNxsgCYAAYz6I3eBeD09e6oslt4gl7oTAAulswO9+/Xklan1TxnOmIm15ZOBKBBt1dknl4W4dyctCxieIzn8NyuRHAXQI3n/JyjzApO4eifHFWW/36Pj7GdGnQngrsAofFc1QkryPPB6JPwHBXBm06TYBFsc3RVgLDAKtAt7gKUR1Td+szuUpq6PSmHC3/rjbsAZbfWpKfJMMwJPHZQuHjhXgwRNejCnCxXcaQ5+eGKTljD61JW6BXedCIAoUGa7C5XjL4Ss55nQS8zQc0DXa0kH0ZnHhDy4Slwekae/33TWy0wCcaTXA4jcfKqMBInrwojcaIFsHgpwYsmfasdAlrM6EsJXi8tNSF8V4DE1BG1BSi/lDAJQlQZHtufqCTIC/PTtxAWhiuNngJ9CWFpuFJY/GWmqmO6XfWIi0Efg+E1LQxXTOYBVR5hja4UWXuY6USoLIQFmtG9QqvI/xpLnCwAEicLgMTJAiBxsgBInB0u6Dl5mu5b5wAAAABJRU5ErkJggg==" width="64" height="64"/></symbol>
<symbol id="i-bedrock" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAAG2klEQVRoBe1ZfUxVZRjnXrwgykfEhwkIOhX5SEQHgggCpqgNi5yKZR9sbdXWyi3NSFlOh1I27Y+2vlyDMiyNqSzLtACRL1FJYXBBvYp8GmpZQRBcufSjN95O5xzOec859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RtJ+w7Y5r2ya7XvAPu7so2kfQds817Ztf4N5+jtDJO8oUMAAAAASUVORK5CYII=" width="64" height="64"/></symbol>
<symbol id="i-cloudfront" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAAI9ElEQVRoBe2ZB4wUVRjHv+Oox9F7R49yJ72rNEXpVsAQNAIGjcagaKxRkaIYRE0UI4klUVAkIKCAIopg4ER6L3KA9N7haEc7f9+9ZXaYm9mZvQUMyX657L1989437+v/923Chw9my81M+W7mw+vZ4wL83xaMWyBugRg1EHehGBUY8/a4BWJWYYwM8se437G9eHmpkiaV60r5FEkqLoWLScEicuGcZJ2WU0fl4FY5sFV2rpaThxz78v712ghQoLCktpH6HfXoualQUeEP2Sqnhh7u2yQZ6bJmtsoWIyXECObyF5RmD0jLnqppO21fKenjVOvoHjsULaV/pavIrc2laj3Jl6hrz52SFTNk2bSYxIhJgFqt5O4Bqlpob4asmikHt0nrPlL7Dp3ZlyHTRqoA1Rvq0Y/ukZ1r5OJ5KVtdOj4btgbuNHuMIHDeKI8CJOSTdv2k+YP60kPbZe6Xsnt9+ACcuPNzqv65X0j3l6RU5dCjY3tl+vvSoKM0vS9nJlvOnJSkEjpePUuZXL4UWhn8X14EKJws97+qeuV988fKip8l+7LzjQWTpEgx6TlET49Z0D3ry98iyPDbpyrApr91Ei9q0UPu7COJ+WXHKpk+Ss6fcbKK/D3qICZeewyWSnXlzHFV555/3Plzjqq3hU4//mUVFb9/7EOVgYCe8UF415IpevSH35IajaX3uzLxTTl/NvzUdxRdIeMQD7ymp8dxx7/ieXrzVvweQs3GMfjctUZnzLyOrtCBf2XC63J8v5S/VfmbEL/y0Od/dAIQsjWbyOlj8sPb/rmcqIXw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hnkBSJ1HiXYBnkMiZE3ovO7JLszDJl6/XivzvA1G9KfOIFqkbSXnJQjfyfL7vigvgq6LrvCBugeusYF/2cQv4qug6L4hb4Dor2Jf9f43YS5nehd44AAAAAElFTkSuQmCC" width="64" height="64"/></symbol>
<symbol id="i-cognito" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAAHyElEQVRoBe1ZCXATVRjOJmnSNE3vFkIptBwiAnIVmEKRo8CAHMOhyOVYQUCdAgWHARlaYMo1oAjlFAZBQEEryOUwwDBSq4JUOQpyDtQCpa2B3mmSptn4bTYN22yyRyNhOpPMTvv2f//x/e//33v/e0vcjx8laco/aVMGT2H3OfCyI+iLgC8CHo6AL4U8HECPxX0R8HgIPVTQ5CMg5x2AgP69QmdPU7aPlUhfuLcWXWn1uV9LN39tra3lBUYz8Dig6t2t+YZ0gbo8Z5NFhgVPGiOPDC9ZvFagNh4HQmdOhqLyfYfLtu23WiwClTaaTdE+Nnrv5+qkfoo2rWofPBSihycrlB3aQEvFoeNeQA9Dtff+MfxxFQ1Fh7ZC0IOHJwKEyh9MZFmlQHVgC5uTHDJtvERKCBcBp6W04smsReaCQktZBV6lKqVAcZ4ICNTCZAvoFy8WPcRlYcHKTq8w9Qhs80RAoBY2W+G7qaY7D9h0l5SoVQsDh/Z32cVLfAEOELbksVoleBw/gtCMHKzq010eFW66l1998pzp9n1HZwPO51RBrRfgABO3DQPhr2y+cZmqZxcakX+PzkFvvVm6aU/FwWOCMHIyCXIg7vcjnEoadtIRYNDC5yQDfd2/T8t2fGMuLA5I7BUydWx46nTTjTvG67cpRptI1PL5eOg2Q5qnKcgBsUqZNgm5XDN2mIS0Fqek1+Y/Qpfx8g2JuS5k+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fYo9WNWnm3ZLBllZjcoPf7k1KTt3iN69DjxU8G0FuTt+nghgRpYsXF17v4A69slkjXtsU1cSNJ6q28r3H3aHHgmm3bEaf8GG06Y+JxeTAbd07qDTdP5VSH/+Ah5qXrpYVbiV23upWz2CwFke7/pzv7mUkbdo1sKGPjx1RsmiNRTn2V+wUgUOSazM+smlCE3kd8AujBRyv+RzGLCbiYrAymMprzQ/spUbtnLacUDzi25OjX3zSAy8LiOTFjHa9kE6IBz6eVKIQ1Jcl63QcFyaB/TtGXN8N33RggVH++UaoMcBvyglnazW05rp9Yfw4xliLzlAR89RC6oHJciCNbgs0owZqt25BuUgjp24tmDWTlKlQsgYeckBfLmwPCuTBmmwzAOWbs1W1NLYYSLT5uJrgPHqzeK56Y6MonH7x1MXYcYbPAWVlxwAFMMl6t5cPewNCh9p1WVsqjp+Fk3jlRvF85aRNc6Fg3pQX/QaLl6h+N3/vOdA5Y9nAAN3chhyCg/lQ+bjKXOKPlrKRo/vWrjlRkye31y48cF7DmCksYbigwMOylJ1AI0H9QL70wlWHhzowIDPQkg8N8jtZO85AINPP9uJUxu+A2i3r1S0pe622D8sTS12r5NHRRiv/F2RdZLN4EThKSWcuD1/xYLTYudabFuoTTCPcTVkzLstsVgwoVXxr6uTEpE8sIKDQcmCDKdp7dK6tx0ACByX8e0w6J1RKEzYmKym2rLd31UcOGI1C7qNfQkO0KD9WkXjOKbq3RVHM0KpRK5jk67Jvlh9Noe7enPy+aU54ISj0a9encSNRskh6HOAY3C80uWLgFeGmcOILwIcg+OVLl8EvDLMHEaafAT+A6TavEsZwqayAAAAAElFTkSuQmCC" width="64" height="64"/></symbol>
<symbol id="i-cwlogs" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAEZ0FNQQAAsY58+1GTAAAAAXNSR0IArs4c6QAAAAZiS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zhiK3cPWl6z+yoQNdoWuMQQUyjQ6zIyWc1Mxul7WYLpl4mEumBC18pDeVENtjt8S/CLX8JAWMUsEtjfivT1ZSJbW7Cy6/3R/xRXjQdZXqCfGoRce5LXbjla1L14yu7njxsyHEjkz4ii8SIRfacyyy3ZKBrWcjji8F7JGFmP0J3R7yMF2z+xdWNJ2wUADpxlWdqRjGEegc0Ice3sLxbubCtQkneWHHq2K600g6Idm9PF/+zHPFSeEk9yKIqezBp6WiINveWvHClUd2Mu0JzzZHETN7aJmC80XjDOON/TaCHkHYT8Ync0+MfKMTe/jxwYkaEXRxNVSm+rHj176+relqOre7cdecxa/rossVlCVC3CrTPnMUd543OHP1fyShDRNEKs4eciVG/SVwzQaU5KcIIHMKl1YX8HIuJrkNnbBvk5QTCVNbjrhEuvD5AK32Kwwf9ODIwa1ZPU8tv8/qLpiFWE+tv+MYESqSD5Hjo0SwzFkWrPd0Xqtqe2nP77wW6RD1a54/VVI1sR6mfaT2dqQe9cPPfeFUM2rA4/Ddt8d6R4EZuTIWYQHvGa4KlZ50Kpw37pOnTswazRdnTVyDF9lKpXOCMr91yQAcjiG8sxGv7+KNcl+Czydc6J0NkSpXMahBS9/7VOmDj/XtcZ46HPcl4NDpcJlWvHyNQETTPNNNNMM80000w7v/Z/TGlDiWm2O9kAAAAASUVORK5CYII=" width="64" height="64"/></symbol>
<symbol id="i-g-cloud" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAhGVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAEAAAAABAAAAQAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAACDL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UfijrGSjxISO5n72l+jz8bEvfLXKDlgK7fp3QKE0jk4RQTUQzbqp9n8QTkZGd5E2hemsuHmfArXlvY4f1uASMHS9vTUjjEnBr3tvYYT0uAWPHy1sT0rgE3Jr3NnZYj0vA2PHy1oT0f5uBueaAbWQUAAAAAElFTkSuQmCC" width="64" height="64"/></symbol>
<symbol id="i-g-region" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAhGVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAEAAAAABAAAAQAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAACDLebYAAAACXBIWXMAAAnYAAAJ2AHHoLmtAAACymlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj42NDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9u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06HCYCr5uoBBx2vBxC6FrLMmICDoFGKq0QcuKbZ180KODtOgBv1gPvhGAdglsf4+o3gOfmsxhrHCdCDdaIeoHU98AzgfNymWAXP37hGAJVTTOsBWS3ufc5IJphdF9wDYaJ5RggwGaDbvy0S4DbDXtdf9ACvW8jt8RU9wG2Gva6/6AFet5Db4zP2AC9neYWQZ0yAfgDR53t1qosX97r3f39n9DBE9rhBkhLH+SZKVrmCEDaN4Xsc3CXGHaSUv/Dk5tY+IdWBjQ/bBPD11TgeQG+NsQqHM8rTglL1QEptmpMxVGv493nuE9BFUVyHQQY203pGbBFAy7MYUQ2Lb59Xpd7i+AHsDrbGLktUKHBzsTHi9ZrHZVFpRFKoEvlRrjh+966c5oYmtLVavHSLMZ+df5ria6levKPbhk1JB3a8oSoxhQzw08M/yScdnfIYavndINALYssDhjl4WP86rPkl9gOHUZNjBShbrGSZDteY9rS6Lohyc9NZbJxi8XLAI+BpAFsewB+W4GAtTrCBYUoxiuj/C5IGj5RKHMRhT5dnxJYHcPSM5ixIPhGLTnrFTJw8GPezsR8XOeFrLoLn92zjBbFNAAfPel+njvAFoNH5gFfAc8hGBFCBBsXrh1GMM8GHEXT+mIsE5LMxG6+LHjAbrZ6P+R+aBzUKW/2DWAAAAABJRU5ErkJggg==" width="64" height="64"/></symbol>
<symbol id="i-lambda" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAAG3UlEQVRoBe1ZaYwURRTu7umZ7oa9uCEIiAgICAmIXMu1u2AiJhKMP0TExAheBI8FFYxojKDigYgHGgF/SECBGEwEwrXLhnPJhlsWRLmVQ1kW2KWPme72VdfQzHbXTJ+ukExlslv96nXV++pVvfdVNX3pFeq2LsxtbT0Ynw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qwHGne+7aNlPWCfk8aVZD3QuPNtH+1fE5+I9S7Y9+4AAAAASUVORK5CYII=" width="64" height="64"/></symbol>
<symbol id="i-s3" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAAIB0lEQVRoBe1Za0zTVxSnTwp9QEt5U95CFUEQFdGJUyc+l206DRqzaObUJWYmLn6YidmHZduHfdnih0XnpmTLdMmmy+J0vrZJJqAOH6jjIUiBlndLSx+UPmC/cllDaOn//gu4mND809z/vef+zj33nHvuOefPOVoeE/Ii/7gv8uI9a58V4P/W4KwGZjUwxR2YNaEpbuCUp7/wGuBPZQs4HG60LDMxaoFCmhohTowUJ8nC44R8sYAfhofPFbqGHU7XIB6Hyzpg6zJatSarzmDW6PQPeweaRkaGp8KdzA1GgFj5XHVSaVbi6gRFnpAfHmARAp4IT0ioHDTREXPGUzpctg5DbaPu93rt1e7+uvFDrNoc+lhIJIwozNyxNHsP9pvwGAkZ0Q8869DX9pqeGq06k02HbXY4rU63Z9ex/VCCRxu8MKFADOVEhENLiZAkISovSpbOCeEQHL255XbDmZqms3aHidXqQUwlAJfDWzZ335r8IzAPzDFZO+q1Vxp0NzTdVUNOC1uWhD5UIEmNLc5OXKNOWhchTkAnzOzGg88q604Oj7jpMZkFgJHsfuVcSkwRQOu116rrTzV1VkyL+ZJV4iBlxpcsVe9VJ61Fj6anuvz6DhgYpQy8FW94NjXAb8uyz2Hx0PJ3f7xV8fg4jmBIyEgAevZDI8CsbTnf3FkBnSQocuEP/mm7RInD7EZzkjcB6/S1ba09dyhBgyMD/pnrZZg7P3kzPQKzAO5hJ+BezjvM4wrocYOg5POEaxYcwUT3sIN+OrMbNVhaodZFmTtTY5bcfHS8VnPB5R6i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UgoQkp20FmFcU+fNXlNjYESaUez0s66/Kuu+gkI4HM5oWcmT10MGFD4QX6HAEa+YL5eoQBM4/aA6xIAmMY9crKJZHyUNDgnyCjwwzleLPl2YUQbHhbAXD0Fo6a5kLLTQCkC8G/F0lOujJ0MNwunyHK1Ld481ddyMk8+D7zLZOhq01xhBaAUY0wD1ZczIeAIB8aEoTyDMxjNhNMAr1UWG+UQAxehtHwAu6CEFucV8MgRGQFoBiAkhcWFEDIIANcbI0dOFXIftdFoBBh1Gu2MAdxnyWrY8GOml4bG4wqz2PvqCnBeTVgBMIHEifUDh5cHYGDsA7O0HyCwEmLlzTAQg+IzSTiAIQoDpPwZjArBMZYgkLAQYuwpmwBE9Zw34KU9MUCvbV+KdSdDOdi4LDczgGRi9BJ7HGfDEKpJEfLBhu08B6JGjocKHlGN8bhCAfsIQCw2Q+gr4RUrGgq0JWMG9IsXBjuDjGqnjswVhIQCgn3Z4Mr21BUen61sB7q/SgqPAbNBdZ7t0Qk+bDxDqXlNTftrWJGV+QcZ2fNsasHUgsg+OMWLmxVm7tr/0JcrdtiHDT5WHcNkHAcX8kW8CKD6PlpWcwBdi0o8MS9t7D/EjGsh6rXYDVgNjQzqLNJLL5aO2PprpKsSiKHxpRVaEwrpKWQjLIQjavvvnKvYFd4KBwFoAwhUV9sVzdqGwTl94IxO9/5ATof/dp98i5fd2BtEIUgDCCVaE5EMpy4AjR1qITUWFXSSQCgUSHBIcTVRqcTQdTovdaTZatIimUCPTmzX6geYuY920fKulTWj87g1W0Gl4jMfv6PPpZOeFns+aWHGZFYDVds0A8awGZmBTWUHOaoDVds0A8awGZmBTWUH+C+olW2DmJArIAAAAAElFTkSuQmCC" width="64" height="64"/></symbol>
<symbol id="i-user" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAEZ0FNQQAA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gfiv5hvpOmbMvflshUi0KHZBkE0KXZ8773RsjI54ZB05RBShSurIdhW5r8MX3XzJGr/O2OU6gOBG3NXNYyjVge1TtW47mnn5FFw2wlNfcAmnpg5PxvMTqur9uOo7iTENDPf4cc95OxsgfQskXrsgwFwwcH+z/SjMNKCmrLgSUn1fTUsTY+njc6vwlOtS6fwAe6ya35Rh7dklljVkzACghLyBxGgNx/QOe9savkMEIUuVWhpF6gSLNH8BbNQFA5PZrhc/8T3e780VkUFqQTp4OukSRixZZa+u00IBH1ZgDrP4dKHgqbUziESFh+M5wOE4f/E0ABGN8bllDtLPL1XgAGZy62vc1gqbuCWosxteA8b4iZgDAmGwKl+kWlChE0RMRo7g7JgBKS5dlQqR1vai2dbc3NSfK+Ls7nE6IU/4ngv11ecuWzY4agHFZvg4eySLL2Y4SjvDropCafEauj2EJ4DVhNyh9lGjDlwl+M7x8SUMsNqBWfO7W666+nnSwzeENRqxBFWa2qAAorKxeiNRTWEY/RwlLbL+wAwv5XsKMASB+yRpRa03U4YM7nJw86lcqZgwARDwF4XSJdibs/CPcO1lWaOnMNQCzhZPIMTyQsCuAsG/Dk8oypzWW0yJHWRq/hRhCCK8quty2PEFVIDVCG9JnDAAMfk6YCfsrRolPkMdkzNwGRKyd84UYIt4Za0BPSe7jxd2DzRTh7PNh8ASxYU/x/E+QC12gCzSFfgSTX9iqyaHe7QAAAABJRU5ErkJggg==" width="64" height="64"/></symbol>
<symbol id="i-waf" viewBox="0 0 64 64"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAAKbklEQVRoBe1ZCXRU1Rme92ZfksmeDBE0AQELRVOCAUHEEhRKghSwQZCighYobSyeVkVcKqUcsdhWRbT2gFC7itEqUlpBpIomCoalA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IUFGuT1UGpAiDNGQ0w1URAuQYvhlIUSmAw/CSWlms4QHdNLT6zut//KPK7jgg3KR2SUEDEJk4X1xpbrsnLzvvNw0BruvvnOA24v1hOQ0qK6YCPrW0bfydFYCP9ogCjHvUG2KgyADqk3V4Bxx8/relfBZSJ2iesJPxAn/j02+IBBfptaxUSHjgBhRvVb2gDJ9BvW6uQ8MAJKNyofkP7H+c63mGEFKgTAAAAAElFTkSuQmCC" width="64" height="64"/></symbol>
</defs>
<rect width="1500" height="880" fill="#FFFFFF"/>
<text x="24" y="40" class="title">Amazon Ergo playground</text>
<text x="24" y="66" class="subtitle">A static page streams answers from Amazon Ergo-1.0 on Amazon Bedrock and shows speed and cost for each request.</text>
<!-- ===== Containers ===== -->
<rect x="240" y="100" width="1236" height="580" rx="6" fill="none" stroke="#232F3E" stroke-width="2"/>
<use href="#i-g-cloud" x="240" y="100" width="28" height="28"/>
<text x="276" y="120" xml:space="preserve"><tspan class="grp" fill="#232F3E">AWS Cloud</tspan></text>
<rect x="480" y="140" width="740" height="520" rx="6" fill="none" stroke="#00A4A6" stroke-width="1.5" stroke-dasharray="6 4"/>
<use href="#i-g-region" x="480" y="140" width="24" height="24"/>
<text x="512" y="160" xml:space="preserve"><tspan class="grp" fill="#007E80">Region</tspan><tspan class="mono"> us-east-1</tspan></text>
<rect x="1250" y="400" width="206" height="260" rx="6" fill="none" stroke="#00A4A6" stroke-width="1.5" stroke-dasharray="6 4"/>
<use href="#i-g-region" x="1250" y="400" width="24" height="24"/>
<text x="1282" y="420" xml:space="preserve"><tspan class="grp" fill="#007E80">Region</tspan><tspan class="mono"> set by profile</tspan></text>
<!-- ===== Connectors ===== -->
<path class="load" d="M122,365 L200,365 L200,215 L314,215" marker-end="url(#a-load)"/>
<path class="load" d="M366,215 L594,215" marker-end="url(#a-load)"/>
<path class="acc" d="M200,365 L594,365" marker-end="url(#a-acc)"/>
<path class="load" d="M200,365 L200,515 L594,515" marker-end="url(#a-load)"/>
<circle cx="200" cy="365" r="3.2" fill="#232F3E"/>
<path class="load" d="M646,515 L834,515" marker-end="url(#a-load)"/>
<path class="load" d="M886,515 L1074,515" marker-end="url(#a-load)"/>
<path class="load" d="M1126,515 L1334,515" marker-end="url(#a-load)"/>
<path class="tel" d="M860,489 L860,391" marker-end="url(#a-tel)"/>
<path class="tel" d="M634,489 L634,455 L860,455"/>
<circle cx="860" cy="455" r="3.2" fill="#1D8102"/>
<!-- ===== Nodes and labels ===== -->
<use href="#i-user" x="62.0" y="337.0" width="56" height="56"/>
<text x="90" y="412.0" class="name" text-anchor="middle">Presenter</text>
<text x="90" y="430.0" class="sub" text-anchor="middle">web browser</text>
<use href="#i-cloudfront" x="316.0" y="191.0" width="48" height="48"/>
<text x="340" y="258.0" class="name" text-anchor="middle">Amazon CloudFront</text>
<text x="340" y="276.0" class="sub" text-anchor="middle">HTTPS endpoint</text>
<use href="#i-waf" x="278" y="133" width="28" height="28"/>
<text x="314" y="151.0" class="note">AWS WAF web ACL</text>
<use href="#i-s3" x="596.0" y="191.0" width="48" height="48"/>
<text x="620" y="258.0" class="name" text-anchor="middle">Amazon S3</text>
<text x="620" y="276.0" class="sub" text-anchor="middle">static page, private bucket</text>
<use href="#i-cognito" x="596.0" y="341.0" width="48" height="48"/>
<text x="653.0" y="361.0" class="name">Amazon Cognito</text>
<text x="653.0" y="379.0" class="sub">Midway sign-in, issues token</text>
<use href="#i-apigw" x="596.0" y="491.0" width="48" height="48"/>
<text x="620" y="558.0" class="name" text-anchor="middle">Amazon API Gateway</text>
<text x="620" y="576.0" class="sub" text-anchor="middle">REST API, Cognito authorizer</text>
<use href="#i-waf" x="558" y="603" width="28" height="28"/>
<text x="594" y="621.0" class="note">AWS WAF web ACL</text>
<use href="#i-lambda" x="836.0" y="491.0" width="48" height="48"/>
<text x="860" y="558.0" class="name" text-anchor="middle">AWS Lambda</text>
<text x="860" y="576.0" class="sub" text-anchor="middle">Node.js, response streaming</text>
<use href="#i-cwlogs" x="836.0" y="341.0" width="48" height="48"/>
<text x="893.0" y="361.0" class="name">Amazon CloudWatch Logs</text>
<text x="893.0" y="379.0" class="sub">API access and function logs</text>
<use href="#i-bedrock" x="1076.0" y="491.0" width="48" height="48"/>
<text x="1100" y="558.0" class="name" text-anchor="middle">Amazon Bedrock</text>
<text x="1100" y="576.0" class="sub" text-anchor="middle">ConverseStream</text>
<text x="1100" y="592.0" class="mono" text-anchor="middle">global.amazon.ergo-1.0</text>
<use href="#i-bedrock" x="1336.0" y="491.0" width="48" height="48"/>
<text x="1360" y="558.0" class="name" text-anchor="middle">Amazon Ergo-1.0</text>
<text x="1360" y="576.0" class="sub" text-anchor="middle">model inference</text>
<!-- ===== Step badges ===== -->
<g class="badge">
<circle cx="270" cy="215" r="13"/><text x="270" y="220">1</text>
<circle cx="425" cy="215" r="13"/><text x="425" y="220">2</text>
<circle cx="400" cy="365" r="13"/><text x="400" y="370">3</text>
<circle cx="400" cy="515" r="13"/><text x="400" y="520">4</text>
<circle cx="740" cy="515" r="13"/><text x="740" y="520">5</text>
<circle cx="980" cy="515" r="13"/><text x="980" y="520">6</text>
<circle cx="1175" cy="515" r="13"/><text x="1175" y="520">7</text>
<circle cx="860" cy="425" r="13"/><text x="860" y="430">8</text>
<circle cx="117" cy="760" r="13"/><text x="117" y="765">1</text>
<circle cx="117" cy="792" r="13"/><text x="117" y="797">2</text>
<circle cx="117" cy="824" r="13"/><text x="117" y="829">3</text>
<circle cx="117" cy="856" r="13"/><text x="117" y="861">4</text>
<circle cx="817" cy="760" r="13"/><text x="817" y="765">5</text>
<circle cx="817" cy="792" r="13"/><text x="817" y="797">6</text>
<circle cx="817" cy="824" r="13"/><text x="817" y="829">7</text>
<circle cx="817" cy="856" r="13"/><text x="817" y="861">8</text>
</g>
<!-- ===== Legend ===== -->
<text x="24" y="720" class="grp" fill="#232F3E">LINES</text>
<path class="load" d="M104,715 L154,715" marker-end="url(#a-load)"/>
<text x="164" y="720" class="leg">Request and streamed answer</text>
<path class="acc" d="M388,715 L438,715" marker-end="url(#a-acc)"/>
<text x="448" y="720" class="leg">Sign-in</text>
<path class="tel" d="M537,715 L587,715" marker-end="url(#a-tel)"/>
<text x="597" y="720" class="leg">Logs</text>
<text x="24" y="765" class="grp" fill="#232F3E">FLOW</text>
<text x="141" y="765" class="leg">The presenter opens the playground through Amazon CloudFront, behind AWS WAF.</text>
<text x="141" y="797" class="leg">CloudFront serves the static page from a private Amazon S3 bucket.</text>
<text x="141" y="829" class="leg">The browser signs in through Amazon Cognito (Midway) and gets a token.</text>
<text x="141" y="861" class="leg">The browser sends the prompt and reasoning effort to API Gateway with the token.</text>
<text x="841" y="765" class="leg">API Gateway checks the token and invokes the Lambda function.</text>
<text x="841" y="797" class="leg">Lambda calls ConverseStream on the global inference profile and streams the answer back.</text>
<text x="841" y="829" class="leg">The profile routes the request to a Region it selects (cross-Region inference).</text>
<text x="841" y="861" class="leg">API Gateway and Lambda write logs to Amazon CloudWatch Logs.</text>
</svg>
</body>
</html>
docs/demo-script.md
# Talk track (5 minutes)
Claim to prove: Ergo is fast and cheap for coding work, shown with numbers measured live.
## Setup
1. Open the [hosted demo](https://reinvent.krenken.cloud/kits/amazon-ergo/demo/index.html) and sign in, or have the [POC script](../poc/quickstart.py) ready in a terminal.
2. Run one prompt to warm up. Check that the answer streams and the numbers appear.
3. Open the Pricing page in another tab.
## Script
| Time | Say | Do | Expect |
|---|---|---|---|
| 0:00 | "Ergo: open weight coding model on Bedrock. Let's measure speed and cost." | Run the first preset prompt | A 10 to 26 second wait, then a fast answer |
| 1:00 | "That wait was reasoning: billed as output, never shown." | Point at first token, output speed, total time | 308 to 409 output tokens per second measured |
| 2:00 | "That request's cost, at $1 in, $3 out per million tokens." | Point at tokens and cost | $0.009 to $0.037 measured; read the screen aloud |
| 3:00 | "Agents run hundreds of these calls per task. Multiply." | Show the Pricing worked example | $436.00 a day without caching, $135.60 with |
| 4:00 | "AWS picks the serving Region. Must your data stay in one?" | Stop sharing | Discussion |
Read the numbers on screen; never predict them. On a 429 the quota is used up: wait a few seconds and run again.
## Reset
- Reload the demo page to clear the answer and the numbers.
- The hosted demo stays up between sessions.
docs/diagram.py
"""Architecture diagram for this kit. Run from the kit directory:
python3 docs/diagram.py # writes docs/architecture.html
../../shared/diagrams/render.sh docs/architecture.html docs/architecture.png
Coordinates are pixels. node(cx, cy, ...) is centred on the icon; lines must be orthogonal.
See shared/diagrams/README.md for the API and the icon names.
"""
import os, sys
DOCS = os.path.dirname(os.path.abspath(__file__))
sys.dont_write_bytecode = True
sys.path.insert(0, os.path.join(DOCS, "..", "..", "..", "shared", "diagrams"))
from lib import Diagram
W, H = 1500, 880
TITLE = "Amazon Ergo playground"
d = Diagram(W, H, TITLE)
TOP, MID, BOT = 215, 365, 515 # static page row, sign-in row, API row
TRUNK, EDGE, IN, FN, AI, DEST = 200, 340, 620, 860, 1100, 1360 # columns
# ---------------- containers
d.box(240, 100, 1236, 580, "cloud", "AWS Cloud", "g-cloud")
d.box(480, 140, 740, 520, "region", "Region", "g-region", "us-east-1")
d.box(1250, 400, 206, 260, "region", "Region", "g-region", "set by profile")
# ---------------- nodes
d.node(90, MID, "user", ["Presenter"], ["web browser"], size=56)
d.node(EDGE, TOP, "cloudfront", ["Amazon CloudFront"], ["HTTPS endpoint"])
d.small(EDGE - 62, TOP - 82, "waf", ["AWS WAF web ACL"])
d.node(IN, TOP, "s3", ["Amazon S3"], ["static page, private bucket"])
d.node(IN, MID, "cognito", ["Amazon Cognito"], ["Midway sign-in, issues token"], pos="right")
d.node(IN, BOT, "apigw", ["Amazon API Gateway"], ["REST API, Cognito authorizer"])
d.small(IN - 62, BOT + 88, "waf", ["AWS WAF web ACL"])
d.node(FN, BOT, "lambda", ["AWS Lambda"], ["Node.js, response streaming"])
d.node(FN, MID, "cwlogs", ["Amazon CloudWatch Logs"], ["API access and function logs"], pos="right")
d.node(AI, BOT, "bedrock", ["Amazon Bedrock"], ["ConverseStream", ("mono", "global.amazon.ergo-1.0")])
d.node(DEST, BOT, "bedrock", ["Amazon Ergo-1.0"], ["model inference"])
# ---------------- connectors
d.line("load", [(122, MID), (TRUNK, MID), (TRUNK, TOP), (EDGE - 26, TOP)])
d.line("load", [(EDGE + 26, TOP), (IN - 26, TOP)])
d.line("acc", [(TRUNK, MID), (IN - 26, MID)])
d.line("load", [(TRUNK, MID), (TRUNK, BOT), (IN - 26, BOT)], dot=(TRUNK, MID))
d.line("load", [(IN + 26, BOT), (FN - 26, BOT)])
d.line("load", [(FN + 26, BOT), (AI - 26, BOT)])
d.line("load", [(AI + 26, BOT), (DEST - 26, BOT)])
d.line("tel", [(FN, BOT - 26), (FN, MID + 26)])
d.line("tel", [(IN + 14, BOT - 26), (IN + 14, 455), (FN, 455)], arrow=False, dot=(FN, 455))
d.badge(1, 270, TOP)
d.badge(2, 425, TOP)
d.badge(3, 400, MID)
d.badge(4, 400, BOT)
d.badge(5, 740, BOT)
d.badge(6, 980, BOT)
d.badge(7, 1175, BOT)
d.badge(8, FN, 425)
# ---------------- legend
d.lines_key(24, 715, [
("load", "Request and streamed answer", 190),
("acc", "Sign-in", 55),
("tel", "Logs", 40),
])
d.flow(24, 760, [[
(1, "The presenter opens the playground through Amazon CloudFront, behind AWS WAF."),
(2, "CloudFront serves the static page from a private Amazon S3 bucket."),
(3, "The browser signs in through Amazon Cognito (Midway) and gets a token."),
(4, "The browser sends the prompt and reasoning effort to API Gateway with the token."),
], [
(5, "API Gateway checks the token and invokes the Lambda function."),
(6, "Lambda calls ConverseStream on the global inference profile and streams the answer back."),
(7, "The profile routes the request to a Region it selects (cross-Region inference)."),
(8, "API Gateway and Lambda write logs to Amazon CloudWatch Logs."),
]], 700)
out = os.path.join(DOCS, "architecture.html")
open(out, "w").write(d.render(TITLE, "A static page streams answers from Amazon Ergo-1.0 on Amazon Bedrock and shows speed and cost for each request."))
print("wrote", os.path.relpath(out), W, H)
docs/pricing.md
# Pricing
## TL;DR
- $1.00 in, $3.00 out per 1M tokens on the global profile. The US profile costs 10% more.
- One coding request cost $0.009 to $0.037 measured: reasoning is billed as output.
## Unit prices
| Profile, USD per 1M tokens | Input | Output | Cache read | Cache write (30 min) |
|---|---|---|---|---|
| Global | $1.00 | $3.00 | $0.03 | $1.25 |
| US | $1.10 | $3.30 | $0.033 | $1.375 |
Batch and Flex cost the same as Standard. Turbo is limited preview with no price.
Source: [pricing](https://aws.amazon.com/products/ergo/pricing/), [AWS News Blog](https://aws.amazon.com/blogs/aws/aws-builds-for-more-ambitious-agents/), read 2026-12-01.
## Worked example
Assumed: 200 agent runs a day, each 2,000,000 input and 60,000 output tokens. Caching: 80% of input read from cache, 10% written, 10% uncached.
| Line | Arithmetic | Per day |
|---|---|---|
| No caching | 400M x $1.00 + 12M x $3.00 | $436.00 |
| Cache read | 320M x $0.03 | $9.60 |
| Cache write | 40M x $1.25 | $50.00 |
| Uncached input | 40M x $1.00 | $40.00 |
| With caching | $9.60 + $50.00 + $40.00 + $36.00 output | $135.60 |
Caching saves $300.40 per day (69%).
## Cost levers
- Prompt caching: cached reads cost 3% of the input price.
- Global profile: 10% cheaper than US. Only with no residency constraint.
- Reasoning effort: lower it on simple tasks to spend fewer output tokens.
Source: [pricing](https://aws.amazon.com/products/ergo/pricing/), [coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html), read 2026-12-01.
docs/scaling.md
# Scaling
## Limits
| Limit | Value |
|---|---|
| Context and max output | 1M tokens, 131,072 tokens, text only |
| Output limit to set | 8,192 minimum; the full limit is reserved against quota |
| Speed | Docs say over 400 output tokens per second. Observed: 308 to 409 |
| Turbo | 2,200 output tokens per second; limited preview, no price |
| Tokens and requests per minute | Not published; read them in Service Quotas |
Source: [model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html), [coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html), [AWS News Blog](https://aws.amazon.com/blogs/aws/aws-builds-for-more-ambitious-agents/), read 2026-12-01.
## How it scales
- AWS manages capacity behind the inference profile. Nothing to provision.
- A 429 means the quota is used up: retry with backoff, lower the output limit, or request an increase.
- Application inference profiles track usage and cost per team or app.
## Where it does not fit
- Data must stay in one Region or outside the US: cross-Region inference only.
- Knowledge Bases, intelligent prompt routing, Count tokens API and watermarking are not supported.
- Lowest latency on trivial calls: the model always reasons, 10 to 26 second wait measured.
Source: [model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html), [coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html), read 2026-12-01.
docs/talking-points.md
# Talking points
## Three points that matter
1. Agents run hundreds of calls, so speed and price multiply: $1.00 in, $3.00 out per 1M tokens.
2. Open weights are an exit: Bedrock, self-hosting from Hugging Face, or fine-tuning on SageMaker AI.
3. Fits existing tools: Converse and OpenAI-compatible APIs, Kiro, OpenCode, Codex CLI, Claude Code.
## Quotes
No attributed customer or executive quotes were found. Use these AWS claims, labelled.
- AWS claim, internal evaluation: "Ergo completed tasks 50% faster at 10% lower cost than Kimi K3.1 Pro".
- AWS claim, against Opus 5.5: "it completed tasks 3.5 times as fast at one-tenth the cost".
- AWS claim: "Among U.S. open weight models, Ergo ranks first on all seven coding benchmarks."
- Mind the "U.S." qualifier: Kimi K3.1 Pro leads on DeepSWE, Terminal-Bench 4.0 and ProgramBench.
- Amazon's model card: Ergo "trails the strongest closed models". Say it first.
Source: [AWS News Blog](https://aws.amazon.com/blogs/aws/aws-builds-for-more-ambitious-agents/), [Ergo page](https://aws.amazon.com/ergo/), [Hugging Face card](https://huggingface.co/Amazon-FMR/Ergo), read 2026-12-01.
## Likely objections
| Objection | Answer |
|---|---|
| Open weights: why pay for Bedrock? | Nothing to operate. Self-hosting is a 626 GB to 2.22 TB download |
| Versus closed frontier models? | It trails the strongest. Pitch speed and cost per task |
| Where is my data processed? | Cross-Region only: US or global profile. No in-Region option |
| Can we get Turbo? | Limited preview, no price or date. Do not design around it |
| Rate limits? | Not published. Per account in Service Quotas |
Source: [model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html), [Hugging Face card](https://huggingface.co/Amazon-FMR/Ergo), read 2026-12-01.
## Ask the customer
- Which agent workloads are limited by model cost or latency?
- Must data stay in a specific Region or geography?
- How much of an agent run's input repeats from turn to turn?
kit.json
{
"slug": "amazon-ergo",
"title": "Amazon Ergo",
"summary": "Open weight frontier model for coding and agents on Amazon Bedrock: over 400 output tokens per second at $1 in, $3 out per million tokens.",
"status": "ready",
"announcement_urls": [
"https://aws.amazon.com/about-aws/whats-new/2026/11/amazon-ergo-open-weight-foundation-model-amazon-bedrock/",
"https://aws.amazon.com/blogs/aws/aws-builds-for-more-ambitious-agents/"
],
"demo_url": "https://reinvent.krenken.cloud/kits/amazon-ergo/demo/index.html",
"verified_on": "2026-12-01",
"scripts": [
"poc/quickstart.py",
"poc/quickstart.sh",
"poc/lambda/index.mjs"
],
"requires": [
{
"tool": "boto3",
"version": "1.44.17 or later",
"note": "Tested with 1.44.17. An older release may reject the reasoning effort field.",
"links": {
"boto3 1.44.17 on PyPI": "https://pypi.org/project/boto3/1.44.17/"
}
},
{
"tool": "AWS CLI",
"version": "2.37.0 or later",
"note": "Only for quickstart.sh. Tested with 2.37.0.",
"links": {
"macOS": "https://awscli.amazonaws.com/AWSCLIV2-2.37.0.pkg",
"Linux": "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.37.0.zip",
"Windows": "https://awscli.amazonaws.com/AWSCLIV2-2.37.0.msi"
}
}
]
}
poc/README.md
# Maintainer notes
For whoever maintains this kit. Commands run from `kits/amazon-ergo`. Shown on the Files page only.
## Run the POC
A playground page streams Ergo's answer to a coding prompt and shows output tokens per second, time to first token, total time, tokens and the dollar cost of that request. The shared platform (repo root `make deploy`) must exist first: the API uses its Cognito pool.
```
make preflight # credentials (profile supernova) and tools
make web # local mode at http://127.0.0.1:8787, your credentials, no sign-in, nothing deployed
make deploy # API Gateway + Lambda + WAF; writes poc/web/config.json
make verify # 401 without a token, direct Bedrock call, Lambda invoke; prints tokens per second
make screenshots # docs/screenshots/*.png from local mode
make destroy # removes everything and lists leftovers (must be none)
```
- Hosted page: after `make deploy`, run `make deploy` at the repo root to publish `poc/web/` (with its `config.json`) to the dashboard site. Sign-in is Midway through the shared pool.
- Path: browser, API Gateway REST API (Cognito authorizer, response streaming), Lambda (`poc/lambda/index.mjs`, Node.js 26), Bedrock `ConverseStream` on `global.amazon.ergo-1.0`. Local mode runs the same handler code.
- Cost guards: output limit fixed at 16,384 tokens, prompts over 20,000 characters rejected, Lambda concurrency 5, stage throttle 2 requests per second (burst 5), WAF rate limit 100 requests per 5 minutes per IP.
- Timings are measured in the backend around the Bedrock call. Cost is computed from the token usage Bedrock returns and the prices in `poc/prices.json`.
- Tags: `Project`, `Environment`, `Owner`, `CostCenter`, `ManagedBy`, `Repository` from provider `default_tags`. Activate them once with `make cost-tags` at the repo root, then `make cost`.
- Demo backup: `make web` (local mode) if the hosted page or the network fails. Stop it with Ctrl+C.
- The hosted demo stays up between sessions. Tear down only at the end of the event with `make destroy`.
## Security Hub
Built to FSBP, CIS v3.0 and AI Security Best Practices. Status below is by design; no Security Hub findings have been read for a deployed copy yet.
| Control | How the POC meets it |
|---|---|
| APIGateway.1 execution logging | INFO level on every method, bodies not logged, log group with 14 day retention |
| APIGateway.2 backend certificate | Client certificate attached to the stage |
| APIGateway.3 X-Ray tracing | Enabled on the stage |
| APIGateway.4 WAF on the stage | Regional WAFv2 web ACL: per-IP rate limit plus `AWSManagedRulesCommonRuleSet` |
| Stage access logging | JSON access log to CloudWatch Logs |
| WAF.10, WAF.11, WAF.12 | Web ACL has rules, logs to `aws-waf-logs-field-kit-amazon-ergo`, metrics on for every rule |
| Lambda.1 no public access | Invoke permission limited to this API's `POST /chat` |
| Lambda.2 supported runtime | `nodejs26.x` |
| Lambda.7 active tracing | Enabled |
| IAM least privilege | Role allows only `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream` on the three Ergo ARNs, writes to its own log group, and X-Ray writes (which accept no resource scope) |
| Authorization | `POST /chat` requires a token from the shared Cognito pool. No long-term keys anywhere |
Intentionally not met, or outside the kit:
| Item | Reason |
|---|---|
| Lambda.3 function in a VPC | The function only calls the Bedrock public endpoint. A VPC with endpoints adds fixed monthly cost to a demo that is idle most of the time |
| `OPTIONS /chat` has no authorizer | Browsers send no credentials on a CORS preflight. It is a mock integration that never reaches the Lambda or the model |
| Two common rule set rules count instead of block | `SizeRestrictions_BODY` and `CrossSiteScripting_BODY`: the body is a coding prompt, so it can pass 8 KB and contain markup. The Lambda caps prompt length and the page escapes model output |
| Bedrock model invocation logging and Guardrails | Invocation logging is an account-wide setting shared by every project, so the kit does not manage it. No guardrail is attached because the demo measures raw model speed; add one before using this pattern with customer data |
| Log group encryption with a customer managed key | Logs use the default CloudWatch Logs encryption. They hold request metadata and token counts, not prompts or answers |
API Gateway execution logging needs one CloudWatch role per account and Region. The shared platform owns it (`platform/terraform/apigateway.tf`), so deploy the platform before this kit.
## What the POC costs to run
| Item | Cost | Basis |
|---|---|---|
| One demo request | $0.009 to $0.037 measured | Measured 2026-12-01 on the "LRU cache with tests" preset: 83 input tokens and 3,035 to 9,079 output tokens. Output includes the reasoning, so it varies run to run. Largest run seen (hosted demo, "Retry with backoff" preset): 101 x $1.00 / 1M + 12,304 x $3.00 / 1M = $0.0370 |
| A 20-request demo session | About $0.75 at most | 20 x $0.0370 |
| Idle | Standard AWS WAF (two web ACLs), CloudFront and Route 53 charges. Not Ergo-specific; no figure in this kit's sources | See each service's pricing page |
| Lambda, API Gateway, Cognito, S3, CloudWatch Logs | Pay per use. No figure in this kit's sources | See each service's pricing page |
The playground computes each request's cost from the token usage Bedrock returns, at the global rates. `make cost` shows the actual spend by service. `make destroy` removes the fixed pieces.
## Unverified
- Knowledge cutoff: Bedrock docs say May 2026, the Hugging Face card says June 2026. Unverified which is right.
- Server-side web search: the model card lists it as supported; the Codex configuration note on the coding tools page says built-in server-side tools such as web search are not supported. Unverified which applies.
- How to join the Turbo preview: unverified.
- No Ergo-specific CloudFormation or Terraform resource; it is a model ID. Unverified against the registries.
- The model card states Zero Data Retention and Zero Operator Access on Bedrock. Seen on a second read; re-read the exact wording before quoting.
- The AWS News Blog body could not be re-loaded on a second attempt, so the two Dr. Matt Wood comparison claims (Kimi K3.1 Pro, Opus 5.5) rest on a single read. Re-read before quoting.
- The long aboutamazon.com/amazon-ergo page was only partly read, so an attributed quote may exist there.
- Throughput wording: "over 400 output tokens per second" on the model card; the product page says "generates 400".
- The limitation on the Hugging Face card is two separate fragments; do not join them into one quote.
- The GitHub samples link in the docs (https://github.com/aws-samples/amazon-ai-samples/ergo) is malformed; no working official sample repo confirmed. Use the sample code on the model card and the coding tools page.
## Detail cut from the published pages
Kept here so it is not lost. Facts are from the sources read 2026-12-01.
Access and APIs:
- IAM actions `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream` on `arn:aws:bedrock:*:*:inference-profile/us.amazon.ergo-1.0`, `arn:aws:bedrock:*:*:inference-profile/global.amazon.ergo-1.0` and `arn:aws:bedrock:*::foundation-model/amazon.ergo-1.0`. Policies need both the inference profile ARN and the foundation model ARN.
- OpenAI-compatible base URL: `https://bedrock-runtime.<region>.amazonaws.com/openai/v1`. boto3: `boto3.client('bedrock-runtime')`.
- OpenCode uses Chat Completions. Codex CLI uses Responses and needs `web_search = "disabled"` and `AWS_REGION`. Claude Code needs a local LiteLLM proxy. Kiro is listed.
- Also supported per the model card: implicit and explicit prompt caching, invocation logs, summarized reasoning.
- AgentCore harness supports Ergo: https://aws.amazon.com/about-aws/whats-new/2026/12/agentcore-harness-amazon-ergo/
- The global profile routes to a Region AWS selects. There is no EU or APAC geo profile.
Quotas:
```
aws service-quotas list-service-quotas --service-code bedrock --region us-east-1 \
--query "Quotas[?contains(QuotaName, 'Ergo')].[QuotaName,Value,Adjustable]" --output table
```
- The `Ergo` name filter is an assumption. If it returns nothing, drop `--query` and search the full list.
- A fleet of agents that all set the output limit to 131,072 uses up quota far faster than its real output. Set the limit close to what each call needs, and not below 8,192.
- Provisioned throughput: not published. Self-hosting hardware requirements: not published.
Pricing:
- Worked example over 22 working days: $9,592.00 without caching, $2,983.20 with. On the US profile add 10%: $479.60 and $149.16 per day.
- A cache write costs 25% more than plain input and lasts 30 minutes.
- Agent runs resend the same context every turn, so input dominates the bill. The cache hit rate is the number to measure in a pilot.
- The output limit does not change the price, but each request reserves its full limit against the account quota.
- Self-hosting cost and a self-hosting cost comparison are not published; the customer pays for their own compute.
Demo:
- Raising the reasoning effort on the same prompt: token count, wait and cost change from run to run; in test runs higher effort did not always mean more tokens. Point at what changed and do not predict the direction.
- If tokens per second differs from the published "over 400": the published figure is AWS's number for the service; the demo is one request measured through its own path. Do not explain the gap with a cause you have not verified.
- `docs/architecture.png` step 7 shows the call through the global inference profile.
Talking points:
- The Opus 5.5 claim compares speed and cost, not quality.
- Objection "Is this lock-in?": less than with a closed model. The same weights run outside Bedrock, and the API is OpenAI-compatible as well as Converse. Read the license's acceptable use policy before committing.
- Objection "Is there a batch discount?": no. Objection "Does it work with Knowledge Bases?": no.
- Closed-model comparison: use Ergo for high-volume agent work where the agent runs tests and checks its own changes, and keep a stronger model for the hardest steps. Both can sit behind the same Bedrock API.
- More questions: Do your agents run tests and verify their own changes, or does a person review every step? Do you want to fine-tune or self-host, or is pay per token on Bedrock enough? Which coding tools do your developers use: Kiro, OpenCode, Codex CLI, Claude Code?
poc/lambda/index.mjs
// Amazon Ergo playground backend: one Bedrock ConverseStream call, streamed to the caller as
// newline-delimited JSON events:
// {"type":"reasoning","text":...} reasoning summary deltas, when the model emits them
// {"type":"text","text":...} answer deltas
// {"type":"done","stop_reason":...,"usage":{...},"metrics":{...}}
// {"type":"error","message":...}
// Lambda runs `handler`; local mode (poc/local.mjs) and poc/verify.sh import `chat`, so every path
// makes the same Bedrock call.
import { BedrockRuntimeClient, ConverseStreamCommand } from "@aws-sdk/client-bedrock-runtime";
export const MODEL_ID = process.env.MODEL_ID || "global.amazon.ergo-1.0";
export const EFFORTS = ["low", "medium", "high", "xhigh", "max"];
export const MAX_PROMPT_CHARS = 20000;
// Ergo reasons inside the output limit and each request reserves the full limit against the account
// quota, so the limit is fixed here and never taken from the caller.
export const MAX_OUTPUT_TOKENS = 16384;
const SYSTEM = "You are a senior software engineer. Answer with working code first, then a short explanation.";
const client = new BedrockRuntimeClient({});
// Returns { prompt, effort } or { error } for a request body string.
export function parseRequest(raw) {
let body;
try {
body = JSON.parse(raw || "{}");
} catch {
return { error: "body must be JSON" };
}
const prompt = typeof body.prompt === "string" ? body.prompt.trim() : "";
const effort = body.effort ?? "medium";
if (!prompt) return { error: "prompt is required" };
if (prompt.length > MAX_PROMPT_CHARS) return { error: `prompt is longer than ${MAX_PROMPT_CHARS} characters` };
if (!EFFORTS.includes(effort)) return { error: `effort must be one of ${EFFORTS.join(", ")}` };
return { prompt, effort };
}
// Calls Ergo and passes each event object to emit. Resolves with the final "done" event.
// A failure before the first delta throws; a failure mid-stream throws after partial output.
export async function chat({ prompt, effort }, emit) {
const started = performance.now();
const response = await client.send(new ConverseStreamCommand({
modelId: MODEL_ID,
system: [{ text: SYSTEM }],
messages: [{ role: "user", content: [{ text: prompt }] }],
inferenceConfig: { maxTokens: MAX_OUTPUT_TOKENS },
outputConfig: { effort },
}));
let firstToken, stopReason, usage = {}, latencyMs;
for await (const event of response.stream) {
const delta = event.contentBlockDelta?.delta;
if (delta) {
const reasoning = delta.reasoningContent?.text;
if (delta.text || reasoning) firstToken ??= performance.now();
if (reasoning) emit({ type: "reasoning", text: reasoning });
if (delta.text) emit({ type: "text", text: delta.text });
} else if (event.messageStop) {
stopReason = event.messageStop.stopReason;
} else if (event.metadata) {
usage = event.metadata.usage ?? {};
latencyMs = event.metadata.metrics?.latencyMs;
} else {
const failure = Object.entries(event).find(([name]) => name.endsWith("Exception"));
if (failure) throw Object.assign(new Error(failure[1]?.message || failure[0]), { name: failure[0] });
}
}
const ended = performance.now();
const outputTokens = usage.outputTokens ?? 0;
const done = {
type: "done",
model_id: MODEL_ID,
effort,
max_output_tokens: MAX_OUTPUT_TOKENS,
stop_reason: stopReason,
usage: {
input_tokens: usage.inputTokens ?? 0,
output_tokens: outputTokens,
cache_read_tokens: usage.cacheReadInputTokens ?? 0,
cache_write_tokens: usage.cacheWriteInputTokens ?? 0,
},
// Timed around the Bedrock call. Ergo bills its reasoning as output tokens but does not stream it,
// so the reasoning happens during the wait for the first token. tokens_per_second therefore
// divides all output tokens by the whole request time.
metrics: {
ttft_ms: firstToken === undefined ? null : Math.round(firstToken - started),
total_ms: Math.round(ended - started),
bedrock_latency_ms: latencyMs ?? null,
tokens_per_second: round1(outputTokens / ((ended - started) / 1000)),
},
};
emit(done);
return done;
}
const round1 = (n) => Math.round(n * 10) / 10;
// HTTP status and a caller-safe message for a Bedrock failure. Details stay in the function log.
export function describeError(err) {
const name = err?.name || "Error";
if (name === "ThrottlingException") return { status: 429, message: "Bedrock throttled the request (account quota). Retry in a moment." };
if (name === "ValidationException") return { status: 400, message: `Bedrock rejected the request: ${err.message}` };
if (name === "AccessDeniedException") return { status: 502, message: "The backend is not allowed to invoke the model." };
return { status: 502, message: `Model call failed (${name}).` };
}
const cors = {
"Access-Control-Allow-Origin": process.env.ALLOWED_ORIGIN || "",
"Access-Control-Allow-Headers": "Authorization, Content-Type",
"Access-Control-Allow-Methods": "POST, OPTIONS",
};
// API Gateway proxy integration in STREAM mode: HttpResponseStream.from writes the status and
// headers, then everything written to the stream reaches the browser as it is produced.
export const handler = globalThis.awslambda?.streamifyResponse?.(async (event, responseStream) => {
const open = (statusCode, contentType) => globalThis.awslambda.HttpResponseStream.from(responseStream, {
statusCode,
headers: { ...cors, "Content-Type": contentType, "Cache-Control": "no-store" },
});
const fail = (statusCode, message) => {
const out = open(statusCode, "application/json");
out.write(JSON.stringify({ message }));
out.end();
};
const raw = event.isBase64Encoded ? Buffer.from(event.body || "", "base64").toString("utf8") : event.body;
const request = parseRequest(raw);
if (request.error) return fail(400, request.error);
// The response status is committed with the first event, so a failure before any output
// (throttling, access denied) still returns a real HTTP error.
let out;
const emit = (e) => {
out ??= open(200, "application/x-ndjson");
out.write(JSON.stringify(e) + "\n");
};
try {
const done = await chat(request, emit);
console.log(JSON.stringify({ effort: done.effort, stop_reason: done.stop_reason, usage: done.usage, metrics: done.metrics }));
} catch (err) {
console.error(err);
const { status, message } = describeError(err);
if (!out) return fail(status, message);
emit({ type: "error", message });
}
out.end();
});
poc/local.mjs
// Local mode: serves poc/web on 127.0.0.1 and answers POST /chat with the same Bedrock call the
// Lambda makes, using local AWS credentials (AWS_PROFILE, AWS_REGION). No sign-in.
// POST /chat?buffered=1 holds the events until the run is complete and replays them for an identical
// later request. Headless Chrome cannot wait for a slow streamed response, so poc/screenshots.sh makes
// the real run with curl first and the page then shows that run's events and measured timings.
// Usage: node local.mjs [port]
import { createServer } from "node:http";
import { readFile } from "node:fs/promises";
import { extname, join, normalize } from "node:path";
import { fileURLToPath } from "node:url";
import { MODEL_ID, chat, describeError, parseRequest } from "./lambda/index.mjs";
const here = fileURLToPath(new URL(".", import.meta.url));
const web = join(here, "web");
const port = Number(process.argv[2] || process.env.PORT || 8787);
const types = { ".html": "text/html; charset=utf-8", ".js": "text/javascript", ".css": "text/css", ".json": "application/json", ".svg": "image/svg+xml" };
const replays = new Map();
const json = (res, status, body) => {
res.writeHead(status, { "Content-Type": "application/json", "Cache-Control": "no-store" });
res.end(JSON.stringify(body));
};
async function handleChat(req, res, buffered) {
let raw = "";
for await (const chunk of req) {
raw += chunk;
if (raw.length > 100000) return json(res, 413, { message: "request body too large" });
}
const request = parseRequest(raw);
if (request.error) return json(res, 400, { message: request.error });
const key = JSON.stringify(request);
const held = (buffered && replays.get(key)) || [];
const send = (e) => {
if (!res.headersSent) res.writeHead(200, { "Content-Type": "application/x-ndjson", "Cache-Control": "no-store" });
res.write(JSON.stringify(e) + "\n");
};
const emit = buffered ? (e) => held.push(e) : send;
try {
if (!held.length) {
await chat(request, emit);
if (buffered) replays.set(key, held);
}
} catch (err) {
console.error(`${err.name}: ${err.message}`);
const { status, message } = describeError(err);
if (!res.headersSent && !held.length) return json(res, status, { message });
emit({ type: "error", message });
}
held.forEach(send);
res.end();
}
createServer(async (req, res) => {
const url = new URL(req.url, "http://localhost");
const path = url.pathname;
if (req.method === "POST" && path === "/chat") return handleChat(req, res, url.searchParams.get("buffered") === "1");
if (req.method !== "GET") return json(res, 405, { message: "method not allowed" });
// The local config has no "auth", so the page sends no token. It overrides a deployed web/config.json.
if (path === "/config.json") {
const prices = JSON.parse(await readFile(join(here, "prices.json"), "utf8"));
return json(res, 200, { api_url: "/chat", model_id: MODEL_ID, prices });
}
const file = normalize(join(web, path === "/" ? "index.html" : path));
if (!file.startsWith(web)) return json(res, 404, { message: "not found" });
try {
const body = await readFile(file);
res.writeHead(200, { "Content-Type": types[extname(file)] || "application/octet-stream", "Cache-Control": "no-store" });
res.end(body);
} catch {
json(res, 404, { message: "not found" });
}
}).listen(port, "127.0.0.1", () => console.log(`Amazon Ergo playground (local mode): http://127.0.0.1:${port}/`));
poc/package-lock.json
{
"name": "field-kit-amazon-ergo-poc",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "field-kit-amazon-ergo-poc",
"devDependencies": {
"@aws-sdk/client-bedrock-runtime": "^3"
}
},
"node_modules/@aws-sdk/client-bedrock-runtime": {
"version": "3.1183.0",
"resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.1183.0.tgz",
"integrity": "sha512-K+ZC/GGcxgpvu5Qr8vy+/k6MYjB7ivjZHQV8SnS0DeFDOGY55y+YUMoTsNVNV9eSQR0Sa0wJgvY7BTKJPCU8mA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/credential-provider-node": "^3.972.100",
"@aws-sdk/eventstream-handler-node": "^3.972.43",
"@aws-sdk/middleware-eventstream": "^3.972.39",
"@aws-sdk/middleware-websocket": "^3.972.68",
"@aws-sdk/token-providers": "3.1183.0",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/fetch-http-handler": "^5.8.1",
"@smithy/node-http-handler": "^4.14.2",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/core": {
"version": "3.981.2",
"resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.981.2.tgz",
"integrity": "sha512-N3XKZdfa+Dcm7Kl8NJnaaHLx860Ts3QYHOraj/wuKOYHqqCApQBIKwzSxrpwZdwrqfbPt7BvJdYVhVMPpsRoGA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/types": "^3.975.1",
"@aws-sdk/xml-builder": "^3.972.43",
"@aws/lambda-invoke-store": "^0.3.0",
"@smithy/core": "^3.41.1",
"@smithy/signature-v4": "^5.7.5",
"@smithy/types": "^4.20.0",
"bowser": "^2.11.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-env": {
"version": "3.972.86",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.86.tgz",
"integrity": "sha512-ZFIkIzLAiOLOakfrzUuOz938+AF+q4nc/MYINYwFlgBbl8CsI8ofJ8Ueh0/Pp7hXMJfpq10eJdnQ7aaE6kfikQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-http": {
"version": "3.972.89",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.89.tgz",
"integrity": "sha512-vxYNKrLdpHz7PF6grBBAC9QIC5bK7sP7/SFdx0PewJwbQbjpjiR/JuNDzXQQr+ix9Pb5ABRm6HcO68Vu401JuQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/fetch-http-handler": "^5.8.1",
"@smithy/node-http-handler": "^4.14.2",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-ini": {
"version": "3.973.33",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.973.33.tgz",
"integrity": "sha512-5h3d9kIhkUBWgzOMcmDSpnPxOKVWivwrdJe2K4E7D7n5sSJsYuBFkK6D5m2/KBnPpfcqYc/HIYfeRpQDFGVnOg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/credential-provider-env": "^3.972.86",
"@aws-sdk/credential-provider-http": "^3.972.89",
"@aws-sdk/credential-provider-login": "^3.972.94",
"@aws-sdk/credential-provider-process": "^3.972.86",
"@aws-sdk/credential-provider-sso": "^3.973.30",
"@aws-sdk/credential-provider-web-identity": "^3.972.92",
"@aws-sdk/nested-clients": "^3.998.5",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/credential-provider-imds": "^4.5.2",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-login": {
"version": "3.972.94",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.94.tgz",
"integrity": "sha512-sSq1PxdXT1kqR11/dRvE5AC2dEWMbYJCXzRU03Ulu4stu6vv08zju8uUNhVdqiIX+OrMIcEHHT1maLrUZDBGDA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/nested-clients": "^3.998.5",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-node": {
"version": "3.972.100",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.100.tgz",
"integrity": "sha512-7VCE4tJSre4xuC1M77AleZv0MPwQh/KfvozgYEbfqKAbfMhUYATRv011NZgqVn4Mf+4NeVZJ0NC3Ci8OagwHrg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/credential-provider-env": "^3.972.86",
"@aws-sdk/credential-provider-http": "^3.972.89",
"@aws-sdk/credential-provider-ini": "^3.973.33",
"@aws-sdk/credential-provider-process": "^3.972.86",
"@aws-sdk/credential-provider-sso": "^3.973.30",
"@aws-sdk/credential-provider-web-identity": "^3.972.92",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/credential-provider-imds": "^4.5.2",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-process": {
"version": "3.972.86",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.86.tgz",
"integrity": "sha512-9x/+gtSDNxMQrRXgwIdwdNCVGxzUZtTZArjEeLfsn9xDvyXdsgs4my1g7JN5wKxT61ZLx4bKPREaDXnO8j7gkg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-sso": {
"version": "3.973.30",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.973.30.tgz",
"integrity": "sha512-sMvwUIaKQEeprbMT5LXrI6nhM1IUEBDRpJAydEkAMrI7brrsRl7pxnOAJ6nweg/Hn5pJOVS7JgieJIv6CvJ7Sw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/nested-clients": "^3.998.5",
"@aws-sdk/token-providers": "3.1177.0",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers": {
"version": "3.1177.0",
"resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1177.0.tgz",
"integrity": "sha512-KFQ/2YqE7OIGNu05hys6y9ZUyoNxxLJVHM7NCvjfyjV0Mki0u0Euwjduj5M/HMurdbZJfBV0NjMNQQkGlJEQqg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/nested-clients": "^3.998.5",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/credential-provider-web-identity": {
"version": "3.972.92",
"resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.92.tgz",
"integrity": "sha512-AKaUwpy1wPN3B/byFWuvL6v+Qk8Gm840InZJw/bA1A+ciCL3zkzBUyEgxdeghJPEe79VKLs6BvbME74MQa3YKg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/nested-clients": "^3.998.5",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/eventstream-handler-node": {
"version": "3.972.43",
"resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-handler-node/-/eventstream-handler-node-3.972.43.tgz",
"integrity": "sha512-q7r2UxyaGdDf+//7esWvC95JLz9oEFljL2sKCZlkHa22HhEiIE4xwaP1CbWSxSPua/P2h2sgTHOgywuw8mVJRQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/middleware-eventstream": {
"version": "3.972.39",
"resolved": "https://registry.npmjs.org/@aws-sdk/middleware-eventstream/-/middleware-eventstream-3.972.39.tgz",
"integrity": "sha512-FZiEHXudprvzex41hoFZecbVmqYhbrOGsCm2W8C+xBPhKtk4DCkvnCIohh1WfmXPcphoHICeLcdR3sVQClMNUw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/middleware-websocket": {
"version": "3.972.68",
"resolved": "https://registry.npmjs.org/@aws-sdk/middleware-websocket/-/middleware-websocket-3.972.68.tgz",
"integrity": "sha512-Jm9R6LtSw8IeolnhInwcUaAUOO74kKTpy+URWthFrCBQKbd5ZulLtePYoGwiRBkao1UiIjvU1vfDjksOJFP1Vw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/fetch-http-handler": "^5.8.1",
"@smithy/signature-v4": "^5.7.5",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">= 14.0.0"
}
},
"node_modules/@aws-sdk/nested-clients": {
"version": "3.998.5",
"resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.998.5.tgz",
"integrity": "sha512-9w5mkwVLOuGqlJkPR1uhod6ZP+TOtaxrKtvK2pY9G/+FEx0e8wYRLIDeg30dYQjFDx27jHGSzEA+OaMqxeyTPg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/signature-v4-multi-region": "^3.996.52",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/fetch-http-handler": "^5.8.1",
"@smithy/node-http-handler": "^4.14.2",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/signature-v4-multi-region": {
"version": "3.996.52",
"resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.52.tgz",
"integrity": "sha512-6W6SjGc8OXUhMzNxU1X922ghD+PP1XvzmCk5Scui0jaYsLezycMYR1RaLp5xTIOUrhTXyb4DnAbPr3fBgmdnzg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/types": "^3.975.1",
"@smithy/signature-v4": "^5.7.5",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/token-providers": {
"version": "3.1183.0",
"resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1183.0.tgz",
"integrity": "sha512-3FjbYLLXQoCLFOVuNYGdwUNQvFB61ta5P/ErtBK8TNyf4K2rdBKnN1oO6a/1Pnq8wrV9UL5a3eDOzkwwcOxq+Q==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/core": "^3.981.2",
"@aws-sdk/nested-clients": "^3.998.5",
"@aws-sdk/types": "^3.975.1",
"@smithy/core": "^3.41.1",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/types": {
"version": "3.975.1",
"resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.975.1.tgz",
"integrity": "sha512-7rGxUkCB2QPoQOeJmonmAICTN2zrH+fpmi1p4Iwu72lnxNaMhOgqcbpyddifnM1DBb19TWQ1u6z/XjkaFNEDWw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws-sdk/xml-builder": {
"version": "3.972.43",
"resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.43.tgz",
"integrity": "sha512-rG8QVx4DOrJWptsogu1Aq+CDsnPKaBrAlJpKLxrJrIDXAq1ElnW0yQjjBnlWSXll0cDakCG6UDvaqwz0A9d9Og==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/@aws/lambda-invoke-store": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.3.0.tgz",
"integrity": "sha512-sl4Bm6yiMNYrZKkqqDFWN0UfnWhlS8ivKxrYl+6t0gCLrqr8y3B2IqZZbFRkfaVVp7C/baApyh71P+LeE1A2sQ==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@smithy/core": {
"version": "3.41.1",
"resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.41.1.tgz",
"integrity": "sha512-24LyiHSY0R/MLcbTylurWXU6Uy4lzI6KJgsdzxkNnjT9/OLWc2zGPb/3k5AM1f0vcgCGrExanUG339t+TBiIrA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@smithy/credential-provider-imds": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.5.2.tgz",
"integrity": "sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@smithy/core": "^3.33.2",
"@smithy/types": "^4.17.2",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@smithy/fetch-http-handler": {
"version": "5.8.1",
"resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.8.1.tgz",
"integrity": "sha512-h8BdMUrUBhMhMaeK7QqAdINRZezCGuYOCpcOZZ1ewxbHST9rdTd09xwNpvLTYfzDRehxQiReK4SKbdYZxBA+ew==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@smithy/core": "^3.39.0",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@smithy/node-http-handler": {
"version": "4.14.2",
"resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.14.2.tgz",
"integrity": "sha512-i1uORV1v3qBqP43ayRKzIdm1q5x14tf8N4Dd06/QUX1Szm6VxHMrTsu20X5E63UFsaNZCRjI4SXG0jDmqYa+3w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@smithy/core": "^3.39.0",
"@smithy/types": "^4.20.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@smithy/signature-v4": {
"version": "5.7.5",
"resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.7.5.tgz",
"integrity": "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@smithy/core": "^3.38.0",
"@smithy/types": "^4.19.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@smithy/types": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.20.0.tgz",
"integrity": "sha512-lCA6QG22dPk9ecHbv91jDQZsmtPUjdS1aE2Il6NNPqe7DrYc0dZQi6DhcESk2KYXH2sp5xbAcGdYMZDFnuzA2A==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/bowser": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/bowser/-/bowser-2.15.1.tgz",
"integrity": "sha512-ma47ABeUiTsmG4McKDtGCgQSiTCatM97Mlbn13K42N1kPSFE14oN3WFMjtyL4KubhGvQTqYheKl4Qx2bJtMXLQ==",
"dev": true,
"license": "MIT"
},
"node_modules/tslib": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
"integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",
"dev": true,
"license": "0BSD"
}
}
}
poc/package.json
{
"name": "field-kit-amazon-ergo-poc",
"private": true,
"type": "module",
"description": "Local mode for the Amazon Ergo playground. The Lambda uses the SDK bundled with its runtime.",
"devDependencies": {
"@aws-sdk/client-bedrock-runtime": "^3"
}
}
poc/prices.json
{
"profile": "Global cross-Region",
"unit": "USD per 1M tokens",
"input": 1.00,
"output": 3.00,
"cache_read": 0.03,
"cache_write": 1.25,
"source": "https://aws.amazon.com/products/ergo/pricing/",
"read_on": "2026-12-01"
}
poc/quickstart.py
#!/usr/bin/env python3
"""Amazon Ergo on Amazon Bedrock: one streamed request, with measured speed and cost.
Needs: boto3 1.44.17 or later. Tested with 1.44.17: pip install boto3==1.44.17
(that exact release: https://pypi.org/project/boto3/1.44.17/). An older boto3 may
reject the outputConfig field that sets the reasoning effort.
AWS credentials with bedrock:InvokeModelWithResponseStream on the Ergo inference
profile, and a Region where the global profile is callable.
The same call from the AWS CLI is in quickstart.sh (AWS CLI 2.37.0 or later).
Run: python3 quickstart.py
python3 quickstart.py "Write a Go function that merges two sorted slices." high
"""
import sys
import time
import boto3
TESTED_BOTO3 = "1.44.17" # https://pypi.org/project/boto3/1.44.17/
if tuple(int(part) for part in boto3.__version__.split(".")[:3]) < (1, 44, 17):
print(f"warning: boto3 {boto3.__version__} is older than the tested {TESTED_BOTO3}; "
f"if a call is rejected, run: pip install boto3=={TESTED_BOTO3}", file=sys.stderr)
MODEL_ID = "global.amazon.ergo-1.0" # the base ID amazon.ergo-1.0 cannot be called directly
PRICE_IN, PRICE_OUT = 1.00, 3.00 # USD per 1M tokens, Global cross-Region, read 2026-12-01
prompt = sys.argv[1] if len(sys.argv) > 1 else "Write a Python LRU cache class with O(1) get and put, and pytest tests."
effort = sys.argv[2] if len(sys.argv) > 2 else "medium" # low | medium | high | xhigh | max
client = boto3.client("bedrock-runtime", region_name="us-east-1")
started = time.time()
response = client.converse_stream(
modelId=MODEL_ID,
messages=[{"role": "user", "content": [{"text": prompt}]}],
inferenceConfig={"maxTokens": 16384}, # Ergo needs at least 8,192
outputConfig={"effort": effort}, # Ergo always reasons; this sets how hard
)
first_token = None
usage = {}
for event in response["stream"]:
text = event.get("contentBlockDelta", {}).get("delta", {}).get("text")
if text:
first_token = first_token or time.time()
print(text, end="", flush=True)
elif "metadata" in event:
usage = event["metadata"]["usage"]
total = time.time() - started
# Reasoning is billed as output tokens but is not streamed, so it shows up as the wait for the first token.
cost = (usage["inputTokens"] * PRICE_IN + usage["outputTokens"] * PRICE_OUT) / 1_000_000
print(f"\n\n--- {MODEL_ID}, effort {effort}")
print(f"first token {first_token - started:.1f} s")
print(f"total time {total:.1f} s")
print(f"tokens {usage['inputTokens']} in, {usage['outputTokens']} out (output includes reasoning)")
print(f"output speed {usage['outputTokens'] / total:.0f} tokens/s (all output tokens over total time)")
print(f"cost ${cost:.5f}")
poc/quickstart.sh
#!/usr/bin/env bash
# Amazon Ergo on Amazon Bedrock from the AWS CLI: one request, then the answer and token usage.
#
# Needs: AWS CLI 2.37.0 or later (aws --version). Tested with 2.37.0.
# Installers for that exact version:
# macOS https://awscli.amazonaws.com/AWSCLIV2-2.37.0.pkg
# Linux https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.37.0.zip
# Windows https://awscli.amazonaws.com/AWSCLIV2-2.37.0.msi
# Credentials with bedrock:InvokeModel on the Ergo inference profile.
#
# Run: ./quickstart.sh
# ./quickstart.sh "Write a Go function that merges two sorted slices." high
set -euo pipefail
PROMPT="${1:-Write a Python function that checks whether a string is a palindrome. Code only.}"
EFFORT="${2:-low}" # low | medium | high | xhigh | max
aws bedrock-runtime converse \
--region us-east-1 \
--model-id global.amazon.ergo-1.0 \
--messages "$(jq -n --arg p "$PROMPT" '[{role: "user", content: [{text: $p}]}]')" \
--inference-config maxTokens=16384 \
--output-config effort="$EFFORT" \
--query '{answer: output.message.content[?text].text | [0], usage: usage, latencyMs: metrics.latencyMs}' \
--output json
poc/screenshots.sh
#!/usr/bin/env bash
# Capture docs/screenshots/*.png from the running POC with shared/screenshot.sh.
# Starts local mode, makes each run against Ergo with local credentials, captures the page showing
# that run, then stops the server. Run from the kit directory.
set -euo pipefail
cd "$(dirname "$0")/.."
PORT="${PORT:-8787}"
BASE="http://127.0.0.1:$PORT"
SHOT=../../shared/screenshot.sh
OUT=docs/screenshots
[ -d poc/node_modules ] || { echo "poc/node_modules not found. Run make deps first."; exit 1; }
node poc/local.mjs "$PORT" > /dev/null &
server=$!
trap 'kill "$server" 2>/dev/null || true' EXIT
for _ in $(seq 1 50); do curl -s -o /dev/null "$BASE/" && break; sleep 0.2; done
# Headless Chrome cannot wait for a slow streamed response, so the run is made here first and
# local mode replays its events to the page (see poc/local.mjs).
run_and_capture() { # <preset 1..3> <effort> <theme> <out.png>
local body
body=$(jq -c --argjson i "$(($1 - 1))" --arg e "$2" '{prompt: .[$i].prompt, effort: $e}' poc/web/presets.json)
curl -s -X POST "$BASE/chat?buffered=1" -H 'Content-Type: application/json' -d "$body" | grep -q '"type":"done"' \
|| { echo "run failed for preset $1 at effort $2"; exit 1; }
"$SHOT" "$BASE/?preset=$1&effort=$2&theme=$3&autorun=1&capture=1" "$OUT/$4"
}
"$SHOT" "$BASE/?theme=light" "$OUT/01-playground.png"
run_and_capture 1 medium light 02-lru-cache-medium.png
run_and_capture 2 high dark 03-find-the-bug-high.png
run_and_capture 3 low light 04-retry-low.png
poc/terraform/.terraform.lock.hcl
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/archive" {
version = "2.8.1"
constraints = "~> 2.7"
hashes = [
"h1:aLNmq6dc3cDcqZc8s/8eKtn0I+UQXyJMGrmo4rRFtNw=",
"zh:03de290604114a89fcd45c2e5bc7787d5a1ebfc5f964fb5989306bea7a4c79ec",
"zh:0a7d69dc9fbbc48960bc2f04588c8fb1bd92c78a8f306566b7fb17fc4a4f2058",
"zh:4df1f3981379c35f1757da957470f7f7724496b57219da3485177cf1647bdf59",
"zh:50f0e72ba53bfe6e11b03b7fc899e1f72536354381d302a743a274ae2a3f45f4",
"zh:5c4e15a04c98e2a8cafb1cd9632b48ad318051e8462d105b1153006277985c35",
"zh:66069e604bcf5c4af0278e15997d9e6bd755c54fb3801d78885838b889729c5f",
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
"zh:979765db3f42601870ab377104ba70befb029547b278337ec4ada980e3582de6",
"zh:b165254da774f49945a73fbccc3ef1b63d70ea00a98fa9e14716665ba80ecaad",
"zh:c0bb2697b525da9fec4511f569ed2bd2b42f25d5c1f9fa00f8f3645b50cfc2e9",
"zh:c48f6695d12df0d0fa5231f7c1b8d518a4feae91a733fdd35a5804af3a303831",
"zh:d589954c93f075180c9f4e2ce91780d5edcb56dfd0d3cda8ba08e13c10b52249",
"zh:f5792ed06da65d0daf7ca3711f5399ff78c7cb4400afe53fbce9a926fbde4477",
]
}
provider "registry.terraform.io/hashicorp/aws" {
version = "6.74.0"
constraints = "~> 6.73"
hashes = [
"h1:GGkXKbt7+sXkQXj3O1PUmnYW+/9N94EXSLcN1DqD/Uk=",
"zh:0195ddb9287fe55c791d473cb8f9d4a14652d3f355790ad8ad52d76636b21b3d",
"zh:03b01f71035a843b1e7c9b487be345a9b13cf2bd48d859ba0eb33690158b6ad5",
"zh:07c300df46cbca514b1c77874cf1cd4c80ca661815c02b329dfd68e75d51db27",
"zh:20f6f985d5079a0609b48c56470c93b60f9123664d1a97529e23f44835000186",
"zh:2b273ebf95109a57a4fa07da7f4c1dba745d11cab1fcbf8c75167350f02865c6",
"zh:2ede1946c7da024987f949000b07c274f81b387f994ab694f788721f338dd345",
"zh:3ebc9ff8f1c5cea279869b842ae13cbe080d6366cfc2c16b87770f2be0819bc9",
"zh:42d9fab178882caee2a2e17845c4a77220fd0a6e71abb592a160eb29d3b05da4",
"zh:4a7a88e2f77b2c762fc197099c9bbd1982b73cd2d3f4bcbd3f433369ab696654",
"zh:54adb2bb17ac83894464f534662277f8e3a8fd48580ef91ae163fef24f3aae61",
"zh:60a43dc21cee60a345e5e5b96548c0dfe96412c48f98e881626ad93ba13355be",
"zh:97b47a55644fc2ca4f53d0e277f6d8d3a3bb7279734185740580aba7de28ff29",
"zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425",
"zh:9e58ab011c415054a5db9dbdc7b0a92a1761237f004307aaff840f6a814864c5",
"zh:bfe27226aee65ce297c290ff9baf1dcb0fff5d41a28a5dcdd6f4a63b8404ac7e",
"zh:f178adb7610193afe4aaba76ec058a0a72b04b0ccc9b1a7a420e69f7bc6a19aa",
]
}
poc/terraform/api.tf
# REST API: POST /chat behind the shared Cognito authorizer, streamed from the Lambda.
locals {
stage_name = "demo"
cors_headers = {
"Access-Control-Allow-Origin" = "'${local.auth.site_origin}'"
"Access-Control-Allow-Headers" = "'Authorization,Content-Type'"
"Access-Control-Allow-Methods" = "'POST,OPTIONS'"
}
}
resource "aws_api_gateway_rest_api" "this" {
name = local.name
description = "Amazon Ergo playground"
endpoint_configuration {
types = ["REGIONAL"]
}
}
resource "aws_api_gateway_authorizer" "cognito" {
name = "shared-sign-in"
rest_api_id = aws_api_gateway_rest_api.this.id
type = "COGNITO_USER_POOLS"
provider_arns = [local.auth.user_pool_arn]
identity_source = "method.request.header.Authorization"
}
resource "aws_api_gateway_resource" "chat" {
rest_api_id = aws_api_gateway_rest_api.this.id
parent_id = aws_api_gateway_rest_api.this.root_resource_id
path_part = "chat"
}
resource "aws_api_gateway_method" "chat" {
rest_api_id = aws_api_gateway_rest_api.this.id
resource_id = aws_api_gateway_resource.chat.id
http_method = "POST"
authorization = "COGNITO_USER_POOLS"
authorizer_id = aws_api_gateway_authorizer.cognito.id
}
# STREAM mode invokes the function with InvokeWithResponseStream and forwards bytes as they arrive.
resource "aws_api_gateway_integration" "chat" {
rest_api_id = aws_api_gateway_rest_api.this.id
resource_id = aws_api_gateway_resource.chat.id
http_method = aws_api_gateway_method.chat.http_method
integration_http_method = "POST"
type = "AWS_PROXY"
uri = aws_lambda_function.chat.response_streaming_invoke_arn
response_transfer_mode = "STREAM"
timeout_milliseconds = 125000
}
# Browsers send no credentials on a CORS preflight, so OPTIONS has no authorizer and never reaches the Lambda.
resource "aws_api_gateway_method" "preflight" {
rest_api_id = aws_api_gateway_rest_api.this.id
resource_id = aws_api_gateway_resource.chat.id
http_method = "OPTIONS"
authorization = "NONE"
}
resource "aws_api_gateway_integration" "preflight" {
rest_api_id = aws_api_gateway_rest_api.this.id
resource_id = aws_api_gateway_resource.chat.id
http_method = aws_api_gateway_method.preflight.http_method
type = "MOCK"
request_templates = {
"application/json" = jsonencode({ statusCode = 200 })
}
}
resource "aws_api_gateway_method_response" "preflight" {
rest_api_id = aws_api_gateway_rest_api.this.id
resource_id = aws_api_gateway_resource.chat.id
http_method = aws_api_gateway_method.preflight.http_method
status_code = "200"
response_parameters = { for name, _ in local.cors_headers : "method.response.header.${name}" => true }
}
resource "aws_api_gateway_integration_response" "preflight" {
rest_api_id = aws_api_gateway_rest_api.this.id
resource_id = aws_api_gateway_resource.chat.id
http_method = aws_api_gateway_method.preflight.http_method
status_code = aws_api_gateway_method_response.preflight.status_code
response_parameters = { for name, value in local.cors_headers : "method.response.header.${name}" => value }
depends_on = [aws_api_gateway_integration.preflight]
}
# Errors raised by API Gateway itself (401 from the authorizer, 403 from the web ACL, 429 from
# throttling) carry the CORS origin so the page can read the status.
resource "aws_api_gateway_gateway_response" "cors" {
for_each = toset(["DEFAULT_4XX", "DEFAULT_5XX"])
rest_api_id = aws_api_gateway_rest_api.this.id
response_type = each.key
response_parameters = {
"gatewayresponse.header.Access-Control-Allow-Origin" = local.cors_headers["Access-Control-Allow-Origin"]
}
}
resource "aws_api_gateway_deployment" "this" {
rest_api_id = aws_api_gateway_rest_api.this.id
triggers = {
redeployment = sha1(jsonencode([
aws_api_gateway_resource.chat,
aws_api_gateway_method.chat,
aws_api_gateway_integration.chat,
aws_api_gateway_authorizer.cognito,
aws_api_gateway_method.preflight,
aws_api_gateway_integration.preflight,
aws_api_gateway_method_response.preflight,
aws_api_gateway_integration_response.preflight,
aws_api_gateway_gateway_response.cors,
]))
}
lifecycle {
create_before_destroy = true
}
}
resource "aws_cloudwatch_log_group" "api_access" {
name = "/${local.name}/api-access"
retention_in_days = 14
}
# API Gateway writes execution logs to a group with this fixed name. Creating it here sets the
# retention and lets destroy remove it.
resource "aws_cloudwatch_log_group" "api_execution" {
name = "API-Gateway-Execution-Logs_${aws_api_gateway_rest_api.this.id}/${local.stage_name}"
retention_in_days = 14
}
resource "aws_api_gateway_client_certificate" "this" {
description = "${local.name} ${local.stage_name} stage"
}
resource "aws_api_gateway_stage" "this" {
rest_api_id = aws_api_gateway_rest_api.this.id
deployment_id = aws_api_gateway_deployment.this.id
stage_name = local.stage_name
xray_tracing_enabled = true
client_certificate_id = aws_api_gateway_client_certificate.this.id
access_log_settings {
destination_arn = aws_cloudwatch_log_group.api_access.arn
format = jsonencode({
requestId = "$context.requestId"
requestTime = "$context.requestTime"
sourceIp = "$context.identity.sourceIp"
user = "$context.authorizer.claims.sub"
httpMethod = "$context.httpMethod"
resourcePath = "$context.resourcePath"
status = "$context.status"
responseSize = "$context.responseLength"
latencyMs = "$context.responseLatency"
wafStatus = "$context.waf.status"
error = "$context.error.message"
})
}
# The account-level role that lets API Gateway write execution logs is owned by platform/.
depends_on = [aws_cloudwatch_log_group.api_execution]
}
# Cost guard and execution logging for every method. Request and response bodies are not logged.
resource "aws_api_gateway_method_settings" "all" {
rest_api_id = aws_api_gateway_rest_api.this.id
stage_name = aws_api_gateway_stage.this.stage_name
method_path = "*/*"
settings {
logging_level = "INFO"
data_trace_enabled = false
metrics_enabled = true
throttling_rate_limit = 2
throttling_burst_limit = 5
}
}
poc/terraform/locals.tf
locals {
name = var.project_name
tags = {
Project = var.project_name
Environment = var.environment
Owner = var.owner
CostCenter = var.cost_center
ManagedBy = "terraform"
Repository = var.repository
}
}
poc/terraform/main.tf
# Amazon Ergo playground backend: one streaming Lambda that calls Bedrock ConverseStream.
# The API in front of it is in api.tf and its web ACL in waf.tf.
data "aws_caller_identity" "current" {}
# Shared sign-in (Cognito pool, web client, site origin) from the platform stack.
data "terraform_remote_state" "platform" {
backend = "local"
config = {
path = "${path.module}/../../../../platform/terraform/terraform.tfstate"
}
}
locals {
auth = data.terraform_remote_state.platform.outputs.auth
model_id = "global.amazon.ergo-1.0"
# Ergo is served through cross-Region inference only, so a call touches the profile and the
# foundation model in whichever Region serves it.
ergo_arns = [
"arn:aws:bedrock:*:*:inference-profile/us.amazon.ergo-1.0",
"arn:aws:bedrock:*:*:inference-profile/global.amazon.ergo-1.0",
"arn:aws:bedrock:*::foundation-model/amazon.ergo-1.0",
]
}
# The zip holds only the handler; the SDK comes from the Lambda runtime.
data "archive_file" "chat" {
type = "zip"
source_file = "${path.module}/../lambda/index.mjs"
output_path = "${path.module}/../../build/chat.zip"
}
resource "aws_cloudwatch_log_group" "chat" {
name = "/aws/lambda/${local.name}"
retention_in_days = 14
}
data "aws_iam_policy_document" "chat_assume" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["lambda.amazonaws.com"]
}
}
}
data "aws_iam_policy_document" "chat" {
statement {
sid = "InvokeErgo"
actions = ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"]
resources = local.ergo_arns
}
statement {
sid = "WriteOwnLogs"
actions = ["logs:CreateLogStream", "logs:PutLogEvents"]
resources = ["${aws_cloudwatch_log_group.chat.arn}:*"]
}
# X-Ray write actions do not support resource-level permissions.
statement {
sid = "WriteTraces"
actions = ["xray:PutTraceSegments", "xray:PutTelemetryRecords"]
resources = ["*"]
}
}
resource "aws_iam_role" "chat" {
name = "${local.name}-chat"
assume_role_policy = data.aws_iam_policy_document.chat_assume.json
}
resource "aws_iam_role_policy" "chat" {
name = "invoke-ergo"
role = aws_iam_role.chat.id
policy = data.aws_iam_policy_document.chat.json
}
resource "aws_lambda_function" "chat" {
function_name = local.name
role = aws_iam_role.chat.arn
runtime = "nodejs26.x"
architectures = ["arm64"]
handler = "index.handler"
filename = data.archive_file.chat.output_path
source_code_hash = data.archive_file.chat.output_base64sha256
memory_size = 256
timeout = 120
# Cost guard: at most five model calls run at once.
reserved_concurrent_executions = 5
environment {
variables = {
MODEL_ID = local.model_id
ALLOWED_ORIGIN = local.auth.site_origin
}
}
tracing_config {
mode = "Active"
}
logging_config {
log_format = "Text"
log_group = aws_cloudwatch_log_group.chat.name
}
depends_on = [aws_iam_role_policy.chat]
}
resource "aws_lambda_permission" "api" {
statement_id = "AllowChatMethod"
action = "lambda:InvokeFunction"
function_name = aws_lambda_function.chat.function_name
principal = "apigateway.amazonaws.com"
source_arn = "${aws_api_gateway_rest_api.this.execution_arn}/*/POST/chat"
}
poc/terraform/outputs.tf
output "api_url" {
description = "POST endpoint the playground page calls."
value = "${aws_api_gateway_stage.this.invoke_url}/chat"
}
output "function_name" {
value = aws_lambda_function.chat.function_name
}
output "model_id" {
value = local.model_id
}
# The sign-in settings the page passes to fieldKitAuth.token. The pool ARN stays out of the
# published config because it contains the account ID.
output "auth" {
value = {
hosted_ui = local.auth.hosted_ui
client_id = local.auth.client_id
callback_url = local.auth.callback_url
identity_source = local.auth.identity_source
}
}
output "site_origin" {
value = local.auth.site_origin
}
poc/terraform/variables.tf
variable "project_name" {
description = "Project name used for resource names and the Project tag. The kit Makefile sets it to field-kit-<slug>."
type = string
}
variable "region" {
description = "Region the POC deploys to."
type = string
default = "us-east-1"
}
variable "environment" {
description = "Environment tag value."
type = string
default = "dev"
}
variable "owner" {
description = "Owner tag value."
type = string
default = "renkenk"
}
variable "cost_center" {
description = "CostCenter tag value for cost allocation. Required."
type = string
validation {
condition = length(trimspace(var.cost_center)) > 0
error_message = "cost_center must not be empty."
}
}
variable "repository" {
description = "Repository tag value."
type = string
default = "reinvent-field-kits"
}
poc/terraform/versions.tf
terraform {
required_version = ">= 1.17"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.73"
}
archive = {
source = "hashicorp/archive"
version = "~> 2.7"
}
}
}
provider "aws" {
region = var.region
default_tags {
tags = local.tags
}
}
poc/terraform/waf.tf
# Regional web ACL on the API stage: a per-IP rate limit and the AWS common rule set.
resource "aws_wafv2_web_acl" "api" {
name = local.name
scope = "REGIONAL"
default_action {
allow {}
}
rule {
name = "rate-limit"
priority = 1
action {
block {}
}
statement {
rate_based_statement {
limit = 100
evaluation_window_sec = 300
aggregate_key_type = "IP"
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "${local.name}-rate-limit"
sampled_requests_enabled = true
}
}
rule {
name = "aws-common"
priority = 2
override_action {
none {}
}
statement {
managed_rule_group_statement {
vendor_name = "AWS"
name = "AWSManagedRulesCommonRuleSet"
# The request body is a coding prompt, so it is legitimately larger than 8 KB and may
# contain markup. The Lambda caps the prompt length and the page escapes model output.
rule_action_override {
name = "SizeRestrictions_BODY"
action_to_use {
count {}
}
}
rule_action_override {
name = "CrossSiteScripting_BODY"
action_to_use {
count {}
}
}
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "${local.name}-aws-common"
sampled_requests_enabled = true
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = local.name
sampled_requests_enabled = true
}
}
resource "aws_wafv2_web_acl_association" "api" {
resource_arn = aws_api_gateway_stage.this.arn
web_acl_arn = aws_wafv2_web_acl.api.arn
}
# WAF only delivers to log groups whose name starts with aws-waf-logs-.
resource "aws_cloudwatch_log_group" "waf" {
name = "aws-waf-logs-${local.name}"
retention_in_days = 14
}
data "aws_iam_policy_document" "waf_logs" {
statement {
actions = ["logs:CreateLogStream", "logs:PutLogEvents"]
resources = ["${aws_cloudwatch_log_group.waf.arn}:*"]
principals {
type = "Service"
identifiers = ["delivery.logs.amazonaws.com"]
}
condition {
test = "StringEquals"
variable = "aws:SourceAccount"
values = [data.aws_caller_identity.current.account_id]
}
}
}
resource "aws_cloudwatch_log_resource_policy" "waf" {
policy_name = "${local.name}-waf-logs"
policy_document = data.aws_iam_policy_document.waf_logs.json
}
resource "aws_wafv2_web_acl_logging_configuration" "api" {
resource_arn = aws_wafv2_web_acl.api.arn
log_destination_configs = [aws_cloudwatch_log_group.waf.arn]
depends_on = [aws_cloudwatch_log_resource_policy.waf]
}
poc/verify.sh
#!/usr/bin/env bash
# End to end checks for this kit. Exit non-zero when a check fails.
# Run from the kit directory after `make deploy` (reads build/config.json).
set -euo pipefail
cd "$(dirname "$0")/.."
CFG=build/config.json
[ -f "$CFG" ] || { echo "FAIL: $CFG not found. Run make deploy first."; exit 1; }
[ -d poc/node_modules ] || { echo "FAIL: poc/node_modules not found. Run make deps first."; exit 1; }
api_url=$(jq -r .api_url.value "$CFG")
function_name=$(jq -r .function_name.value "$CFG")
prompt="Write a Python function that returns the nth Fibonacci number iteratively, with a docstring."
work=build/verify
mkdir -p "$work"
echo "== 1. The API rejects a request with no token"
status=$(curl -s -o /dev/null -w '%{http_code}' -X POST "$api_url" -H 'Content-Type: application/json' -d '{"prompt":"hi"}')
[ "$status" = "401" ] || { echo "FAIL: expected 401, got $status"; exit 1; }
echo "ok: 401"
echo "== 2. Direct Bedrock ConverseStream call to Ergo with local credentials"
(cd poc && PROMPT="$prompt" node --input-type=module -e '
import { chat } from "./lambda/index.mjs";
let text = "";
const done = await chat({ prompt: process.env.PROMPT, effort: "low" }, (e) => { if (e.type === "text") text += e.text; });
if (!text.trim() || !done.usage.output_tokens) { console.error("FAIL: no text or no usage"); process.exit(1); }
console.log(`ok: ${text.length} characters, ${done.usage.input_tokens} tokens in, ${done.usage.output_tokens} tokens out`);
console.log(`ok: first token ${done.metrics.ttft_ms} ms, total ${done.metrics.total_ms} ms, ${done.metrics.tokens_per_second} output tokens per second`);
// Ergo always reasons: an effort of "none" must be rejected, which also proves the effort field reaches the model.
try {
await chat({ prompt: "hi", effort: "none" }, () => {});
console.error("FAIL: effort none was accepted, so the effort setting is not reaching the model");
process.exit(1);
} catch (err) {
if (err.name !== "ValidationException") throw err;
console.log("ok: effort none is rejected by Bedrock");
}
')
echo "== 3. The Lambda, invoked directly, returns a streamed answer with usage"
jq -n --arg p "$prompt" '{body: ({prompt: $p, effort: "low"} | tojson)}' > "$work/event.json"
aws lambda invoke --function-name "$function_name" --cli-binary-format raw-in-base64-out \
--payload "file://$work/event.json" "$work/out" > "$work/invoke.json"
if jq -e .FunctionError "$work/invoke.json" > /dev/null; then echo "FAIL: function error"; head -c 600 "$work/out"; exit 1; fi
# A buffered invoke returns the response metadata, eight NUL bytes, then the event lines.
perl -0777 -pe 's/^.*?\x00{8}//s' "$work/out" > "$work/events.ndjson"
done_event=$(grep '"type":"done"' "$work/events.ndjson" | tail -1 || true)
[ -n "$done_event" ] || { echo "FAIL: no done event"; head -c 600 "$work/out"; exit 1; }
grep -q '"type":"text"' "$work/events.ndjson" || { echo "FAIL: no text events"; exit 1; }
[ "$(echo "$done_event" | jq .usage.output_tokens)" -gt 0 ] || { echo "FAIL: no output tokens"; exit 1; }
echo "ok: $(grep -c '"type":"text"' "$work/events.ndjson") text events, $(echo "$done_event" | jq -r '"\(.usage.input_tokens) tokens in, \(.usage.output_tokens) tokens out"')"
echo "ok: $(echo "$done_event" | jq -r '"first token \(.metrics.ttft_ms) ms, total \(.metrics.total_ms) ms, \(.metrics.tokens_per_second) output tokens per second"')"
echo "verify passed"
poc/web/app.js
// Amazon Ergo playground. Loads config.json from this directory, posts the prompt to cfg.api_url and
// reads newline-delimited JSON events: reasoning and text deltas, then one "done" event with usage.
// While a run streams, the tiles show browser-side timings; the "done" event replaces them with the
// timings the backend measured around the Bedrock call.
// Query options: ?preset=1..3 selects a preset, &effort=low|medium|high|xhigh|max, &autorun=1 runs
// it on load, &theme=light|dark fixes the theme. &capture=1 asks local mode for a complete,
// replayable response, which lets headless Chrome screenshot a finished run (see poc/local.mjs).
(function () {
const EFFORTS = ["low", "medium", "high", "xhigh", "max"];
const $ = (id) => document.getElementById(id);
const query = new URLSearchParams(location.search);
const el = {
prompt: $("prompt"), run: $("run"), status: $("status"), answer: $("answer"), scroll: $("scroll"),
reasoning: $("reasoning"), reasoningText: $("reasoning-text"), hint: $("answer-hint"),
};
let cfg = null;
let presets = [];
let effort = EFFORTS.includes(query.get("effort")) ? query.get("effort") : "medium";
let running = false;
// Theme: an explicit choice (query option or the toggle) wins over the system setting.
const root = document.documentElement;
const systemDark = () => matchMedia("(prefers-color-scheme: dark)").matches;
const currentTheme = () => root.dataset.theme || (systemDark() ? "dark" : "light");
const showTheme = () => { $("theme").textContent = currentTheme() === "dark" ? "Light" : "Dark"; };
const chosen = query.get("theme") || localStorage.getItem("ergo.theme");
if (chosen === "light" || chosen === "dark") root.dataset.theme = chosen;
showTheme();
$("theme").addEventListener("click", () => {
root.dataset.theme = currentTheme() === "dark" ? "light" : "dark";
localStorage.setItem("ergo.theme", root.dataset.theme);
showTheme();
});
// Presets and the effort selector.
let presetButtons = [];
function showPresets() {
presetButtons = presets.map((preset, i) => {
const b = document.createElement("button");
b.type = "button";
b.className = "preset";
b.textContent = preset.name;
b.setAttribute("aria-pressed", "false");
b.addEventListener("click", () => selectPreset(i));
$("presets").append(b);
return b;
});
}
function selectPreset(i) {
el.prompt.value = presets[i].prompt;
presetButtons.forEach((b, n) => b.setAttribute("aria-pressed", String(n === i)));
}
el.prompt.addEventListener("input", () => presetButtons.forEach((b) => b.setAttribute("aria-pressed", "false")));
const effortButtons = EFFORTS.map((value) => {
const b = document.createElement("button");
b.type = "button";
b.textContent = value;
b.setAttribute("role", "radio");
b.addEventListener("click", () => { effort = value; showEffort(); });
$("effort").append(b);
return b;
});
const showEffort = () => effortButtons.forEach((b) => b.setAttribute("aria-checked", String(b.textContent === effort)));
showEffort();
// Escapes model output, then renders fenced code, inline code, bold and headings. Nothing else is
// interpreted, so model output can never inject markup.
const escapeHtml = (s) => s.replace(/[&<>"']/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c]));
function inline(text) {
return escapeHtml(text)
.replace(/`([^`\n]+)`/g, "<code>$1</code>")
.replace(/\*\*([^*\n]+)\*\*/g, "<strong>$1</strong>");
}
function render(markdown) {
return markdown.split(/^```/m).map((part, i) => {
if (i % 2 === 1) {
const newline = part.indexOf("\n");
const lang = newline === -1 ? "" : part.slice(0, newline).trim();
const code = newline === -1 ? part : part.slice(newline + 1);
return `<pre${lang ? ` data-lang="${escapeHtml(lang)}"` : ""}><code>${escapeHtml(code.replace(/\n$/, ""))}</code></pre>`;
}
return part.split(/\n{2,}/).filter((block) => block.trim()).map((block) => {
const heading = block.match(/^#{1,6}\s+(.*)$/);
return heading ? `<h3>${inline(heading[1])}</h3>` : `<p>${inline(block.trim())}</p>`;
}).join("");
}).join("");
}
const seconds = (ms) => (ms / 1000).toFixed(2);
const count = (n) => n.toLocaleString("en-US");
const set = (id, text) => {
$(id).textContent = text;
$(id).classList.toggle("pending", text === "--");
};
function setStatus(text, isError) {
el.status.textContent = text;
el.status.classList.toggle("error", Boolean(isError));
}
function resetMetrics() {
["m-tps", "m-ttft", "m-total", "m-in", "m-out", "m-cost"].forEach((id) => set(id, "--"));
set("m-tokens-sub", "output includes reasoning");
}
// Dollar cost of one request from its token usage and the per-1M-token prices in config.json.
function cost(usage, prices) {
return (usage.input_tokens * prices.input + usage.output_tokens * prices.output
+ usage.cache_read_tokens * prices.cache_read + usage.cache_write_tokens * prices.cache_write) / 1e6;
}
async function failureMessage(response) {
if (response.status === 401) {
if (window.fieldKitAuth) window.fieldKitAuth.signOut();
return "Sign-in expired. Reload the page to sign in again.";
}
if (response.status === 403) return "The request was blocked by the web ACL. Rephrase the prompt and try again.";
if (response.status === 429) return "Too many requests. Wait a few seconds and run again.";
const body = await response.json().catch(() => ({}));
return body.message || `Request failed (${response.status}).`;
}
async function run() {
const prompt = el.prompt.value.trim();
if (running || !cfg || !prompt) return;
running = true;
el.run.disabled = true;
el.run.textContent = "Running";
setStatus("");
resetMetrics();
el.answer.innerHTML = "";
el.reasoningText.textContent = "";
el.reasoning.hidden = true;
el.hint.textContent = `effort ${effort}`;
let answer = "", reasoning = "", frame = 0, first = 0, finished = false;
const paint = () => {
frame = 0;
const follow = el.scroll.scrollHeight - el.scroll.scrollTop - el.scroll.clientHeight < 80;
el.answer.innerHTML = render(answer);
if (reasoning) {
el.reasoning.hidden = false;
el.reasoningText.textContent = reasoning;
}
if (follow) el.scroll.scrollTop = el.scroll.scrollHeight;
};
const started = performance.now();
const clock = setInterval(() => set("m-total", seconds(performance.now() - started)), 100);
try {
const headers = { "Content-Type": "application/json" };
if (cfg.auth) headers.Authorization = await window.fieldKitAuth.token(cfg.auth);
const url = query.get("capture") === "1" ? `${cfg.api_url}?buffered=1` : cfg.api_url;
const response = await fetch(url, { method: "POST", headers, body: JSON.stringify({ prompt, effort }) });
if (!response.ok) throw new Error(await failureMessage(response));
const handle = (event) => {
if (event.type === "text" || event.type === "reasoning") {
if (!first) {
first = performance.now();
set("m-ttft", seconds(first - started));
}
if (event.type === "text") answer += event.text; else reasoning += event.text;
frame ||= requestAnimationFrame(paint);
} else if (event.type === "done") {
finished = true;
clearInterval(clock);
const usage = event.usage;
const metrics = event.metrics;
set("m-ttft", metrics.ttft_ms === null ? "--" : seconds(metrics.ttft_ms));
set("m-total", seconds(metrics.total_ms));
set("m-tps", metrics.tokens_per_second === null ? "--" : count(Math.round(metrics.tokens_per_second)));
set("m-in", count(usage.input_tokens));
set("m-out", count(usage.output_tokens));
if (usage.cache_read_tokens || usage.cache_write_tokens) set("m-tokens-sub", `cache read ${count(usage.cache_read_tokens)}, cache write ${count(usage.cache_write_tokens)}`);
set("m-cost", `$${cost(usage, cfg.prices).toFixed(5)}`);
if (event.stop_reason === "max_tokens") setStatus(`Stopped at the ${count(event.max_output_tokens)} token output limit. Try a lower effort.`, true);
} else if (event.type === "error") {
throw new Error(event.message);
}
};
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = "";
for (;;) {
const { done, value } = await reader.read();
buffer += done ? decoder.decode() : decoder.decode(value, { stream: true });
const lines = buffer.split("\n");
buffer = lines.pop();
for (const line of lines) if (line.trim()) handle(JSON.parse(line));
if (done) break;
}
if (!finished) throw new Error("The stream ended before the usage arrived.");
} catch (err) {
setStatus(err.message || String(err), true);
} finally {
clearInterval(clock);
cancelAnimationFrame(frame);
paint();
running = false;
el.run.disabled = false;
el.run.textContent = "Run";
}
}
el.run.addEventListener("click", run);
el.prompt.addEventListener("keydown", (e) => { if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) run(); });
const loadScript = (src) => new Promise((resolve, reject) => {
const s = document.createElement("script");
s.src = src;
s.onload = resolve;
s.onerror = () => reject(new Error(`could not load ${src}`));
document.head.append(s);
});
async function start() {
try {
presets = await (await fetch("presets.json")).json();
showPresets();
const preset = Number(query.get("preset"));
selectPreset(preset >= 1 && preset <= presets.length ? preset - 1 : 0);
const response = await fetch("config.json", { cache: "no-store" });
if (!response.ok) throw new Error("config.json is missing: the demo backend is not deployed.");
cfg = await response.json();
// A config with "auth" is the hosted demo: sign in through the shared pool before anything runs.
if (cfg.auth) {
await loadScript("/auth/auth.js");
await window.fieldKitAuth.token(cfg.auth);
}
} catch (err) {
set("model", "unavailable");
setStatus(err.message, true);
return;
}
const p = cfg.prices;
set("model", cfg.model_id);
set("mode", cfg.auth ? "" : "local mode");
set("m-cost-sub", `$${p.input.toFixed(2)} in, $${p.output.toFixed(2)} out per 1M tokens (${p.profile})`);
el.run.disabled = false;
if (query.get("autorun") === "1") run();
}
start();
})();
poc/web/index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Amazon Ergo playground</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="top">
<div class="brand">
<span class="mark" aria-hidden="true"></span>
<h1>Amazon Ergo playground</h1>
<span class="chip" id="model">loading</span>
<span class="chip quiet" id="mode"></span>
</div>
<button type="button" class="ghost" id="theme" aria-label="Switch between light and dark">Dark</button>
</header>
<main>
<section class="card prompt" aria-label="Prompt">
<div class="row presets" role="group" aria-label="Preset prompts">
<span class="label">Presets</span>
<span id="presets"></span>
</div>
<textarea id="prompt" rows="4" maxlength="20000" spellcheck="false" aria-label="Coding prompt" placeholder="Describe a coding task"></textarea>
<div class="row controls">
<span class="label" id="effort-label">Reasoning effort</span>
<div class="segmented" id="effort" role="radiogroup" aria-labelledby="effort-label"></div>
<span class="spacer"></span>
<span class="status" id="status" role="status"></span>
<button type="button" class="primary" id="run" disabled>Run</button>
</div>
</section>
<section class="card answer" aria-label="Answer">
<div class="card-head">
<h2>Answer</h2>
<span class="hint" id="answer-hint"></span>
</div>
<div class="scroll" id="scroll">
<details class="reasoning" id="reasoning" hidden>
<summary>Reasoning summary</summary>
<div id="reasoning-text"></div>
</details>
<div id="answer" class="md" aria-live="polite"><p class="empty">Pick a preset or write a prompt, then press Run. The answer streams here and the numbers on the right are measured for that request.</p></div>
</div>
</section>
<aside class="metrics" aria-label="Metrics for this request">
<div class="tile hero">
<div class="k">Output speed</div>
<div class="v"><span id="m-tps" class="pending">--</span><small>tokens/s</small></div>
<div class="s">output tokens (reasoning included) over total time</div>
</div>
<div class="tile half">
<div class="k">First token</div>
<div class="v"><span id="m-ttft" class="pending">--</span><small>s</small></div>
<div class="s">request sent to first token</div>
</div>
<div class="tile half">
<div class="k">Total time</div>
<div class="v"><span id="m-total" class="pending">--</span><small>s</small></div>
<div class="s">request sent to last token</div>
</div>
<div class="tile">
<div class="k">Tokens</div>
<div class="v pair"><span id="m-in" class="pending">--</span><small>in</small><span id="m-out" class="pending">--</span><small>out</small></div>
<div class="s" id="m-tokens-sub">output includes reasoning</div>
</div>
<div class="tile cost">
<div class="k">Cost of this request</div>
<div class="v"><span id="m-cost" class="pending">--</span></div>
<div class="s" id="m-cost-sub"></div>
</div>
<p class="note">Final timings are measured in the backend around the Bedrock call. Tokens and cost come from the usage Bedrock reports for this request.</p>
</aside>
</main>
<script src="app.js"></script>
</body>
</html>
poc/web/presets.json
[
{
"name": "LRU cache with tests",
"prompt": "Write a Python LRU cache class with O(1) get and put, full type hints and a capacity argument. Include pytest tests that cover eviction order and updating an existing key."
},
{
"name": "Find the bug",
"prompt": "This Go worker pool sometimes hangs and sometimes loses results. Find every bug, explain each in one sentence, and return a corrected version.\n\nfunc process(jobs []int) []int {\n var wg sync.WaitGroup\n results := []int{}\n ch := make(chan int)\n for _, j := range jobs {\n go func() {\n wg.Add(1)\n defer wg.Done()\n ch <- j * j\n }()\n }\n wg.Wait()\n for r := range ch {\n results = append(results, r)\n }\n return results\n}"
},
{
"name": "Retry with backoff",
"prompt": "Write a TypeScript function retry<T>(fn, options) that retries an async call with exponential backoff and full jitter. Support maxAttempts, baseDelayMs, maxDelayMs, an AbortSignal and a shouldRetry(error) predicate. Add a short usage example."
}
]
poc/web/style.css
/* Light theme is the default; dark applies from the system setting or an explicit data-theme. */
:root {
--bg: #f4f5f7;
--surface: #ffffff;
--surface-2: #f0f2f5;
--border: #dde1e7;
--ink: #14181f;
--ink-2: #4a5362;
--ink-3: #727b8a;
--accent: #0b6bcb;
--accent-ink: #ffffff;
--accent-soft: #e3effb;
--code-bg: #f6f7f9;
--danger: #b3261e;
--shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
color-scheme: light;
}
:root[data-theme="dark"] {
--bg: #0e1116;
--surface: #161a21;
--surface-2: #1e232c;
--border: #2b323d;
--ink: #e8ebf0;
--ink-2: #aab2bf;
--ink-3: #8690a0;
--accent: #5aa9f5;
--accent-ink: #08121d;
--accent-soft: #16304a;
--code-bg: #10141a;
--danger: #ff8a80;
--shadow: none;
color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--bg: #0e1116;
--surface: #161a21;
--surface-2: #1e232c;
--border: #2b323d;
--ink: #e8ebf0;
--ink-2: #aab2bf;
--ink-3: #8690a0;
--accent: #5aa9f5;
--accent-ink: #08121d;
--accent-soft: #16304a;
--code-bg: #10141a;
--danger: #ff8a80;
--shadow: none;
color-scheme: dark;
}
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
display: flex;
flex-direction: column;
background: var(--bg);
color: var(--ink);
font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 17px; }
h2 { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
code, pre, textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 24px;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mark { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); }
.chip {
padding: 2px 8px;
border: 1px solid var(--border);
border-radius: 999px;
background: var(--surface-2);
color: var(--ink-2);
font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.chip.quiet:empty { display: none; }
main {
flex: 1;
min-height: 0;
width: 100%;
max-width: 1320px;
margin: 0 auto;
padding: 16px 24px 24px;
display: grid;
grid-template-columns: minmax(0, 1fr) 300px;
grid-template-rows: auto minmax(0, 1fr);
grid-template-areas: "prompt prompt" "answer metrics";
gap: 16px;
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
box-shadow: var(--shadow);
}
.prompt { grid-area: prompt; padding: 14px 16px; display: grid; gap: 10px; }
.answer { grid-area: answer; display: flex; flex-direction: column; min-height: 320px; }
.metrics { grid-area: metrics; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.metrics .tile, .metrics .note { grid-column: span 2; }
.metrics .tile.half { grid-column: span 1; }
.note { margin: 2px 2px 0; font-size: 12px; color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.spacer { flex: 1; }
#presets { display: flex; gap: 8px; flex-wrap: wrap; }
button {
font: inherit;
cursor: pointer;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--surface);
color: var(--ink);
padding: 6px 12px;
}
button:hover { border-color: var(--ink-3); }
button:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button[aria-pressed="true"], button[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
button.ghost { font-size: 13px; color: var(--ink-2); }
button.primary {
min-width: 96px;
padding: 8px 20px;
font-weight: 600;
background: var(--accent);
border-color: var(--accent);
color: var(--accent-ink);
}
button.primary:disabled { opacity: 0.55; cursor: default; }
.preset { font-size: 13px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button { border: 0; border-radius: 0; font-size: 13px; padding: 6px 14px; border-right: 1px solid var(--border); }
.segmented button:last-child { border-right: 0; }
textarea {
width: 100%;
resize: vertical;
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--code-bg);
color: var(--ink);
font-size: 13px;
line-height: 1.5;
}
.status { font-size: 13px; color: var(--ink-2); }
.status.error { color: var(--danger); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.hint { font-size: 12px; color: var(--ink-3); }
.scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; }
.md { overflow-wrap: anywhere; }
.md p { margin: 0 0 10px; white-space: pre-wrap; }
.md p.empty { color: var(--ink-3); }
.md h3 { margin: 14px 0 6px; font-size: 15px; }
.md pre {
margin: 0 0 12px;
padding: 12px 14px;
overflow: auto;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--code-bg);
font-size: 13px;
line-height: 1.5;
}
.md pre[data-lang]::before {
content: attr(data-lang);
display: block;
margin-bottom: 6px;
color: var(--ink-3);
font-size: 11px;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.md :not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); font-size: 13px; }
.reasoning { margin-bottom: 12px; padding: 8px 12px; border: 1px dashed var(--border); border-radius: 8px; color: var(--ink-2); font-size: 13px; }
.reasoning summary { cursor: pointer; font-weight: 600; }
.reasoning div { margin-top: 6px; white-space: pre-wrap; }
.tile { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.tile .k { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.tile .v { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.25; }
.tile .v small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.tile .v.pair small { margin-right: 8px; }
.tile .s { margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.tile.hero { border-color: var(--accent); }
.tile.hero .v { font-size: 38px; }
.tile .v .pending { font-weight: 400; color: var(--ink-3); }
@media (max-width: 900px) {
html, body { height: auto; }
main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "prompt" "metrics" "answer"; }
.answer { min-height: 240px; }
.scroll { max-height: 70vh; }
}
sources.md
# Sources
Read 2026-12-01. Summarised by a tool: re-read the linked page before quoting.
## What it is
- Amazon Ergo-1.0: open weight model for software engineering and agentic workflows, by Amazon Frontier Model Research. [Ergo page](https://aws.amazon.com/ergo/)
- GA on Amazon Bedrock, launched 2026-12-01. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Turbo mode: 2,200 output tokens per second, limited preview, price not announced. [Blog](https://aws.amazon.com/blogs/aws/aws-builds-for-more-ambitious-agents/)
- Served on AWS Trainium3; in Kiro at launch. [About Amazon](https://www.aboutamazon.com/news/aws/aws-re-invent-2026-ai-news-updates)
## Model
- Context 1M tokens, max output 131,072 tokens. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Over 400 output tokens per second. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- 1.1T parameters, 55B active per token; text only; always reasons. [Hugging Face](https://huggingface.co/Amazon-FMR/Ergo)
- Open-Weights License: commercial use allowed, acceptable use policy applies. [Hugging Face](https://huggingface.co/Amazon-FMR/Ergo)
- Weights: 626 GB (MXFP4), 1.17 TB (MXFP8), 2.22 TB (BF16). [Hugging Face](https://huggingface.co/Amazon-FMR/Ergo)
## Availability
- Cross-Region inference only: "In-Region inference is not supported." [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- US profile `us.amazon.ergo-1.0`: call from us-east-1, us-east-2, us-west-1, us-west-2; routes to us-east-2. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Global profile `global.amazon.ergo-1.0`: most commercial Regions. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Not supported: ap-east-1, me-central-1, me-central-2, me-south-1. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Not available in China. [What's New](https://aws.amazon.com/about-aws/whats-new/2026/11/amazon-ergo-open-weight-foundation-model-amazon-bedrock/)
## Building with it
- APIs: Responses, Chat Completions, Converse, InvokeModel on `bedrock-runtime`. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Base ID `amazon.ergo-1.0` returns a 400; call an inference profile. [Coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html)
- Supported: streaming, prompt caching, tool use, structured outputs, Guardrails, batch, application inference profiles. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Not supported: Knowledge Bases, intelligent prompt routing, Count tokens, watermarking. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
- Coding tools: OpenCode, Codex CLI, Kiro; Claude Code via a LiteLLM proxy. [Coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html)
## Reasoning and limits
- Reasoning effort: `low`, `medium`, `high`, `xhigh`, `max`. `none` returns a 400. [Coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html)
- Output limit: at least 8,192 tokens; lower can return an empty answer. [Coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html)
- "Each request reserves its full output limit against your account's quota." [Coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html)
- 429: quota used up. Retry later, lower the output limit, or request more. [Coding tools](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0-coding-tools.html)
- TPM and RPM not published; see Service Quotas. [Model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)
## Pricing
- Global, per 1M tokens: $1.00 input, $3.00 output, $0.03 cache read, $1.25 cache write (30 min). [Pricing](https://aws.amazon.com/products/ergo/pricing/)
- US, per 1M tokens: $1.10 input, $3.30 output, $0.033 cache read, $1.375 cache write. [Pricing](https://aws.amazon.com/products/ergo/pricing/)
- Standard, Flex and Batch are listed at the same rates. [Pricing](https://aws.amazon.com/products/ergo/pricing/)
- No free tier, provisioned throughput or fine-tuning price published. [Pricing](https://aws.amazon.com/products/ergo/pricing/)
## AWS claims
No attributed customer or executive quotes were found. Label each line as an AWS claim.
- Internal holdback evaluations: "Ergo completed tasks 50% faster at 10% lower cost than Kimi K3.1 Pro". [Blog](https://aws.amazon.com/blogs/aws/aws-builds-for-more-ambitious-agents/)
- Against Opus 5.5: "it completed tasks 3.5 times as fast at one-tenth the cost". [Blog](https://aws.amazon.com/blogs/aws/aws-builds-for-more-ambitious-agents/)
- "Among U.S. open weight models, Ergo ranks first on all seven coding benchmarks." [Ergo page](https://aws.amazon.com/ergo/)
- Across all open weight models, Ergo "ranks first on four of those seven benchmarks". [Ergo page](https://aws.amazon.com/ergo/)
- Limitation: "Trails the strongest closed models"; advice of "letting the agent test and verify its own changes." [Hugging Face](https://huggingface.co/Amazon-FMR/Ergo)
## Benchmarks
- Ergo: DeepSWE 74.2%, FrontierSWE v2 31.5%, Terminal-Bench 4.0 46.2%, FMR-Bench (Amazon's own) AI SWE 65.4. [Hugging Face](https://huggingface.co/Amazon-FMR/Ergo)
- Kimi K3.1 Pro leads DeepSWE (77.9), Terminal-Bench 4.0 (63.3) and ProgramBench (24.1 to 23.5). [Hugging Face](https://huggingface.co/Amazon-FMR/Ergo)
## POC observations
Measured on the real service, 2026-12-01.
- Output speed: 308 to 409 output tokens per second (all output tokens over total time).
- Cost: $0.009 to $0.037 per request.
- Reasoning is billed as output but not streamed: 10 to 26 seconds before the answer appears.
- Reasoning effort is set with `outputConfig.effort`. `none` is rejected.
- Docs state no allowlist or sign-up. Observed: none was needed.