Page actions

AWS Strands Quickstart

This runs the example from a clone of the monorepo. The backend is a uvicorn process on port 5331; the Angular dev server is on port 4331 and proxies /agent to it.

Note: Prerequisites

Node.js 20 or newer, Python 3.12 or newer, uv, and an OpenAI API key. No AWS account and no AWS credentials are required.

1
Install workspace dependencies
git clone https://github.com/cacheplane/angular-agent-framework.git
cd angular-agent-framework
npm ci
2
Configure the backend environment

Copy the example file and fill in a real key.

cp cockpit/runtimes/aws-strands/python/.env.example \
   cockpit/runtimes/aws-strands/python/.env
VariableRequiredPurpose
OPENAI_API_KEYYesStrands' native OpenAI provider.
OPENAI_CHAT_MODELNoModel name. Defaults to gpt-4o-mini.
OPENAI_BASE_URLNoRedirects the OpenAI client. The end-to-end fixture harness sets this to replay recorded calls.
OTEL_SDK_DISABLEDNoAlready set to true in src/agent.py. Strands wires OpenTelemetry unconditionally and logs exporter noise without a collector.
OTEL_PYTHON_DISABLED_INSTRUMENTATIONSNoSame reason, set to all by default.
3
Start both halves

One command starts the Angular dev server and the Python backend together.

npx tsx scripts/examples/serve-example.ts --capability=rt-strands

The script runs uv sync in cockpit/runtimes/aws-strands/python on the way, so the first start takes longer than later ones. Two processes appear in the output, one per half; stopping the script stops both.

4
Open the app

Visit http://localhost:4331. The backend answers on http://localhost:5331/agent, with an unauthenticated health check at http://localhost:5331/ok.

5
Exercise every surface

The app opens with two welcome suggestions, and one of them covers the tool call, the shared state, and the interrupt in a single turn.

  1. Send Book the Q3 roadmap review, which submits "Book a Q3 roadmap review meeting with the platform team on Tuesday." The agent calls check_availability first, and the requested day and its open slots appear in the "Shared state — schedule" panel beside the transcript. Then it calls book_meeting, the run stops, and a card titled "Booking approval required" shows the topic and the chosen slot above Cancel and Approve.
  2. Approve or cancel the card. The run resumes and the agent confirms in one sentence either that the meeting is booked or that nothing was booked. The panel keeps the booking as it was snapshotted before the pause, because no hook writes state after the interrupt resolves.
  3. The second suggestion, Book a design critique, runs the same two steps for the web team on Thursday.
  4. For the subagent surface, type a research request instead: "Find a slot for Ada and Grace next week — research their availability first." The agent calls research_availability, and the specialist's answer streams token by token inside a subagent card rather than into the parent bubble.

About the bridge pin

pyproject.toml pins ag-ui-strands to a git reference of the ag-ui-protocol/ag-ui repository, subdirectory integrations/aws-strands/python, through [tool.uv.sources]. The exported requirements file carries the matching git+https://...#subdirectory=... line.

The published PyPI release, ag-ui-strands 0.3.0, is stale: it predates the interrupt and resume contract this example depends on, and it crashes on multi-agent routes. Installing from PyPI instead of the pin will not reproduce the behavior documented here.

Next steps

  • How It Connects — the wire conventions this example relies on.
  • Overview — what the integration does and does not support.

Looking for something specific?