Skip to content

DOC-7121 Consolidate agent-memory Python/TypeScript SDK quickstarts into one TCE page - #4149

Open
andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-7121-agent-memory-sdk-tce
Open

andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-7121-agent-memory-sdk-tce

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

The two existing pages were very similar aside from code snippets, so I thought using our usual tabbed approach might work well here.

Summary

  • Consolidates python-sdk-quickstart.md and typescript-sdk-quickstart.md (near-duplicate prose) into a single sdk-quickstart.md, using the standard clients-example tabbed code system.
  • Adds two new pseudo-client keys, Agent Memory (Python) and Agent Memory (TypeScript) (config.toml + build/local_examples.py path overrides), rather than reusing the real Python/Node.js client keys — reuse would attribute the tabs to redis-py/node-redis in the tab footer and JSON feed identity.
  • Old page URLs redirect via aliases: on the new page. Cross-links in _index.md, developer-guide.md, and rest-api-quickstart.md are repointed.

Notes for reviewers

  • .ts had no build support at all before this: build/local_examples.py's EXTENSION_TO_LANGUAGE and build/components/example.py's PREFIXES dict both needed a typescript entry.
  • These examples (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.
  • Heads-up, unrelated to this PR: while modeling the footer-hiding on langcache_sdk's page, found that its show_footer="false" parameter is dead code in clients-example.html (only footer="hide" is ever read), so that page's footer/quickstart-link is likely still rendering despite the intent. Used footer="hide" here; did not touch the langcache page.
  • Resolved a merge conflict in _index.md against 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

  • Clean local hugo --gc build: zero warnings/errors.
  • Rendered page shows both tabs titled "Agent Memory (Python)"/"Agent Memory (TypeScript)", no footer/quickstart-link.
  • Confirmed clientId/clientName in rendered HTML are agent-memory-python/agent-memory-typescript, not redis-py/node-redis.
  • Both old URLs (python-sdk-quickstart, typescript-sdk-quickstart) redirect to the new page via generated alias stubs.
  • _index.md tile grid (Overview / SDK quickstart / REST API) renders correctly after conflict resolution.
  • Someone with SDK access should sanity-check the example code against a real Agent Memory service before/after merge.

🤖 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 and clients-example tabs backed by new local_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 dedicated Agent Memory (Python) / Agent Memory (TypeScript) client keys in config.toml and build/local_examples.py (path-based overrides under agent-memory). The standalone typescript-sdk-quickstart.md is dropped; aliases on 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.

…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>
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7121

@andy-stark-redis andy-stark-redis self-assigned this Sep 29, 2026
@andy-stark-redis andy-stark-redis added the iris Iris context engine docs label Sep 29, 2026
@mich-elle-luna

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iris Iris context engine docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants