Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix(examples): give the Mastra agents a step budget so tool-router returns output (#3789)
## What Add `stopWhen: stepCountIs(10)` to both Mastra example agent entries (`src/index.ts`, `src/tool-router.ts`). ## Why The first nightly `workflow_dispatch` run of `ts.examples-nightly` (after #3788 merged) failed on the **tool-router** example with `Agent returned empty output`. `agent.generate(...)` had no step budget, so the multi-step Tool Router flow (router `search` + `multi-execute` meta-tools, then summarize) stopped after the first tool call and produced no final text. The non-empty-output assertion added in #3788 turned that silent no-op into a loud failure — working as intended. Every other tool-router example/e2e in the repo already sets a step budget; this matches the Mastra tool-router e2e reference (`ts/e2e-tests/runtimes/node/mastra-tool-router-zod-v4/e2e.test.ts` → `stopWhen: stepCountIs(10)`). ## Verification - `pnpm run lint:examples` and `pnpm run typecheck:examples` green. - Nightly re-dispatch to confirm the tool-router example now returns non-empty output against staging (follow-up once merged). ## Notes - No changeset — example package is private/unpublished. - `index.ts` passed without the budget but gets the same `stepCountIs(10)` for robustness/consistency.