docs: add TypeScript examples to swarm multi-agent documentation#652
Conversation
Documentation Preview ReadyYour documentation preview has been successfully deployed! Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-652/docs/user-guide/quickstart/overview/ Updated at: 2026-03-13T14:26:16.959Z |
There was a problem hiding this comment.
Assessment: Request Changes
This PR adds comprehensive TypeScript examples to the swarm multi-agent documentation. The structure and approach are well-executed, following the snippet patterns outlined in AGENTS.md.
Review Categories
- TypeScript Type Safety: Two callback parameters have implicit
anytypes that cause typecheck failures. See inline comments for suggested fixes. - Documentation Quality: Clear, consistent documentation with proper tabbed content for Python/TypeScript examples.
- Feature Table Updates: Accurate representation of TypeScript SDK capabilities.
Nice work on the comprehensive coverage of swarm functionality for TypeScript users!
24684d1 to
34cdf81
Compare
34cdf81 to
3543ce7
Compare
Documentation Preview FailedThe documentation deployment encountered an error. Please check the deployment logs for more details. |
…cs/multiagent-swarm-typescript
Documentation Preview FailedThe documentation deployment encountered an error. Please check the deployment logs for more details. |
There was a problem hiding this comment.
Assessment: Request Changes
The previously identified issues remain unaddressed. Please fix the implicit any type errors in swarm.ts (lines 72 and 149) before this can be merged.
Outstanding Issues
- Line 72:
result.results.map((r) => r.nodeId)- add type annotation forr - Line 149:
result.content.find((b) => b.type === 'textBlock')- add type annotation forb
These cause TypeScript compilation failures with npm run typecheck:snippets.
The documentation content itself is well-structured and comprehensive.
Looks good except for the ^ |
Description
Adds TypeScript code examples alongside existing Python examples in the swarm multi-agent documentation. This brings the swarm docs up to date with the TypeScript SDK's new Swarm support.
swarm.mdx changes:
startis optional (defaults to first node)swarm.ts: New snippet file with four documented examples (swarm_team, multimodal, streaming, results).
multi-agent-patterns.mdx: Added TypeScript tab to the Shared State section showing
MultiAgentStateandAppStateusage via hooks.overview.mdx: Updated the feature availability table — split the multi-agent row into Swarms, Graphs, Workflows, Agents as tools, and A2A with accurate per-SDK availability.
Related Issues
strands-agents/sdk-typescript#392
Type of Change
Checklist
npm run devBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.