Skip to content

docs: add TypeScript examples to swarm multi-agent documentation#652

Merged
pgrayy merged 6 commits intostrands-agents:mainfrom
pgrayy:docs/multiagent-swarm-typescript
Mar 13, 2026
Merged

docs: add TypeScript examples to swarm multi-agent documentation#652
pgrayy merged 6 commits intostrands-agents:mainfrom
pgrayy:docs/multiagent-swarm-typescript

Conversation

@pgrayy
Copy link
Member

@pgrayy pgrayy commented Mar 12, 2026

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:

  • Added TypeScript tabs to Creating a Swarm, Swarm Configuration, Multi-Modal Input, Streaming Events, and Swarm Results sections
  • Added TypeScript-specific Swarm Coordination section explaining structured output routing
  • Updated Swarm Configuration table to reflect that start is optional (defaults to first node)
  • Generalized language-specific prose (Safety Mechanisms, Best Practices) so it reads naturally for both SDKs
  • Marked Swarm as a Tool section as Python-only

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 MultiAgentState and AppState usage 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

  • New content
  • Content update/revision

Checklist

  • I have read the CONTRIBUTING document
  • My changes follow the project's documentation style
  • I have tested the documentation locally using npm run dev
  • Links in the documentation are valid and working

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Documentation Preview Ready

Your 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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

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 any types 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!

@pgrayy pgrayy force-pushed the docs/multiagent-swarm-typescript branch from 24684d1 to 34cdf81 Compare March 12, 2026 22:24
@pgrayy pgrayy force-pushed the docs/multiagent-swarm-typescript branch from 34cdf81 to 3543ce7 Compare March 12, 2026 22:26
@github-actions
Copy link
Contributor

Documentation Preview Failed

The documentation deployment encountered an error. Please check the deployment logs for more details.

@github-actions
Copy link
Contributor

Documentation Preview Failed

The documentation deployment encountered an error. Please check the deployment logs for more details.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

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 for r
  • Line 149: result.content.find((b) => b.type === 'textBlock') - add type annotation for b

These cause TypeScript compilation failures with npm run typecheck:snippets.

The documentation content itself is well-structured and comprehensive.

@afarntrog
Copy link
Contributor

"22:34:58 [astro-broken-links-checker] Broken links have been logged to broken-links.log
22:34:58 [astro-broken-links-checker] Broken link: /pr-cms-652/docs/api/typescript/setupMeter/
Found in:
- /docs/api/typescript/telemetry:getMeter/

Looks good except for the ^

@pgrayy pgrayy dismissed github-actions[bot]’s stale review March 13, 2026 17:08

Addressed feedback.

@pgrayy pgrayy merged commit 1761d28 into strands-agents:main Mar 13, 2026
5 checks passed
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