Skip to content

AWS Strands harness as a Bot - #2326

Draft
mme wants to merge 11 commits into
mainfrom
mme/strands-harness-bot
Draft

mme wants to merge 11 commits into
mainfrom
mme/strands-harness-bot

Conversation

@mme

@mme mme commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

The AWS Strands harness as a Bot (agent-strands-harness/), built on StrandsHarnessAgent from ag-ui-protocol/ag-ui#3489.

 shared/
+├── strands_bot.py             # what both Strands Bots share: app, token check, model, forwarded props
+└── strands_system_prompt.py   # moved from agent-strands/src/system_prompt.py
 agent-strands/src/main.py      # now only: which agent, and its hooks
+agent-strands-harness/         # one harness per conversation, let go after 30 idle minutes
  • The harness's memory, skills and sessions are off: OpenBot owns those.
  • Its own tools (shell, read, ...) are off unless STRANDS_HARNESS_TOOLS names them, and STRANDS_HARNESS_INTERVENTIONS gates only those. What OpenBot grants stays OpenBot's to ask about: the integration keeps the harness's gate off the tools a client runs.
  • The harness Bot is not registered as an engine anywhere yet: no entry in the harness list, no published image, no model row.

The approval card and the deployment 403 fix that were in this PR are now #2618. Their commits still show here until that merges.

Order of things

  1. feat(aws-strands): serve a Strands harness with StrandsHarnessAgent ag-ui-protocol/ag-ui#3489 merges and ag-ui-strands is released with StrandsHarnessAgent.
  2. agent-strands-harness/requirements.txt gets that release as its floor. Until then python harness (agent-strands-harness) fails at import, which is why this is a draft.
  3. Answer a Bot that stops its own run to ask before it uses a tool #2618 merges, independently of 1 and 2.
  4. Still to do after this PR: register the harness as an engine (harness list, published image, model row).

Where it runs

  • New state that outlives a request? None in the server or the app. The harness Bot process keeps one harness per conversation in memory, dropped after 30 idle minutes.
  • What happens on the second replica? Server: nothing new. Two replicas of the harness Bot: a conversation that lands on the other replica is rebuilt from the history the run carries, but an approval still waiting is known only to the process that asked, and its answer is refused there (UNKNOWN_INTERRUPT_ID). This is the adapter's in-memory design, and one reason the Bot is not registered yet.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? The harness Bot listens on 4217 in its own image, which nothing deploys yet.

Boundary and audit

  • Every acting call still goes through the gateway: resolve, decide, audit, then act.
  • New refusals and new failures each write a row.
  • Nothing new is trusted from the client that the server can resolve itself.

The unticked box needs a reviewer's call. With STRANDS_HARNESS_TOOLS set, the harness runs its own tools inside the Bot's container, past the gateway: no grant, no policy, no audit row. They are off by default.

API and database

  • This changes nothing under api/, no app's requests, no database change and no release-policy.json.

Changelog

none

Proof

After merging main (the Strands Bot had gained Gemini signatures, WordsAsSaid and the progress reminder, which moved into the shared module where both Bots use the model):

  • agent-strands: 31 passed. agent-strands-harness: 32 passed. Both against a local build of the ag-ui branch, with strands-harness 0.6.0 and strands-agents 1.68.0.
  • bun test scripts/ci-budgets.test.ts scripts/ci-changes.test.ts: 64 pass (the new job has its time budget).
  • bun run typecheck in app: clean.

Earlier, on an older base, this Bot ran in a single-container OpenBot connected by address: context, history replay after a restart of the Bot, shared state, and both kinds of approval were checked through the browser. That deployment was built from local branches on one machine and is not reproducible from this PR alone.

Not done:

  • The harness Bot does not get the progress reminder the Strands Bot has. The harness hands its hooks to the subagents it delegates to, and whether a reminder belongs there was not looked at.
  • The full app suite has not been re-run on this branch.

# Conflicts:
#	CHANGELOG.md
#	agent-strands/Dockerfile
#	agent-strands/src/main.py
@mme mme changed the title Answer a Bot that stops to ask, and the AWS Strands harness as a Bot AWS Strands harness as a Bot Dec 1, 2026

@contextablemark contextablemark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d keep this in draft. The new Bot can’t start with the published dependency, the Dockerfile trips the merge-queue image check, and we need a decision on whether the harness can run its own tools outside OpenBot’s gateway.

# StrandsHarnessAgent is in the release after ag-ui-strands 1.0.4. Until that is published this
# line resolves to a release without it and the Bot fails at import; set the floor to the release
# that carries it when it lands.
ag-ui-strands

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI installs ag-ui-strands 1.1.0, which still lacks StrandsHarnessAgent. I reproduced the import failure locally, and the harness tests passed with the upstream PR build. Once that ships, can we set the minimum version here and rerun CI? Failing job · Upstream PR

@@ -0,0 +1,19 @@
# The AWS Strands harness, as a Bot. The Strands Bot's image with strands-harness added and a
# different agent mounted; what the two share is copied from shared/.
FROM python:3.12-slim

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the merge-queue image check locally. It picks up this Dockerfile and fails because the image is missing from the published list. If we’re holding off on publishing, can we land the Dockerfile with the image entry? Component-list check

return {
"model": (os.environ.get("STRANDS_HARNESS_MODEL") or "").strip()
or WordsAsSaid(model_id=_model_id()),
"builtin_tools": _listed("STRANDS_HARNESS_TOOLS"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turning these tools on lets the harness run commands and modify files in its own container without OpenBot’s grant checks, action policy, or audit log. The harness’s approval prompt leaves those checks outside OpenBot. I’d keep the acting tools disabled in this PR unless a code owner explicitly approves that deployment boundary. OpenBot action boundary

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants