Repository navigation
DOC-7121 Consolidate agent-memory Python/TypeScript SDK quickstarts into one TCE page - #4149
Open
andy-stark-redis wants to merge 1 commit into
Open
andy-stark-redis wants to merge 1 commit into
andy-stark-redis wants to merge 1 commit into
Conversation
…nto one TCE page
The Python and TypeScript agent-memory quickstarts were near-duplicate prose
with only the code fences differing. Merged them into one page
(sdk-quickstart.md) using the clients-example tabbed system, with two new
pseudo-client keys ("Agent Memory (Python)"/"Agent Memory (TypeScript)")
instead of reusing the real Python/Node.js client keys, so the tabs don't
misattribute to redis-py/node-redis.
Two build-script gaps surfaced adding the TypeScript source file:
build/local_examples.py's EXTENSION_TO_LANGUAGE had no .ts entry at all, and
build/components/example.py's PREFIXES dict had no 'typescript' comment style
either — no .ts file has ever existed under local_examples/ before this.
Both needed fixing together or the .ts source silently fails (first as an
"unknown extension" skip, then as a None-content crash further down the
pipeline once the language is recognized but has no comment prefix).
Modeled the footer-hiding on langcache_sdk's page, but its show_footer="false"
parameter turned out to be dead code — clients-example.html only ever checks
footer="hide" (confirmed back to the commit that introduced it). langcache's
live page is therefore not hiding what it thinks it's hiding. Used the
parameter that actually works here; did not fix langcache's page (out of
scope for this ticket).
The tab's visible title is literally the config.toml client key string (only
"Node.js"/"ioredis" get a hardcoded display-name override), so the new keys
had to be chosen to read well as tab labels directly, not as short internal
IDs.
Each clients-example step had to become a fully self-contained snippet
(imports + client construction repeated per step) rather than the "keep
editing one growing file" narrative the original two pages used, because the
shortcode slices only the exact STEP_START/STEP_END range with nothing
prepended.
Learned: .ts support needs EXTENSION_TO_LANGUAGE and PREFIXES kept in sync; langcache_sdk's show_footer param is dead code
Constraint: a clients-example tab's display name is its config.toml key verbatim (no Node.js/ioredis-style override exists for new keys)
Rejected: show_footer="false" | dead parameter in clients-example.html, only footer="hide" is read
Directive: don't add another .ts-based local example without confirming EXTENSION_TO_LANGUAGE (build/local_examples.py) and PREFIXES (build/components/example.py) both still list it
Gaps: agent_memory_sdk.py/.ts are hand-written, not harness-verified — no confirmed access to a running Agent Memory backend
Ticket: DOC-7121
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Contributor
Contributor
Collaborator
|
Hi Andy thanks for working on this, Andrew has a draft PR that also include curl here: #4001 if you can take a look at it as well, we should combine your additions with his. |
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.
The two existing pages were very similar aside from code snippets, so I thought using our usual tabbed approach might work well here.
Summary
python-sdk-quickstart.mdandtypescript-sdk-quickstart.md(near-duplicate prose) into a singlesdk-quickstart.md, using the standardclients-exampletabbed code system.Agent Memory (Python)andAgent Memory (TypeScript)(config.toml +build/local_examples.pypath overrides), rather than reusing the realPython/Node.jsclient keys — reuse would attribute the tabs toredis-py/node-redisin the tab footer and JSON feed identity.aliases:on the new page. Cross-links in_index.md,developer-guide.md, andrest-api-quickstart.mdare repointed.Notes for reviewers
.tshad no build support at all before this:build/local_examples.py'sEXTENSION_TO_LANGUAGEandbuild/components/example.py'sPREFIXESdict both needed atypescriptentry.local_examples/agent-memory/agent_memory_sdk.{py,ts}) are hand-written and reviewed, not harness-verified — there's no confirmed access to a running Agent Memory backend to test against.langcache_sdk's page, found that itsshow_footer="false"parameter is dead code inclients-example.html(onlyfooter="hide"is ever read), so that page's footer/quickstart-link is likely still rendering despite the intent. Usedfooter="hide"here; did not touch the langcache page._index.mdagainst a since-merged redesign (tile-card grid with a new "Overview" tile) by folding the Python/TypeScript tiles into one "SDK quickstart" tile.Test plan
hugo --gcbuild: zero warnings/errors.clientId/clientNamein rendered HTML areagent-memory-python/agent-memory-typescript, notredis-py/node-redis.python-sdk-quickstart,typescript-sdk-quickstart) redirect to the new page via generated alias stubs._index.mdtile grid (Overview / SDK quickstart / REST API) renders correctly after conflict resolution.🤖 Generated with Claude Code
Note
Low Risk
Documentation and docs-build configuration only; no runtime product code. Residual risk is unverified example snippets against a live Agent Memory service.
Overview
Merges the separate Python and TypeScript Agent Memory SDK quickstarts into a single
sdk-quickstart.md, with shared prose andclients-exampletabs backed by newlocal_examples/agent-memory/agent_memory_sdk.{py,ts}step files. Inline code blocks are removed in favor of the standard TCE pipeline;footer="hide"avoids generic redis-py/node-redis footers.Adds TypeScript to the examples build (
.ts→typescript,//comment prefix) and registers dedicatedAgent Memory (Python)/Agent Memory (TypeScript)client keys inconfig.tomlandbuild/local_examples.py(path-based overrides underagent-memory). The standalonetypescript-sdk-quickstart.mdis dropped;aliaseson the new page preserve the old Python/TypeScript URLs. Hub pages (_index.md, developer guide, REST quickstart) now point at one SDK quickstart and use a single SDK tile in the navigation grids.Reviewed by Cursor Bugbot for commit 9650c36. Bugbot is set up for automated code reviews on this repo. Configure here.