Conversation
…, interventions) New sample at typescript/01-learn/07-express-chatbot: a Node.js + Express chatbot service on the Strands Agents TypeScript SDK. Includes: - SSE streaming route with incrementing event ids (POST /chat/stream) - non-streaming JSON route (POST /chat) and a health check - three Zod-validated tools (get_current_time, calculate, get_weather) - an in-memory per-session conversation store - an optional MCP client that loads server tools at startup - rate-limit and moderation interventions - README following the sample template and updated 01-learn index
…re diagram - Default MCP_SERVER_URL to the public, no-auth AWS Knowledge MCP Server (https://knowledge-mcp.global.api.aws) so the agent can search/read AWS docs out of the box; config falls back to it and can be disabled by setting it empty. - Update the MCP module docs and README (overview, features, config, example queries, resources) to reflect connecting to an existing remote MCP server. - Add an architecture diagram (PNG + SVG source) following the style of the other TypeScript samples.
…cies - Switch default Bedrock model from Claude Haiku 4.5 to Amazon Nova Pro - Update .env.example with new model ID (us.amazon.nova-pro-v1:0) - Update config.ts default model ID to match - Refresh package.json dependencies: @strands-agents/sdk to ^1.19.0, express to ^5.1.0, @types/express to ^5.0.0 - Update README prerequisites and configuration table to reflect new default model - Update architecture diagram and diagram label to show Amazon Nova Pro instead of Claude Haiku 4.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new TypeScript sample: an Express + Strands Agents chatbot starter at
typescript/01-learn/07-express-chatbot.It rebuilds the shape of a typical chatbot service (Node.js, Express, three tools) on the Strands Agents TypeScript SDK, and demonstrates several SDK features together in one runnable service:
POST /chat/streamforwards everyAgentStreamEventas its own Server-Sent Event with an incrementingid:line (plus a leadingsessionevent and a trailingdone/errorevent).POST /chatreturns the final reply as JSON, plusGET /health.get_current_time,calculate,get_weather) with Zod input schemas.beforeToolCall) caps tool calls per session, and a moderation intervention (beforeModelCall) blocks configured terms.The default model provider is Amazon Bedrock (Amazon Nova Pro). The sample follows the project structure and README template in
.github/templates/use-cases/, includes an architecture diagram, and updates the01-learnindex with the new entry.Project structure
Testing
Verified locally:
npm run typecheck(tsc --noEmit) — passes with no errors.npm run smoke— passes: tool registration, moderation (proceed/deny), rate limiting (allow up to cap then deny), and the HTTP layer (400 on empty body,/healthok)./healthreturns{"status":"ok"}, andPOST /chat/streamemits well-formed SSE frames (id:/event:/data:) starting with thesessionevent. The Bedrock model call requires valid AWS credentials and model access at runtime; failures surface as an SSEerrorevent rather than crashing the process.Notes
us.amazon.nova-pro-v1:0).MCP_SERVER_URLto another Streamable HTTP MCP server, or empty to disable.Tracking
This is a new feature, so there is no GitHub issue to close (no
Fixes #applies). Tracked in Asana: https://app.asana.com/1/8442528107068/project/1217155663608611/task/1218296727005011