Skip to content

Update widget to use new agents-ui package#2941

Merged
sarah-inkeep merged 5 commits intomainfrom
prd-6397
Apr 1, 2026
Merged

Update widget to use new agents-ui package#2941
sarah-inkeep merged 5 commits intomainfrom
prd-6397

Conversation

@sarah-inkeep
Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 31, 2026

⚠️ No Changeset found

Latest commit: 09849e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Mar 31, 2026 11:27pm
agents-manage-ui Ready Ready Preview, Comment Mar 31, 2026 11:27pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Mar 31, 2026 11:27pm

Request Review

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Mar 31, 2026

TL;DR — Migrates the docs site widget from the legacy @inkeep/cxkit-react package to @inkeep/agents-ui-cloud, removes client-side tool definitions (sales signal detection, support escalation) that are now handled server-side, and restructures auth to use a dedicated appId for chat alongside a search-specific API key.

Key changes

  • Replace @inkeep/cxkit-react with @inkeep/agents-ui-cloud — all widget imports and docs code samples updated to the new package; @inkeep/cxkit-react dependency removed entirely.
  • Remove client-side tool schemassales-escalation.ts and support-escalation.ts deleted; detectSalesSignal and provideAnswerConfidence tool definitions removed from the widget config (these are now handled by the agents backend).
  • Restructure API key and app ID configuration — top-level apiKey in baseSettings replaced with appId in aiChatSettings and a scoped apiKey in searchSettings.
  • Rename modalSettings to openSettings — follows the updated @inkeep/agents-ui-cloud prop API.
  • Bump @inkeep/agents-ui and @inkeep/agents-ui-cloud to ^0.15.25 — aligns both packages to the same version.

Summary | 7 files | 1 commit | base: mainprd-6397


Widget package migration from @inkeep/cxkit-react to @inkeep/agents-ui-cloud

Before: Widget components (InkeepChatButton, InkeepModalSearchAndChat, type exports) imported from @inkeep/cxkit-react.
After: All imports point to @inkeep/agents-ui-cloud; @inkeep/cxkit-react removed from dependencies.

This applies to both the runtime widget in inkeep-script.tsx and the documentation code samples in styling.mdx and custom-trigger.mdx. The modalSettings prop was also renamed to openSettings to match the new package's API.

inkeep-script.tsx · styling.mdx · custom-trigger.mdx · package.json


Client-side tool definitions removed

Before: inkeep-script.tsx defined getTools with two client-side function tools (detectSalesSignal, provideAnswerConfidence) using Zod schemas from sales-escalation.ts and support-escalation.ts.
After: Both tool modules deleted; getTools removed from the widget config. The z import and as any cast on aiChatSettings are also gone.

These tools (sales signal detection, answer confidence / support escalation) are now managed server-side by the agents backend rather than being defined inline in the widget.

sales-escalation.ts · support-escalation.ts · inkeep-script.tsx


Auth restructured: appId for chat, scoped apiKey for search

Before: A single apiKey lived in baseSettings and was used for both chat and search.
After: baseSettings.apiKey removed; aiChatSettings.appId (from NEXT_PUBLIC_INKEEP_APP_ID) authenticates chat, and searchSettings.apiKey (hardcoded value) authenticates search independently.

A new NEXT_PUBLIC_INKEEP_APP_ID env var is required. The component now guards on both apiKey and appId before rendering.

inkeep-script.tsx

Pullfrog  | View workflow run | Triggered by Pullfrog | Using Claude Opus𝕏

@github-actions github-actions bot deleted a comment from claude bot Mar 31, 2026
@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Mar 31, 2026

TL;DR — Migrates the docs site widget from the legacy @inkeep/cxkit-react package to @inkeep/agents-ui-cloud, removes client-side tool definitions for sales and support escalation (now handled server-side by the agents-ui package), and restructures auth to use a separate appId for chat.

Key changes

  • Replace @inkeep/cxkit-react with @inkeep/agents-ui-cloud — All widget imports across docs and code examples now reference the new package, and @inkeep/cxkit-react is removed as a dependency.
  • Remove client-side escalation tool definitions — Deletes sales-escalation.ts and support-escalation.ts along with the inline getTools configuration, since these tools are now provided by the agents-ui package itself.
  • Add appId for chat authentication — Introduces NEXT_PUBLIC_INKEEP_APP_ID and moves apiKey from baseSettings to searchSettings, with appId placed in aiChatSettings.
  • Rename modalSettings to openSettings — Follows the new @inkeep/agents-ui-cloud prop API.

Summary | 7 files | 4 commits | base: mainprd-6397


Widget package migration from @inkeep/cxkit-react to @inkeep/agents-ui-cloud

Before: Widget used @inkeep/cxkit-react for all React component imports.
After: All imports come from @inkeep/agents-ui-cloud; @inkeep/cxkit-react dependency is removed entirely.

The package.json bumps @inkeep/agents-ui and @inkeep/agents-ui-cloud to ^0.15.25 and drops @inkeep/cxkit-react. All import paths in the widget component and docs code examples are updated to match.

inkeep-script.tsx · package.json · styling.mdx · custom-trigger.mdx


Client-side escalation tools removed

Before: inkeep-script.tsx defined two client-side tools (detectSalesSignal, provideAnswerConfidence) via getTools, backed by Zod schemas in sales-escalation.ts and support-escalation.ts.
After: Both files are deleted and the getTools block is removed — escalation logic is now managed server-side by the agents-ui package.

This removes ~130 lines of client-side Zod schemas and tool rendering logic. The z import and all references to the escalation modules are cleaned up from inkeep-script.tsx.

sales-escalation.ts · support-escalation.ts


Auth restructured with separate appId and apiKey scoping

Before: A single apiKey was set in baseSettings and used for both search and chat.
After: apiKey moves to searchSettings, a new appId (from NEXT_PUBLIC_INKEEP_APP_ID) is added to aiChatSettings, and the guard checks for both values.

Why split the keys? The new agents-ui-cloud package uses appId for chat authentication and keeps apiKey scoped to search. The modalSettings prop is also renamed to openSettings to match the updated component API.

inkeep-script.tsx

Pullfrog  | View workflow run | Triggered by Pullfrog | Using Claude Opus𝕏

Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(2) Total Issues | Risk: Medium

🔴❗ Critical (1) ❗🔴

Inline Comments:

  • 🔴 Critical: styling.mdx:15 Missed import migration — code example references removed @inkeep/cxkit-types package

🟠⚠️ Major (1) 🟠⚠️

🟠 1) .env.example New required env var not documented

Issue: The PR introduces a new required environment variable NEXT_PUBLIC_INKEEP_APP_ID in inkeep-script.tsx, but .env.example has not been updated to document this variable.

Why: The InkeepScript component now returns early (renders nothing) when either NEXT_PUBLIC_INKEEP_API_KEY or NEXT_PUBLIC_INKEEP_APP_ID is missing. Contributors cloning the repo won't know this variable is required, leading to silent widget failures.

Fix: Add to .env.example:

# ============ INKEEP DOCS WIDGET ============
# App ID for Inkeep chat widget in docs site (required for widget to render)
# NEXT_PUBLIC_INKEEP_APP_ID=

Per the repo's adding-env-variables skill, all new env vars should be documented in .env.example with descriptions.

Refs:


🚫 REQUEST CHANGES

Summary: The package migration is clean overall, but there's a critical broken code example in the docs (line 15 of styling.mdx still imports from @inkeep/cxkit-types) and the new NEXT_PUBLIC_INKEEP_APP_ID env var should be documented. Both are quick fixes — see the inline suggestion for the import fix.

Discarded (0)

No findings were discarded.

Reviewers (3)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-standards 1 0 0 0 1 0 0
pr-review-docs 1 0 0 0 1 0 0
pr-review-devops 5 1 0 0 0 0 0
Total 7 1 0 0 1 0 0

Note: pr-review-standards and pr-review-docs both flagged the same cxkit-types import issue (deduplicated to single inline comment). DevOps returned 4 INFO-level findings confirming clean dependency removal, proper lockfile updates, and no changeset requirement.

@github-actions github-actions bot deleted a comment from claude bot Mar 31, 2026
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

Net positive cleanup — removes @inkeep/cxkit-react, drops client-side tool definitions, and migrates to @inkeep/agents-ui-cloud. Two issues worth addressing: a hardcoded search API key that should use an env var, and an apiKey variable that's now read but never passed to the config.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Claude Opus𝕏

} as any,
},
searchSettings: {
apiKey: '0ed8a392c5f1bd3e1c0fb91684932c932a2f6e9765e0344b',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This API key is now hardcoded in source. Previously, the key came from NEXT_PUBLIC_INKEEP_API_KEY. Even though NEXT_PUBLIC_ keys are browser-visible, hardcoding makes rotation harder and is inconsistent with how appId is handled via env var. Consider using the existing apiKey variable here instead:

Suggested change
apiKey: '0ed8a392c5f1bd3e1c0fb91684932c932a2f6e9765e0344b',
apiKey,

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

New commit addresses the hardcoded API key — searchSettings.apiKey now correctly uses the env var. Both review comments are resolved. LGTM.

Pullfrog  | View workflow run | Using Claude Opus𝕏

Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(1) Total Issues | Risk: Low

🕐 Pending Recommendations (1)

  • 🟠 scope New required env var NEXT_PUBLIC_INKEEP_APP_ID should be documented in .env.example

💡 APPROVE WITH SUGGESTIONS

Summary: The critical import migration issue (styling.mdx:15 referencing @inkeep/cxkit-types) has been fixed in commit 773b0fe0f. The package migration is now complete. One item remains from the prior review: documenting NEXT_PUBLIC_INKEEP_APP_ID in .env.example per the repo's adding-env-variables skill.

Discarded (0)

No findings were discarded.

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
orchestrator 1 0 0 0 0 1 0
Total 1 0 0 0 0 1 0

Note: Delta review — prior CRITICAL issue (import migration) has been fixed. Only the env var documentation item from the prior review remains pending.

Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(1) Total Issues | Risk: Low

🕐 Pending Recommendations (1)

  • 🟠 scope New required env var NEXT_PUBLIC_INKEEP_APP_ID should be documented in .env.example

💡 APPROVE WITH SUGGESTIONS

Summary: Delta review of commit 09849e165 Fix ship examples. The changes correctly update the "Ship" UI guide snippets (js-script-tag.ts and react-install.ts) to use the new @inkeep/agents-ui-js-cloud@0.15 and @inkeep/agents-ui-cloud packages, consistent with the rest of the migration. No new issues. One item remains pending from the prior review: documenting NEXT_PUBLIC_INKEEP_APP_ID in .env.example.

Discarded (0)

No findings were discarded.

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
orchestrator 0 0 0 0 0 1 0
Total 0 0 0 0 0 1 0

Note: Delta review — the 2 files changed since last review are clean. Only the env var documentation item from prior reviews remains pending.

@github-actions github-actions bot deleted a comment from claude bot Mar 31, 2026
@sarah-inkeep sarah-inkeep enabled auto-merge March 31, 2026 23:30
@sarah-inkeep sarah-inkeep added this pull request to the merge queue Mar 31, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 31, 2026
Copy link
Copy Markdown
Collaborator

@amikofalvy amikofalvy left a comment

Choose a reason for hiding this comment

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

@sarah-inkeep do we need to configure the "ship it" chat widget with the new token fetching or is that already being handled?

@sarah-inkeep
Copy link
Copy Markdown
Contributor Author

@amikofalvy the chat widget handles the anonymous token fetching internally so it will out of the box unless users are setting up the private / public key and not allowing anonymous sessions, in which case they will need to configure the getAuthToken prop

@sarah-inkeep sarah-inkeep added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit dcbdb98 Apr 1, 2026
28 checks passed
@sarah-inkeep sarah-inkeep deleted the prd-6397 branch April 1, 2026 00:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🔎💬 Inkeep AI search and chat service is syncing content for source 'Inkeep Agent Framework Docs'

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