Skip to content
AI & Automation

Amazon Ergo in Claude Code, Codex and Kiro: 1 proxy needed

Dec 2, 2026

Which of the four tools to set up first

Codex CLI and OpenCode are the fastest route to Amazon Ergo: each connects straight to Amazon Bedrock with one long-term API key and runs no extra process. Claude Code works too, but only through a local LiteLLM proxy you must start and keep running, and Kiro has Ergo built in as a limited Preview.

Pick by situation:

Your situationPickWhy
You want the fewest moving parts in a terminalCodex CLIOne config file and one key; direct Responses API connection
You already work in OpenCodeOpenCodeA provider block in opencode.json; /models switches the model
Your team runs Claude Code every dayClaude Code, with a proxyThe proxy is mandatory, and someone must keep it running
You already pay for Kiro and can accept a PreviewKiroBuilt in, but limited access and US-only inference
Traffic must stay in US RegionsAny Bedrock route on us.amazon.ergo-1.0Kiro is also US-only, so the Region rule does not change the Kiro answer

The rest of this guide covers setup only. Pricing, rival models, speed and limits each have their own post, and Amazon's other AI product is covered in Amazon Quick explained.

Key Takeaways

TL;DR: Codex CLI and OpenCode connect directly to Bedrock, Claude Code needs a proxy, and Kiro's Ergo is a limited, US-only Preview.

  • Codex CLI and OpenCode both authenticate with a long-term Bedrock key stored as AWS_BEARER_TOKEN_BEDROCK, and neither needs a second process.

  • Claude Code needs a local LiteLLM proxy because it speaks the Anthropic Messages API, not a format Bedrock accepts directly for Ergo.

  • Set the output limit to at least 8,192 tokens. A lower limit is the usual cause of empty answers, because Ergo always reasons.

  • Kiro's Ergo Preview covers selected subscription tiers and enterprise users, with limited access and inference only in the US.

  • At Global list rates, a sample Codex session of 2.1 million tokens costs $0.554, and output is 54% of that bill.

What Ergo is and what changed on December 1

Amazon Ergo-1.0 is an open-weights, text-only model that Amazon serves on Amazon Bedrock and that coding agents can call through Bedrock's APIs. Amazon introduced it on December 1, 2026, according to Amazon (2026). The model card lists text as the only input and output modality, so none of the four tools will read screenshots or diagrams.

Amazon's own launch material describes Ergo as built for agentic software work, where the agent plans, calls tools and checks its own results. That description matters for setup because agentic tools send long sessions, and session length drives both the output limit and the bill.

How we evaluated these four tools

We compared the four routes on six criteria that a buyer decides on this month. The weights are our judgment for a small B2B team, not vendor figures. The third column comes from the setup pages cited in the sections below.

CriterionWeightFigure from the setup pagesWhy it matters to this reader
Extra services to run25%1 proxy (Claude Code only)Each extra process is a failure point your team keeps alive
Credentials and Region set-up15%1 key (AWS_BEARER_TOKEN_BEDROCK); AWS_REGION for CodexKey expiry and shell config are the usual breakages
Output limit and quota control20%Floor of 8,192 tokens; full limit reserved per requestControls empty answers and quota burn
Feature constraints15%1 server-side tool off (web search in Codex)Tools you give up in exchange for the model
Access and availability15%4 Kiro tiers plus enterprise users; US geography onlyDecides whether you can start this month
Cost signal10%$1.00 input and $3.00 output per 1M tokens (Global)Sets the budget before you install anything

Extra services carry the most weight because every extra process is one your team owns. Output limits come second because they control both empty answers and quota use.

Four routes, side by side

The setting that breaks each route is the one most likely to be skipped. The values below come from AWS's coding-tools setup page and Kiro's changelog, cited in the sections that follow.

ToolRoute to ErgoAPI it speaksExtra service to runSetting that breaks it if skippedStatus in this guide
Codex CLIDirect to BedrockResponsesNoneweb_search = "disabled"; AWS_REGION exportedSet-up steps published by AWS
OpenCodeDirect to BedrockChat CompletionsNoneProvider block in opencode.json; output limit near needSet-up steps published by AWS
Claude CodeLocal LiteLLM proxy on port 4000Anthropic Messages, translated to Responses1 proxyANTHROPIC_AUTH_TOKEN equals master_key; CLAUDE_CODE_USE_BEDROCK unsetSet-up steps published by AWS
KiroBuilt inNot publishedNoneRestart the IDE or CLI to load the modelPreview with limited access

Claude Code: a proxy you run and keep alive

Claude Code is the only tool here that needs translation. AWS's setup page says Claude Code uses the Anthropic Messages API, so you run a local LiteLLM proxy that converts its requests into Bedrock Responses API calls. Compared with running Claude Code against its own model, this adds a process, a second config file, and a key that the proxy reads only at startup.

The setup has three parts. First, install Claude Code and uv, then save a LiteLLM config that maps the model name to the Bedrock endpoint and reads the key from the environment:

model_list:
  - model_name: global.amazon.ergo-1.0
    litellm_params:
      model: openai/global.amazon.ergo-1.0
      api_base: https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1
      api_key: os.environ/AWS_BEARER_TOKEN_BEDROCK
      extra_body:
        reasoning:
          effort: medium
litellm_settings:
  drop_params: true
general_settings:
  master_key: sk-ergo-local

Second, start the proxy on 127.0.0.1 port 4000 with uv tool run --from 'litellm[proxy]' litellm --config ~/ergo-claude-code/litellm.yaml --host 127.0.0.1 --port 4000. The master_key value is a string you choose, and AWS notes that it is not a real credential.

Third, write a launcher script. It exports ANTHROPIC_BASE_URL pointing at the local proxy, sets ANTHROPIC_AUTH_TOKEN to the same master_key value, points the Opus, Sonnet and Haiku model variables and the subagent model at global.amazon.ergo-1.0, and unsets CLAUDE_CODE_USE_BEDROCK. In our reading of that launcher, every Claude tier runs Ergo, so a session cannot fall back to a Claude model for subagents.

Two gotchas cause most support questions. An env block in ~/.claude/settings.json that sets CLAUDE_CODE_USE_BEDROCK or ANTHROPIC_MODEL overrides the launcher, so start Claude Code with the setting-sources flag set to project and local to skip user settings. And the proxy reads the key at startup, so restart it after any key change. If the real question is which agent to standardize on for scripted work, see Claude Code vs OpenAI Codex for accounting automation scripts.

Codex CLI and OpenCode: two direct routes

Codex CLI connects to Bedrock through the Responses API with no proxy. Install it with npm i -g @openai/codex or brew install codex. Then, in ~/.codex/config.toml, set the model to global.amazon.ergo-1.0, the provider to a bedrock-runtime block whose base URL is the OpenAI-compatible Bedrock endpoint, the key variable to AWS_BEARER_TOKEN_BEDROCK, and wire_api to responses. AWS's example also sets model_reasoning_effort to medium and model_context_window to 1048568.

Codex has two traps. First, web_search must be set to "disabled", because AWS says built-in server-side tools such as web search are not supported. Second, Codex does not read the Region from the AWS CLI profile, so export AWS_REGION in your shell profile. AWS's examples use us-west-2, so set the variable to the Region in your base URL. Codex may also print a "Model metadata ... not found" line at startup, which AWS says you can ignore.

OpenCode uses the Chat Completions API. Add a bedrock-runtime provider with the @ai-sdk/openai-compatible package to ~/.config/opencode/opencode.json, reference the key with an environment placeholder, add the global.amazon.ergo-1.0 model, and set the top-level model to bedrock-runtime/global.amazon.ergo-1.0. Run opencode in your project folder and type /models to switch.

The OpenCode trap is the output limit. Each request reserves its full output limit against your account's quota. AWS's example sets the output to 131,072 tokens, which is the model's maximum, so copying it unchanged reserves the largest possible amount on every turn. Set it to what your tasks need, and keep it at or above the 8,192-token floor covered below. Neither route needs a proxy, so the failure surface is the config file and the key.

Kiro: built in, still in Preview

Kiro is the only route with no setup on your side, and that is its whole case. Kiro's changelog entry dated December 1, 2026 says Ergo is rolling out to Pro, Pro+, Pro Max and Power subscribers and to Kiro enterprise users, with a 1M-token context window. Kiro credit multiplier: 1.2x during Preview according to Kiro (2026).

The same entry says the support is experimental, access is limited during Preview, and inference runs only in the US geography. To see the model, restart the IDE or CLI, run the restart command for Crew, or refresh the Web app. Kiro does not publish a dollar value for its credit multiplier on the pages we read, so do not budget Kiro sessions from the per-token prices in the next section.

Amazon's launch page says Ergo will be available in Kiro today. Kiro's own changelog is the more specific source, and it calls the release a Preview.

What one session costs at list price

AWS's model card lists Global cross-Region rates on the Standard tier. Global list price: $1.00 input, $3.00 output per 1M tokens according to AWS (2026). Pricing checked December 2, 2026. AWS's general Bedrock pricing page did not show Ergo rows in the text we read, so the model card is the source for these rates.

Amazon's DeSantis told GeekWire that the price "isn't introductory pricing," which matters for any budget set in the first months after launch, according to GeekWire (2026). Third-party listings differ. The OpenRouter listing we read on December 2, 2026 shows inference.net at $0.90 input and $2.70 output per 1M tokens, the lowest host shown, according to OpenRouter (2026). Costs here assume the Bedrock list rates.

Take one Codex agent session on the Global profile, using our assumptions: 2,000,000 input tokens, of which 1,800,000 are cache reads, and 100,000 output tokens including reasoning. Uncached input is 200,000 × $1.00 ÷ 1,000,000 = $0.20. Cached input is 1,800,000 × $0.03 ÷ 1,000,000 = $0.054. Output is 100,000 × $3.00 ÷ 1,000,000 = $0.30. The total is $0.554, and output is 54% of the bill while being about 5% of the 2.1 million tokens. Run the same session at the US profile rates in the same model card ($1.10 input, $0.033 cache read, $3.30 output) and it comes to $0.609, about 10% more. Trimming output you do not need cuts the most expensive line, but the limit must stay at or above 8,192 tokens. The identifier to set in the config is global.amazon.ergo-1.0. For how output tokens differ across OpenAI models in Codex, see GPT-6 Astra vs 5 Sol for Codex token efficiency.

Sample session lineTokensGlobal rate per 1MGlobal costUS rate per 1MUS cost
Uncached input200,000$1.00$0.20$1.10$0.22
Cache reads1,800,000$0.03$0.054$0.033$0.0594
Output, including reasoning100,000$3.00$0.30$3.30$0.33
Total2,100,000Mixed$0.554Mixed$0.609

When a call fails: the errors that come up most

AWS's troubleshooting table covers the failures below. The first bold figure is the one to memorize.

Output floor: at least 8,192 tokens according to AWS (2026). Ergo always reasons, and reasoning uses part of the output limit, so a smaller limit can return an empty answer with a finish reason of "length."

SymptomWhat it meansFix
400 on amazon.ergo-1.0The base model ID was used, and it cannot be called directlyUse global.amazon.ergo-1.0 or us.amazon.ergo-1.0
403 UnrecognizedClientExceptionThe key is not set or has expiredConfirm AWS_BEARER_TOKEN_BEDROCK is set and not expired
403 AccessDeniedExceptionThe IAM identity lacks invoke permissionsAdd the InvokeModel permissions from AWS's policy example
429 ThrottlingExceptionThe account quota is used upRetry later, lower the output limit, or request a quota increase
Empty answer, finish reason "length"Output limit too low for reasoningRaise the output limit to at least 8,192 tokens
Codex error about web_searchServer-side web search is enabledSet web_search = "disabled" in config.toml
Codex error mentioning AWS_REGIONThe Region is not exported to the shellSet AWS_REGION to the Region in base_url
Claude Code auth error from the proxyThe token does not match the proxy keyMake ANTHROPIC_AUTH_TOKEN equal master_key, then restart the proxy

Ergo's reasoning is always on. A reasoning effort of "none" returns a 400 error, so keep the effort set to a supported value such as medium.

Decision checklist for this month

  • Confirm your AWS account can invoke amazon.ergo-1.0 through the US and Global inference profiles, using the IAM policy AWS publishes.

  • Generate a long-term Bedrock key and store it as AWS_BEARER_TOKEN_BEDROCK. Short-term keys expire and must be regenerated.

  • Choose the profile before you configure anything: global for any commercial Region, us when data must stay in US Regions.

  • Set the output limit to what your tasks need, and never below 8,192 tokens.

  • Disable web search in Codex, and export AWS_REGION in your shell profile.

  • Check ~/.claude/settings.json for an env block before you use Claude Code.

  • Decide whether a Kiro Preview trial is worth it, given that access is limited.

Common mistakes

  • Using the base model ID instead of a profile ID, which fails with a 400 error.

  • Copying AWS's example output limit of 131,072 tokens without thinking about quota reservation on every request.

  • Leaving web search enabled in Codex, which breaks requests.

  • Forgetting to restart the LiteLLM proxy after a key change, so it keeps the old key.

  • Leaving CLAUDE_CODE_USE_BEDROCK or ANTHROPIC_MODEL in ~/.claude/settings.json, which silently overrides the launcher.

  • Treating Kiro's Ergo as generally available when the changelog calls it a Preview.

Who this is for

This guide is for engineering and operations leads at a small B2B software company who already run one terminal coding agent and want to know whether Ergo can slot in without a new platform. It also suits a developer who can own an AWS account and one key.

Red flags: your data rules require in-Region processing, which Ergo does not support, since it runs only through US Geo and Global cross-Region profiles. Your team needs Kiro's Ergo outside US Regions. Or nobody on the team can keep a local proxy running for Claude Code.

Where US Tech Automations fits in this setup

A configurable workflow that US Tech Automations could set up for this stack would start when a new bug ticket arrives with a reproduction note and a link to a failing test run. The action is a scripted codex exec call on the Ergo profile that reads the ticket and the failing test output, then writes a proposed patch and a short summary. The output is a draft in a review queue, not a merged change. Prerequisites: a long-term Bedrock key stored as AWS_BEARER_TOKEN_BEDROCK, the IAM policy from AWS's setup page, API or export access to your ticket system, and a repository checkout the job can read. The human review point is an engineer who reads the diff and runs the test suite before anything reaches a branch.

The guard that matters most is the output-limit check. The workflow would read the finish reason on each response. If an answer comes back empty with a length finish reason, the job re-queues the ticket with the output limit raised to at least 8,192 tokens, rather than posting a blank draft. An engineer still owns the escalation rule, and the team owns key rotation, because the config reads the key at startup.

The do-it-yourself version is a script, or a Zapier, Make or n8n flow, that calls the same endpoint. Those tools can keep run histories, retries and error branches when someone configures them. The team then designs and owns idempotency, escalation, access controls and upkeep. A design from US Tech Automations would put those pieces in one configured place, but it would still need the same prerequisites: the Bedrock key, a ticket export, and a named reviewer.

US Tech Automations is the wrong purchase if the job is one engineer asking Codex for help in a single repository, which needs only the config file above. It is also the wrong purchase for a team already on Kiro that wants to try the Preview in its IDE, since Kiro's own restart steps cover that. And if your tickets contain data that must stay in-Region, no automation layer fixes that, because Ergo does not run in-Region at all.

Questions buyers ask first

Can Claude Code use Amazon Ergo without a proxy?

No. AWS's setup page says Claude Code uses the Anthropic Messages API, so you need a local LiteLLM proxy that translates its requests into Bedrock calls.

Which profile ID should go in the config?

Use global.amazon.ergo-1.0 for any commercial Region, or us.amazon.ergo-1.0 when traffic must stay in US Regions, because the base ID amazon.ergo-1.0 cannot be called directly.

Why did my answer come back empty?

The usual cause is an output limit below 8,192 tokens, because Ergo always reasons and reasoning uses part of that budget.

Can every Kiro plan use Ergo right now?

No. The Kiro changelog limits the Preview to Pro, Pro+, Pro Max and Power subscribers and Kiro enterprise users, with limited access.

Will Ergo read screenshots in these tools?

No. The model card lists text as the only input and output modality, so screenshots and diagrams are not read.

Does Codex need web search turned off?

Yes. AWS says built-in server-side tools such as web search are not supported, so web_search must be set to "disabled" in the Codex config.

What to do this month

Start with Codex CLI or OpenCode in one repository, since each needs only a config file and one long-term key. Keep the output limit at 8,192 tokens or more, budget at the Global rates above, and use the US profile only when your data rules require it. Add Claude Code only if your team already accepts running the LiteLLM proxy, and treat Kiro as a trial while its access stays limited. If you want the same setup wired into a ticket queue with a review step, see how US Tech Automations configures this.

About the Author

Garrett Mullins
Garrett Mullins
Workflow Specialist

Helping businesses leverage automation for operational efficiency.