Skip to content

feat: require CopilotKit Intelligence in every mode - #38

Merged
jerelvelarde merged 1 commit into
mainfrom
tyler/require-intelligence
Sep 23, 2026
Merged

jerelvelarde merged 1 commit into
mainfrom
tyler/require-intelligence

Conversation

@tylerslaton

@tylerslaton tylerslaton commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Require a server-only CopilotKit Intelligence key in sample and live mode.
  • Always construct the Intelligence-backed runtime and provision the main thread through Intelligence.
  • Pass the key to the isolated demo API and update setup guidance and tests.

Why

Sample mode could previously start a runtime without Intelligence and use local conversation history. The normal OpenMuse startup path now requires Intelligence in every mode.

How

  • Keep environment reading and required-key validation in apps/server/src/config.ts; validate both startup and direct app construction.
  • Remove the runtime and main-thread branches that skipped Intelligence.
  • Update sample test fixtures to use synthetic keys and adapt streaming tests to exercise the agent directly.
  • Verify pnpm lint, pnpm typecheck, pnpm test (156 passing), and pnpm build:server. In a fresh checkout, API, worker, and demo startup reject a missing key. With a provisioned key, sample and live modes created real Intelligence threads; a live model reply was persisted in Intelligence.

@tylerslaton
tylerslaton force-pushed the tyler/require-intelligence branch from 8ca1b2a to 1276eed Compare September 23, 2026 05:48
@jerelvelarde
jerelvelarde merged commit bb7ce4e into main Sep 23, 2026
7 checks passed
jerelvelarde pushed a commit that referenced this pull request Sep 23, 2026
Resolve conflicts with #38 (Intelligence required in every mode):
createIntelligence always returns a client, and the Learning container
check builds on main's assertApiDeploymentConfig.

Address review findings on #25:
- Learning is opt-in: an unset or blank
  CPK_INTELLIGENCE_LEARNING_CONTAINER_ID leaves it disabled instead of
  blocking startup; a set ID is still validated.
- /api/main-thread now passes learningContainerId when provisioning the
  main conversation. getOrCreateThread returns existing Threads
  unchanged, so the run handler's later assignment never applied.
- Collection is scoped to AGENT_BACKEND=model, the same agent that
  receives published Skills, so external AG-UI Threads are not pooled
  as evidence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeEDhyx68BNksnt2Dw3957
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