Skip to content

docs(sdk): publish JavaScript SDK docs#600

Open
jordanc-relevanceai wants to merge 9 commits into
mainfrom
js-sdk-docs
Open

docs(sdk): publish JavaScript SDK docs#600
jordanc-relevanceai wants to merge 9 commits into
mainfrom
js-sdk-docs

Conversation

@jordanc-relevanceai
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new SDK (JavaScript) product to the docs navigation, housing 10 pages covering installation, authentication, client setup, agents, tasks, messaging, workforces, and streaming.
  • Restructures navigation from flat tabs into Mintlify products so the SDK sits as a peer to the main platform docs. The existing tabs now live under a Product product.
  • Refreshes the stale sdk-and-api-triggers.mdx that still referenced the removed @relevanceai/chain package and pip install relevanceai.
  • Adds a dismissible launch banner and sweeps pre-existing JavascriptJavaScript capitalization across the repo.

Context

  • Content sourced from the official SDK docs at RelevanceAI/relevance-js-sdk/docs and verified against the SDK source (exports, method signatures, event names, status mappings, type guards all cross-checked).
  • Structure uses Mintlify's Products feature — same deploy, no new domain, clean product switcher at the top of the sidebar.

Known upstream issue

The "update" task event has a TypeScript type mismatch in the SDK — declared as "updated" in the event map but dispatched as "update" at runtime. Our docs use the runtime-correct "update" and include a <Warning> callout noting the type checker may complain. Worth filing upstream at RelevanceAI/relevance-js-sdk.

Test plan

  • Run `mintlify dev` locally and verify the product switcher toggles between Product and SDK (JavaScript)
  • Click through each of the 10 SDK pages — confirm code blocks render, Tabs/Steps/Accordions work, internal links resolve
  • Check the banner shows on every page and dismisses cleanly
  • Visit `/build/agents/build-your-agent/agent-triggers/sdk-and-api-triggers` and confirm it no longer mentions `@relevanceai/chain` or `pip install relevanceai`
  • Spot-check one of the pre-existing `JavaScript` capitalization fixes (e.g. `/build/tools/tool-steps/code-javascript`)

🤖 Generated with Claude Code

Developers building on @RelevanceAI/sdk had no in-house documentation,
and the sdk-and-api-triggers page was still pointing at the removed
@relevanceai/chain package. This commit introduces a dedicated
SDK (JavaScript) product with installation, authentication, client,
agents, tasks, messaging, workforces, and streaming guides, sourced
from the upstream SDK docs and verified against the SDK source.

Navigation is restructured from flat tabs into Mintlify Products so
the SDK sits as a peer to the main platform docs rather than as a tab
buried under Build. A dismissible banner flags the launch, and
pre-existing JavaScript capitalization issues across the repo are
corrected in the same pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jordanc-relevanceai jordanc-relevanceai self-assigned this Apr 24, 2026
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 24, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
relevanceai 🟢 Ready View Preview Apr 24, 2026, 5:16 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@github-actions

This comment was marked as spam.

Dropping the announcement banner before merge — we decided not to run
the site-wide callout for the SDK launch. Rest of the SDK docs is
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment was marked as spam.

Clarify the importance of persisting embed keys for session continuity and user conversation restoration.
@github-actions

This comment was marked as spam.

@jordanc-relevanceai jordanc-relevanceai marked this pull request as ready for review April 30, 2026 06:37
Adds a persistent "JavaScript SDK" entry under the existing Community
and Contact Support global anchors, giving every page a one-click
route into the SDK docs regardless of which product is active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment was marked as spam.

Comment thread build/agents/build-your-agent/agent-triggers/sdk-and-api-triggers.mdx Outdated
Now that the JavaScript SDK has its own product section, the
dual-purpose sdk-and-api-triggers page was duplicating coverage of
installation, authentication, and event handling that already lives
in /sdk/. Renames the file to api-trigger.mdx and trims it to
API-only content. A Tip callout at the top points developers to the
SDK docs so discoverability from "Build → Triggers" stays intact.

Existing redirects pointing at the old slug now resolve to the new
path, and a fresh redirect from the old sdk-and-api-triggers slug
catches any external bookmarks.

Addresses PR #600 review feedback from @alexrelevanceai.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment was marked as spam.

Reshapes the page after the SDK content split:
- Title and Card label use "API Triggers" (plural) to match peer
  trigger pages (Webhook Triggers, Scheduled Triggers).
- Intro now reads as a proper one-paragraph description of what the
  trigger does and when to use it, mirroring the structure of the
  other trigger pages.
- SDK redirect uses a brand-purple custom Callout instead of the
  default green Tip — visually distinct from the surrounding warnings
  without competing with them.
- Restores the "officially supported" Warning at the top, slimmed to
  reference the API only.
- Moves the "response not returned directly" Note from the top stack
  into the API reference section, where it's contextually relevant
  to the request body.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment was marked as outdated.

The lint check on the PR flagged the empty alt attribute on the
hero image. Adds a short description so the page passes the
accessibility lint rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🎯 Vibe check

Reviewed: 20 files (7 with issues, 13 clean)

Scores

Dimension Score What's holding it back
🟡 Consistency 7/10 triggers.mdx Card titles mix capitalized and lowercase "Triggers" for the same product noun. code-javascript.mdx heading uses "api" instead of "API". Bold bullet labels use title case.
🟡 Technical clarity 7/10 conditions.mdx has a copy-paste error that says "Access loops" instead of "Access conditions". triggers.mdx table references "SDK & API Triggers" but the SDK is now a separate product section with no corresponding Card. Both embed_agents.mdx and embed_tools.mdx are orphaned (not in docs.json navigation), and embed_agents.mdx has the wrong content entirely.
🟡 Non-technical clarity 8/10 Grammar errors in getting-started.mdx and the JS code snippet. The SDK section is excellent throughout.
🟡 Structure 7/10 Heading hierarchy broken in code-javascript.mdx. Both embed pages are missing from docs.json. embed_agents.mdx is a copy of embed_tools.mdx.

Score key: 🟢 9–10, 🟡 6–8, 🔴 1–5.

Overall vibe: The SDK documentation is the clear highlight — well-structured, consistent sentence case, good use of type reference tables, and genuinely useful gotchas (like the unsubscribe leak warning and the TypeScript type bug on "update" events). The weaker spots are concentrated in older non-SDK files that appear to have been touched lightly: a copy-paste error that went unnoticed, two embed stub pages that aren't wired up to navigation, and a decision table that still mentions SDK triggers even though the SDK is now its own product tab.

🔧 Issues (10)
  • build/tools/advanced-setup/conditions.mdx:12 — "Access loops under the three-dot menu on the top right of steps" → "Access conditions under the three-dot menu…" — copy-paste from the loops page, wrong noun

  • build/agents/build-your-agent/triggers.mdx:100 — Table row | Trigger my agent from code I control | **SDK & API Triggers** | is stale. The "Build your own triggers" Cards only include Webhook, API, and Tools as Triggers — there is no SDK Card and the SDK is now its own product section. Either add a link to /sdk/introduction or rename the table entry to "API Triggers" and add a separate row for the SDK.

  • build/agents/build-your-agent/triggers.mdx:86-88 — Card title capitalization is inconsistent: "Integration triggers" and "Scheduled triggers" use lowercase "triggers", while "API Triggers" and "Tools as Triggers" capitalize it. If Trigger is a product proper noun (as CLAUDE.md says), capitalize consistently in all four: "API Triggers", "Scheduled Triggers", "Integration Triggers". If treating as generic, lowercase all four.

  • build/agents/build-your-agent/triggers.mdx:11-14 — Bold bullet labels ("Scheduled Events", "External Actions", "Manual Activation") use title case. Sentence case: "Scheduled events", "External actions", "Manual activation".

  • build/tools/tool-steps/code-javascript.mdx:17 — Heading ### Access to input variables, other steps' output and api keys — "api" → "API" (acronym, always all-caps)

  • build/tools/tool-steps/code-javascript.mdx:36-37### Deno runtime is at ### level, the same level as ### Installing & using packages. It should be #### since it describes a sub-option under the installing section. #### Node.js runtime below it is already at ####, so the hierarchy is Deno at ### with Node as a child of Deno — not the intent.

  • build/tools/tool-steps/getting-started.mdx:13 — "Relevance support variety analysis steps with all the requirement all taken care of." — Multiple grammar errors. Suggested: "Relevance supports a variety of analysis steps, with all runtime requirements handled for you."

  • _snippets/components/tools/code-javascript.mdx:1 — "A JavaScript code component is available to Run JavaScript codes when necessary." — "Run" → "run" (sentence case after "to"), "codes" → "code" (uncountable noun). Better: "A JavaScript code step is available to run custom JavaScript."

  • embed/embed_agents.mdx — File is byte-for-byte identical to embed/embed_tools.mdx — same title ("Embed tools"), same description, same body. This file is named embed_agents and presumably should cover embedding agents, not tools. Content needs to be written.

  • embed/embed_agents.mdx and embed/embed_tools.mdx — Neither file appears in docs.json navigation. Both pages are orphaned — readers cannot navigate to them. Either add them to docs.json or remove the files.

⚠️ Contradictions (1)
  • build/agents/build-your-agent/triggers.mdx:100 says the trigger type for "code I control" is "SDK & API Triggers", implying a combined option. But build/agents/build-your-agent/agent-triggers/api-trigger.mdx covers only the REST API — the SDK now has its own product tab (/sdk/introduction). A user who reads the table and expects to find SDK-specific guidance via the triggers section will not find it. The old sdk-and-api-triggers.mdx page was deleted and redirected to api-trigger.mdx, but the table text wasn't updated to reflect the split.
✅ Clean files (13)

sdk/introduction.mdx, sdk/quickstart.mdx, sdk/installation.mdx, sdk/authentication.mdx, sdk/client.mdx, sdk/agents.mdx, sdk/tasks.mdx, sdk/messaging.mdx, sdk/workforces.mdx, sdk/streaming.mdx, build/agents/build-your-agent/agent-triggers/api-trigger.mdx, _snippets/setup-code-warning.mdx, docs.json

Note on docs.json: The new SDK product tab is wired up correctly. The three redirects for the old sdk, api, and sdk-and-api-triggers paths all point to api-trigger.mdx — sensible defaults. The SDK tab navigation (Overview → Setup → Core concepts) matches the page hierarchy.

🔋 Credit usage
Item Count
Files reviewed 20
Context pages read 2 (custom-webhook.mdx, docs.json navigation/redirects)
Total lines processed ~1,870

Files read: _snippets/components/tools/code-javascript.mdx (1 line), _snippets/setup-code-warning.mdx (3 lines), build/agents/build-your-agent/agent-triggers/api-trigger.mdx (122 lines), build/agents/build-your-agent/triggers.mdx (119 lines), build/tools/advanced-setup/conditions.mdx (28 lines), build/tools/tool-steps/code-javascript.mdx (68 lines), build/tools/tool-steps/getting-started.mdx (56 lines), embed/embed_agents.mdx (13 lines), embed/embed_tools.mdx (13 lines), sdk/agents.mdx (115 lines), sdk/authentication.mdx (141 lines), sdk/client.mdx (95 lines), sdk/installation.mdx (178 lines), sdk/introduction.mdx (50 lines), sdk/messaging.mdx (217 lines), sdk/quickstart.mdx (77 lines), sdk/streaming.mdx (104 lines), sdk/tasks.mdx (177 lines), sdk/workforces.mdx (150 lines), docs.json (972 lines), build/agents/build-your-agent/agent-triggers/custom-webhook.mdx (38 lines, context)

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.

3 participants