feat(web): landing Memory Playground + ?format=markdown API#31
Merged
Conversation
Add an instant, zero-auth "memory context API" playground to the landing page (recall · ask · knowledge · remember) with live calls to the public Worker, Markdown/JSON response tabs, and copy-as-curl / TS / Python snippets pinned to the public origin so copied requests run anywhere. Add ?format=markdown (alias ?format=md) to /api/memwal/recall, /chat, and /facts/:ns so agents can consume recall hits, grounded answers, and namespace knowledge as Markdown directly instead of parsing the JSON envelope. Query-param keyed only (no Accept-header Vary), so cached facts responses can't be poisoned across formats. Default JSON behavior is unchanged when the param is absent.
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.
What
A Firecrawl / context.dev-style Memory Playground on the landing page, plus a small backend addition so the memory API can return Markdown directly.
Frontend —
apps/webBackend —
apps/api/src/worker.ts?format=markdown(alias?format=md) onPOST /api/memwal/recall,POST /api/memwal/chat, andGET /api/memwal/facts/:ns.Accept-headerVary), so cached facts responses can't be poisoned across formats. Default JSON behavior is unchanged when the param is absent.Verification
bun run typecheck— clean across all 7 workspaces.wrangler deploy --dry-run— 3.8 MB bundle (no jsdom leak), all new symbols present.localhostbaked into the bundle.Deliberately out of scope
The write path (
remember) is gated to a CTA, not wired — recall reads from the MemWal relayer while a write would Seal-encrypt to Harbor (different backends, no round-trip), and the only recallable write needs a 64-char delegate. Left for a follow-up that reconciles the read/write backend split.