docs: lead README with what the SDK does; fix install commands - #55
Merged
Merged
Conversation
Co-Authored-By: Paul Loeb <ploeb@launchdarkly.com>
tracisiebel
approved these changes
Aug 26, 2026
tracisiebel
pushed a commit
to launchdarkly/js-ai-sdk
that referenced
this pull request
Aug 27, 2026
## Summary The README opened with contributor material — a TOC starting at "Repository Layout" and a one-liner describing the repo as "A Node.js monorepo…". It now opens with what a developer gets from the SDK, a minimal `openaiMessages` call, and a "What you get" list; the repository tree moved to the bottom under `## Development`. - Intro rewritten: title → lead paragraph → runnable snippet → `## What you get` → TOC - `## Repository Layout` moved to the end of `## Development` as `### Repository layout` - `## Package Structure` → `## Packages`, tier sentence no longer leads with "monorepo", `### Handler Packages` → `### Pick your providers` - Fixed two broken TOC anchors: the body had two `#### 3f.` headings and labelled the `resolveGraph` section `3e.`, so those headings are renumbered to `3d.` and `3e.` to match the TOC Docs-only; install commands are unchanged here, since `@launchdarkly/ai-node` declares `@launchdarkly/node-server-sdk` as a hard dependency and the documented `npm install` genuinely works. The Python README needed an install fix — see launchdarkly/python-ai-sdk#55. <details> <summary>Implementation details</summary> Verified every TOC anchor in the file resolves against a heading after the move (GitHub slug rules: lowercase, strip punctuation, spaces → hyphens), including `#what-you-get`, `#packages`, and `#repository-layout`. The oddly formatted Quick Start sub-entries (e.g. `` - [3b. `config(args)](#3b-configargs)` `` with the trailing backtick outside the link) are left as-is — the anchors resolve, only the backtick placement is cosmetic. </details> Link to Devin session: https://app.devin.ai/sessions/dcb17f68bb444b0da0e445e406d9c37f Requested by: @ld-paul --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two independent things: a correctness fix to the documented install commands, and the same README restructure as launchdarkly/js-ai-sdk#37.
Install fix (the part that matters)
The documented
pip install launchdarkly-ai-python launchdarkly-ai-openai-messagesinstalls fine and then fails on the first call:The base Python SDK is an optional peer dependency, not bundled, so both install commands now include
launchdarkly-server-sdk. The accompanying sentence dropped the false "no extra setup required" claim, and two references to the unpublishedlaunchdarkly-aipackage name are corrected tolaunchdarkly-ai-python(Quick Start prose and the Core table row).Copy changes
openai_messagessnippet →## What you get→ TOC## Repository Layoutmoved to the end of## Developmentas### Repository layout## Package Structure→## Packages, tier sentence no longer leads with "monorepo",### Handler Packages→### Pick your providersFollow-up needed (docs site)
The published docs at https://launchdarkly.com/docs/sdk/ai/python still tell people to install
launchdarkly-ai-serverand claim it bundles the base Python SDK, which the package metadata does not support. A docs ticket is needed; Paul is filing it.Implementation details
Verified in two clean virtualenvs against the published packages (
launchdarkly-ai-python0.1.3,launchdarkly-ai-openai-messages0.1.4):await init_client()raises theRuntimeErrorabove.launchdarkly-server-sdk, resolved 9.16.1) →init_client()returns anLDClient, getting past the SDK import (it then logs the expected 401 for the dummyLD_SDK_KEY).Also confirmed every TOC anchor resolves after the move, including
#what-you-get,#packages, and#repository-layout.Link to Devin session: https://app.devin.ai/sessions/dcb17f68bb444b0da0e445e406d9c37f
Requested by: @ld-paul