@devries-cameron20 / composio Mirror · read-only / commits / e610d01ca
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

docs: redirect URLs agents guess (DEVREL-330) (#5480)

## Why Agents guess docs URLs from framework and feature names. Many return 404, so the agent keeps guessing or answers from memory. In the Vercel AI SDK Gauge session `cmw9p9zz0001q01gt2r7xlkfk`, both Composio URLs the agent tried were 404 and it never read a real Composio page. The full guessed-URL table and evidence live in [DEVREL-330](https://linear.app/composio/issue/DEVREL-330/redirect-docs-urls-that-agents-guess-framework-connect-link-mcp-auth); this PR ships its table. The [Nov 18 synthesis](https://github.com/ComposioHQ/devrel-tools/blob/gauge/why-synthesis-2026-11-18/data/gauge/2026-11-18/why-synthesis.md) listed these redirects as discoverability work that was still not live. ## What changed **B1. The DEVREL-330 table** (`docs/next.config.mjs`, permanent 308s, matching the existing guessed-path section): | Guessed URL (404 today) | Now 308s to | | --- | --- | | `/docs/mastra` | `/docs/providers/mastra` | | `/docs/vercel-ai-sdk` | `/docs/providers/vercel` | | `/docs/integrations/vercel-ai-sdk` | `/docs/providers/vercel` | | `/docs/langchain`, `/docs/langgraph` | `/docs/providers/langchain` | | `/docs/providers/vercel-ai-sdk`, `/providers/vercel-ai-sdk` | `/docs/providers/vercel` | | `/docs/connect-links` | `/docs/authentication` | | `/docs/mcp-auth`, `/docs/auth-tools/auth-on-mcp` | `/docs/authentication/managed-auth-for-custom-tools` | | `/providers/mcp`, `/docs/providers/mcp` | `/docs/single-toolkit-mcp` (where `/docs/mcp` already goes) | Judgment call: for `/docs/connect-links`, the issue says "Connect Link docs" without naming a page. The page with a dedicated Connect Link section (`/docs/tools-direct/authenticating-tools`) is marked `legacy: true`, so `/docs/authentication` (the current Connect Link flow for both in-chat and manual auth) is the target. **B2. The two `/auth/*` guesses** (`/auth/token-custody`, `/auth/proxy-execute`) now 308 to the token custody page and the Proxy Execute page, placed ahead of the v1-era `/auth/:path*` catch-all that sent everything to `/docs/authentication`. Not a conflict with #5416: that PR's redirect mapping (96 slugs plus `/auth`) lives in the landing repo and targets `composio.dev/auth/<toolkit-slug>`. It does not list `token-custody` or `proxy-execute`. The redirect these two URLs were hitting is the docs repo's own `Old concept/auth paths (v1 docs)` catch-all, which predates that migration and was never a deliberate choice for these slugs. The landing PR's unknown-path fallback (`/auth/:path*` → toolkit index) is landing-side and unchanged. ## Evidence Before this change, all 14 sources below returned 404 on docs.composio.dev, and all 8 distinct targets returned 200 live on docs.composio.dev. Vercel preview deployment for this PR built and reports `DEPLOYED` (deployment `E4o2XXWQGhFJLegcNMXDGnLwWff4`, alias `docs-git-docs-redirect-guessed-urls.preview.composio.dev`). That alias sits behind the team's deployment protection and returns the vercel.live interstitial to plain curl, so the redirect checks below were run against a production build served locally (`GITHUB_ACTIONS=true bun run build`, then `next start`), which serves the same `next.config.mjs` redirects the deployment serves. Every new source, redirects not followed, then the target followed: ```text 308 -> /docs/providers/mastra follow=200 /docs/mastra 308 -> /docs/providers/vercel follow=200 /docs/vercel-ai-sdk 308 -> /docs/providers/vercel follow=200 /docs/integrations/vercel-ai-sdk 308 -> /docs/providers/langchain follow=200 /docs/langgraph 308 -> /docs/providers/langchain follow=200 /docs/langchain 308 -> /docs/providers/vercel follow=200 /docs/providers/vercel-ai-sdk 308 -> /docs/providers/vercel follow=200 /providers/vercel-ai-sdk 308 -> /docs/authentication follow=200 /docs/connect-links 308 -> /docs/authentication/managed-auth-for-custom-tools follow=200 /docs/mcp-auth 308 -> /docs/authentication/managed-auth-for-custom-tools follow=200 /docs/auth-tools/auth-on-mcp 308 -> /docs/single-toolkit-mcp follow=200 /providers/mcp 308 -> /docs/single-toolkit-mcp follow=200 /docs/providers/mcp 308 -> /docs/security/token-custody follow=200 /auth/token-custody 308 -> /docs/extending-sessions/proxy-execute follow=200 /auth/proxy-execute ``` The same 14 redirects also 308 with the same locations on a `next dev` server. ## Checks `bun test tests/integration/redirects.test.ts --timeout 30000` (the documented `test:integration` timeout): 109 pass, 0 fail against the production build, including the new entries and the "all redirect destinations return 200" loop. Note: without `--timeout 30000`, bun's 5s default test timeout can clip the destinations loop on a cold dev server; that is pre-existing harness behavior, not this change. The new redirects are also pinned in `docs/tests/integration/redirects.test.ts`.

Brendan O'Leary committed Nov 20, 2026 at 13:51 UTC e610d01ca32e2b27363128bfdc657e1f3e7ef622

No changes.