SDKs · 0. Which SDK should I use?
Talking to the Crux Daemon: install @cuecrux/client for TypeScript, or corecrux-client for Python. Both live in the Crux repository under sdks/, and the daemon's own developer portal names them "the supported public SDK surface" (docs/developer-portal.md:61). Talking to the CueCrux Engine, a different service with a different API; your only client is @cuecrux/engine-client, and you should read chapter 6 before you depend on it.
Everything else published under the @cuecrux/ npm scope comes from a second, unrelated repository called SDKCrux, which last shipped on 2026-06-12. Neither repository mentions the other. Chapter 5 documents that estate for people already using it; this chapter tells you when it applies, which is rarely.
This chapter is explanation: why the landscape looks like this and how to choose within it. The per-package reference is chapters 1, 2 and 5.
0.0 In plain English
An SDK is a library that wraps an HTTP API so that you call a function instead of assembling a request. Nothing here is doing anything you could not do with curl. What it saves you is the tedious and easily-got-wrong part: building the URL, attaching the auth header in the right form, serialising the body, decoding the error shape, and giving you types your editor understands.
The reason this chapter exists at all is less happy than that, and you should know it before you install anything. There are two unrelated code estates publishing packages into the same @cuecrux/ npm scope, and neither repository mentions the other. Scope membership is therefore not evidence of anything. Two packages sitting next to each other in the registry may come from different teams, different repositories and different release cadences, and one of them may be considerably staler than the other.
You will read this chapter exactly once, before you install, and the payoff is that you install the right thing first time. §0.1 is the decision table and is the whole answer if you are in a hurry. §0.2 states what each registry actually serves today, which is worth checking rather than assuming, because a package existing is not the same as a package being current.
The thing people get wrong is treating the daemon client and the Engine client as interchangeable because the names look like siblings. They are not. They talk to two different services with two different APIs, and pointing one at the other does not fail in an obvious way at install time. Work out which service you are talking to first, then pick the client, and read §0.5 for the things none of these libraries do for you regardless of which you choose.
0.1 Decision table
| What you are doing | Language | Install | Chapter | Status |
|---|---|---|---|---|
| Read and write facts, sessions and queries on the Crux Daemon | TypeScript / JavaScript | npm install @cuecrux/client | 1 | SHIPPED |
| Read and write facts, sessions and queries on the Crux Daemon | Python | pip install corecrux-client | 2 | SHIPPED |
| Subscribe to daemon mutation events over SSE | TypeScript only | npm install @cuecrux/client | 1 | SHIPPED, unauthenticated only, see 1.9 |
| Read receipts from the daemon | Neither Crux SDK covers this | Call GET /v1/receipts/{id} directly, or use SDKCrux @cuecrux/memory from source | 5 | Not in either Crux SDK |
| Ask the CueCrux Engine for an answer | TypeScript / JavaScript | npm install @cuecrux/engine-client | 5 | SHIPPED, typings broken, see 6.1 |
| Verify a CueCrux Engine answer receipt from a terminal | CLI | Not published. Build from SDKCrux source | 5 | Unpublished |
Ergonomic remember() / recall() / forget() over the daemon | TypeScript / JavaScript | Not published. Vendor from SDKCrux source | 5 | Unpublished prototype |
| Anything in Rust, Go, Java, C# | - | No SDK exists. Use the HTTP API | - | Not built |
There is no Rust, Go, Java or C# client. The daemon publishes its own OpenAPI document at GET /v1/openapi.json, which is the supported route for a language we do not ship.
0.2 Install commands, and what the registry actually serves
Registry state was queried on 2026-07-27. Manifest version means the version in the repository today; published version means what npm install or pip install resolves to.
| Package | Registry | Manifest version | Published version | First published |
|---|---|---|---|---|
@cuecrux/client | npm | 0.2.0 | 0.1.0 | 2026-06-12 |
corecrux-client | PyPI | 0.1.0 | 0.1.0 | 2026-06-12 |
@cuecrux/engine-client | npm | 1.1.1 | 1.1.1 | - |
@cuecrux/factory | npm (declared target) | 0.1.0 | not published | - |
@cuecrux/memory | npm (declared target) | 0.1.0 | not published | - |
cuecrux-receipt | npm (declared target) | 0.1.1 | not published | - |
@cuecrux/policy-cli | npm (default, unintended) | 0.14.1 | not published | - |
Two consequences you need before you write any code.
@cuecrux/client is one minor version behind its repository. npm install @cuecrux/client gives you 0.1.0. The repository is at 0.2.0 (package.json:3), whose only change is three optional fields on VersionResponse.update (CHANGELOG.md:3). Every method and every other type documented in chapter 1 is present in the published 0.1.0. The publish job only fires on an sdk-typescript-v* tag (sdk-typescript.yml:58); no such tag exists in the repository, so 0.2.0 has not shipped. See 6.9.
Three of the four "public" SDKCrux packages have never been published. Their manifests declare publishConfig.registry: registry.npmjs.org and access: public, but no workflow publishes them, and the registry returns 404. @cuecrux/engine-client is the only SDKCrux package you can actually install. Chapter 5 documents the rest from source, because vendoring is the only way to use them.
0.3 Why there are two estates
The two SDK programmes were built for two different services and never reconciled.
Crux sdks/ | SDKCrux | |
|---|---|---|
| Repository | CueCrux/Crux, directory sdks/ | CueCrux/SDKCrux |
| Last change to SDK code | 9fbc8ab, 2026-07-22 | 896cfc3, 2026-06-12 |
| Target service | Crux Daemon (corecruxd), HTTP on port 14800 | CueCrux Engine, a separate hosted service |
| Public packages | @cuecrux/client (npm), corecrux-client (PyPI) | @cuecrux/engine-client (npm) plus three unpublished |
| Release trigger | Git tag sdk-python-v* / sdk-typescript-v* | Manual workflow_dispatch |
| Registry credentials | None. OIDC Trusted Publishing on both registries | None for the public lane. OIDC Trusted Publishing |
| Reproducibility gate | Python builds twice under SOURCE_DATE_EPOCH and diffs the sha256 sums | None |
| Endorsed by the daemon docs | Yes, explicitly | Not mentioned anywhere |
The canonical answer is the Crux sdks/ estate, on four grounds, all checkable:
- The daemon's own documentation says so. "The in-repo SDKs are the supported public SDK surface" (developer-portal.md:61).
- It is the only one still moving. 2026-07-22 against 2026-06-12.
- Its release path cannot publish by accident. Both workflows carry top-level
permissions: contents: read, so a build run can never obtain registry write; only a version-matchedsdk-*-v*tag starts a publish job withid-token: write(sdk-typescript.yml:16, sdk-python.yml:16). - The Python lane proves its own artifact. It builds the distribution twice under a pinned
SOURCE_DATE_EPOCHand fails the run if the sha256 sums differ (sdk-python.yml:43). See 2.10.
What the counter-claim says. SDKCrux's README states the repository "contains the entire CueCrux SDK surface" (README.md:7). Both statements cannot be true. That README predates @cuecrux/memory entirely and its package map omits nine of the packages in the repository. We are stating the resolution here because neither repository states it, and an integrator who picks wrong loses a day.
0.4 The two services are not interchangeable
The most expensive mistake available here is installing a client for the wrong service. They share a brand and nothing else.
| Crux Daemon | CueCrux Engine | |
|---|---|---|
| What it is | A single Rust binary you run yourself | A hosted answer/ingest service |
| Default address | 127.0.0.1:14800 (config.rs:801) | https://engine.cuecrux.com |
| Primary nouns | facts, sessions, entities, segments | answers, corpora, artifacts, quality jobs |
| Error format | RFC 9457 Problem Details, application/problem+json | JSON body, shape varies by route |
| Auth | Authorization: Bearer, plus scope headers | X-API-Key or Authorization: Bearer |
| Client | @cuecrux/client, corecrux-client | @cuecrux/engine-client |
If your code calls storeFact, queryFacts or textSearch, you want the daemon. If it calls answers, qualityBoost or provenance, you want the Engine. Nothing in either client will tell you that you pointed it at the wrong one; you will get connection refusals or 404s.
0.5 What none of these SDKs do
Stated here once so no chapter has to disclaim it twice.
| Capability | State |
|---|---|
| Automatic retry or backoff | Not built in @cuecrux/client, corecrux-client or @cuecrux/memory. Only SDKCrux's FactoryClient retries. See chapter 4 |
| Connection pooling control, proxies, custom TLS | Not exposed. TypeScript uses global fetch; Python uses httpx defaults with a flat 30 s timeout |
| Reading a token from the environment | Not done by either Crux SDK. You pass the token explicitly. Only SDKCrux @cuecrux/memory reads env vars |
| Pagination helpers or async iterators | Not built. exportFacts returns a cursor you advance yourself |
| Authenticated SSE | Not possible via subscribeEvents, native EventSource cannot send headers (index.ts:222) |
| A generated client | Neither Crux SDK is generated. Both are hand-written, despite what the portal doc implies, see 6.10 |
| A stability guarantee | Both Crux SDKs are 0.x. Policy is that a minor may break while below 1.0 (sdk-release-lifecycle.md:27); neither README says so |
0.6 Chapter map
| Chapter | Mode | Covers |
|---|---|---|
| 1. TypeScript SDK | Reference | @cuecrux/client: every export, signature, type and thrown error |
| 2. Python SDK | Reference | corecrux-client: sync and async clients, dataclasses, the reproducibility gate |
| 3. Authentication | Reference | Tokens, env vars, scopes, and what 401, 403 and 503 each mean |
| 4. Errors and retries | Reference | The error model, which conditions recover, and what must never be retried |
| 5. SDKCrux packages | Reference | The complete SDKCrux inventory with published status |
| 6. Known issues | Reference | The dated defect register, with evidence and consequence per defect |
For the daemon's HTTP surface itself, routes, scopes, the extension model, see the Crux Daemon developer guide. This set documents the clients, not the server.
Sources
- docs/developer-portal.md:61, the canonicality statement
- docs/sdk-release-lifecycle.md:15, semver and tag-gating policy
- .github/workflows/sdk-typescript.yml:16, read-only default permissions
- .github/workflows/sdk-python.yml:43, build-twice-and-diff reproducibility gate
- sdks/typescript/CHANGELOG.md:3, 0.2.0, 2026-07-22
- SDKCrux/README.md:7, the conflicting claim
- Registry state (
npm view, PyPI JSON API) queried 2026-07-27; commits9fbc8ab(Cruxsdks/) and896cfc3(SDKCrux)

