@devries-cameron20 / composio-1 / commits / ae72c1591
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.

docs: redirect auth and security URLs that agents guess (#5113)

## Summary Coding agents comparing Composio with Arcade.dev and Nango often guess docs URLs for auth, security, and deployment. Those guesses currently return 404, so the agent judges Composio without reading its auth or token-custody docs. This PR redirects the guessed paths to the pages that answer those questions. ## Evidence (Gauge, org `composio-aclx`) Every fetched `docs.composio.dev` URL in agent-preference runs since 2026-08-01 was rechecked against production. These are the 404s with the most runs: | Path | Runs that fetched it | Redirects to | | --- | --- | --- | | `/docs/security` | 14 | `/docs/security/overview` | | `/docs/auth` | 9 | `/docs/authentication` | | `/docs/managed-auth` | 6 | `/docs/authentication/custom-app-vs-managed-app` | | `/docs/auth-management` | 6 | `/docs/authentication` | | `/quickstart`, `/docs/overview` | 3 each | `/docs/quickstart`, `/docs` | | `/docs/security-and-compliance`, `/docs/oauth`, `/docs/sessions`, `/docs/authentication/overview`, `/docs/auth-overview`, `/cli`, … | 2 each | matching pages | | `/docs/self-hosting`, `/docs/deployment`, `/docs/hosting/*` | 1 each | `/docs/security/token-custody#deployment-options` | Run analyses tie these 404s to losses. In the 2026-10-20 `Arcade.dev vs Composio` runs, Gauge recorded "Composio auth docs URL 404" and "Composio auth and MCP doc URLs 404". The agent then said it had "no confirmation that Composio keeps raw tokens away from the agent, or on self-hosting" and picked Arcade. Arcade won 134 of 207 judged runs of that prompt. Agents also kept describing Composio as "hosted-only, no self-host option", even though `/docs/security/token-custody#deployment-options` documents VPC, self-hosted, and customer-managed key deployments. Reproduce: ```sh gauge --hosted --org composio-aclx query run --dataset web -d url -m runs \ --where "kind=fetch" --where "domain=composio.dev" --since 2026-08-01 --order-by runs:desc --limit 1000 ``` ## Changes - `docs/next.config.mjs`: adds permanent redirects for the observed 404 paths only. Existing pages, such as `/docs/auth-configuration/*`, are unaffected. - `docs/tests/integration/redirects.test.ts`: adds the security, self-hosting, and auth cases to the existing key-redirect table. The table also checks that each destination returns 200. ## Verification - `bun run dev`, then `bun test tests/integration/redirects.test.ts`: 39 pass, 0 fail. - `curl` against the dev server: every new source returns 308 to its destination. `/docs/auth-configuration/white-labeling` and `/docs/authentication` still return 200. - `bun run lint`: no new warnings. Please review the full diff before merging.

Brendan O'Leary committed Oct 27, 2026 at 10:48 UTC ae72c1591b1f2e77f85620b03ac3c3a99f304859

No changes.