Skip to content

AWS Strands harness as a Bot - #2326

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

mme wants to merge 14 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, write, edit, web and subagent tools) are off, with no switch. They would act in the Bot's container, past the gateway, and whether a Bot may do that is a boundary for OpenBot to decide. With none of them on, the harness's own approval gate has nothing to ask about and is off too.
  • 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, and since the harness's own tools and gate are off, the Bot raises no wait of its own for a replica to lose.
  • 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 harness's own acting tools are off and cannot be switched on from the environment, so every call the Bot makes is one OpenBot grants and the server checks. Turning them on is a separate decision about the deployment boundary.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. This stays a draft until ag-ui-strands ships with the upstream PR; then the floor goes in here and CI reruns.

@@ -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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried it: with the image in .github/published-images.json, scripts/model-compat.test.ts ("every published harness is one the matrix can run") then asks for a row in shared/harnesses.json, which is registering the harness as an engine: the harness enum in the API and the generated clients, the desktop app's list and the model lock. That is more than an image entry, so I left it out of this push. It needs doing before this can merge either way; I'd do the registration as the next step here once the dependency is released, unless you'd rather the Dockerfile moved to that change.

Comment thread agent-strands-harness/src/main.py Outdated
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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 6212c7f. The harness's own tools are off with no switch: STRANDS_HARNESS_TOOLS and STRANDS_HARNESS_INTERVENTIONS are gone, and a test sets both and checks nothing is offered. Every call the Bot makes is now one OpenBot grants and the server checks; the description's boundary box is ticked on that basis. Turning them on can be its own change with a code owner's approval.

mme added 3 commits December 4, 2026 11:33
…nce its time is over, and tracked as a turn

- A wait OpenBot holds beside the Bot's is released on the agent before the
  answer is sent, as before any message: with both replayed, Allow sent nothing.
- A wait whose time is over can only be let go. The card says so and offers
  that, and a click checks again.
- The answer runs as a turn like any other, so what the Bot goes on to say
  reaches the roster and a failed run is said under the transcript; one that
  never left the browser is said on the card.
They act in the Bot's container, past the server's grant checks, action
policy and audit log. Whether a Bot may act there is a boundary for OpenBot
to decide, so STRANDS_HARNESS_TOOLS and STRANDS_HARNESS_INTERVENTIONS are
gone: with no tool of the harness's own there is nothing for its gate to ask.

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