guide: Agent memory and context for apps#184
Conversation
|
@rishi-raj-jain is attempting to deploy a commit to the Ankur 's projects Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdds a new MDX blog post at ChangesAgent Memory and Context Blog Post
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx`:
- Around line 33-35: The example rows contain non-printable separators and
escaped artifacts (e.g., the variables document, chunks, split_into_chunks,
embed, embeddings, vector_search) which break rendering and copy/paste; replace
those single-cell table rows with a fenced code block containing a clean,
unescaped snippet (preserve identifiers like document, split_into_chunks, embed,
vector_search and the suggested hybrid_search pseudocode) and remove hidden
control characters so the code renders and copies correctly; apply the same
conversion to the other listed locations (rows around lines containing similar
snippets) to ensure consistent, readable fenced code blocks instead of table
cells.
- Line 52: Update the copy for consistent hyphenation and grammar: replace
occurrences of "two stage" with "two-stage", "semi stable" with "semi-stable",
"first class" with "first-class", "long term" with "long-term", and "category
level" with "category-level", and change "emphasizes on filters" to "emphasizes
filters" wherever these appear (notably in the sentence about hybrid
search/reranking and the other flagged lines). Ensure all replacements are
applied consistently across the page content so punctuation and spacing remain
correct.
- Line 1: The file calls getMetadata(...) but that function is not defined or
imported in page.mdx, causing a runtime/compile error; add an import for
getMetadata from the module where it's implemented (or replace the call with a
plain metadata object) and ensure the exported const metadata = getMetadata(...)
in page.mdx references that imported symbol; search for the implementation
(e.g., a helper like getMetadata in your utils/ or lib/metadata) and import it
at the top of the MDX so the symbol is available.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 95c9f989-929e-459a-9a7d-8f5757d22591
📒 Files selected for processing (1)
src/app/blog/agent-memory-and-context-for-apps/page.mdx
There was a problem hiding this comment.
♻️ Duplicate comments (2)
src/app/blog/agent-memory-and-context-for-apps/page.mdx (2)
35-37:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winReplace single-cell table pseudocode blocks with fenced code blocks.
The pseudocode rows still contain non-printable separators/escaped artifacts (for example at Line 35), which hurts rendering and copy/paste quality. Convert these to fenced code blocks directly.
Suggested pattern
-| function hybrid\_search query ... | -| :---- | +```text +function hybrid_search(query): + keyword_results = keyword_search(query, corpus) + vector_results = vector_search(query, embedded_corpus) + combined = merge(keyword_results, vector_results) + ranked = rerank(combined, query) + return ranked +```Also applies to: 51-53, 60-62, 67-69, 72-74, 81-83, 86-88, 91-93, 96-98, 111-113, 118-120, 125-127, 132-134
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx` around lines 35 - 37, The pseudocode rows that define document, chunks, embeddings, query and results (variables: document, split_into_chunks, embed, vector_search) contain non-printable separators/escaped artifacts and are currently rendered as a single-cell table; replace each of these pseudocode table fragments with proper fenced code blocks (triple backticks) containing the raw code lines (document = """...""", chunks = split_into_chunks(...), embeddings = [embed(...)], query = "...", results = vector_search(...)) and remove any hidden/escaped characters (e.g., weird separators around the triple-quoted string and backslashes) so the code renders and copies cleanly; apply the same replacement pattern to the other similar snippets that use split_into_chunks/embed/vector_search or the hybrid_search example.
54-55:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winNormalize hyphenation and grammar for publication consistency.
Please apply consistent fixes such as
two-stage,semi-stable,long-term,first-class,category-level, and change “emphasizes on filters” to “emphasizes filters” (for example around Line 105).Also applies to: 70-71, 99-99, 103-106, 116-116, 130-130, 143-143, 151-151
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx` around lines 54 - 55, Normalize hyphenation and the one grammar fix across the MDX content: replace unhyphenated or inconsistent forms with the canonical hyphenated variants (`two-stage`, `semi-stable`, `long-term`, `first-class`, `category-level`) wherever they appear (notably near the occurrences referenced in the comment) and change the phrase `emphasizes on filters` to `emphasizes filters`; search for each literal string (e.g., `two stage`, `semi stable`, `long term`, `first class`, `category level`, and `emphasizes on filters`) and update them in the same file so publication style is consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx`:
- Around line 35-37: The pseudocode rows that define document, chunks,
embeddings, query and results (variables: document, split_into_chunks, embed,
vector_search) contain non-printable separators/escaped artifacts and are
currently rendered as a single-cell table; replace each of these pseudocode
table fragments with proper fenced code blocks (triple backticks) containing the
raw code lines (document = """...""", chunks = split_into_chunks(...),
embeddings = [embed(...)], query = "...", results = vector_search(...)) and
remove any hidden/escaped characters (e.g., weird separators around the
triple-quoted string and backslashes) so the code renders and copies cleanly;
apply the same replacement pattern to the other similar snippets that use
split_into_chunks/embed/vector_search or the hybrid_search example.
- Around line 54-55: Normalize hyphenation and the one grammar fix across the
MDX content: replace unhyphenated or inconsistent forms with the canonical
hyphenated variants (`two-stage`, `semi-stable`, `long-term`, `first-class`,
`category-level`) wherever they appear (notably near the occurrences referenced
in the comment) and change the phrase `emphasizes on filters` to `emphasizes
filters`; search for each literal string (e.g., `two stage`, `semi stable`,
`long term`, `first class`, `category level`, and `emphasizes on filters`) and
update them in the same file so publication style is consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7ef39ce4-f705-46e1-8f48-bf75f3d42830
📒 Files selected for processing (1)
src/app/blog/agent-memory-and-context-for-apps/page.mdx
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx`:
- Around line 9-13: The MDX page uses the BlogHeader component but never imports
or registers it, causing a runtime render error; fix by either adding a local
import for BlogHeader at the top of this MDX page (so the BlogHeader symbol is
defined before usage) or register BlogHeader in the MDX components map
(mdx-components.tsx) so the MDX renderer can resolve it—update whichever
location you choose to export the BlogHeader symbol and ensure the name matches
exactly ("BlogHeader") where it's used in page.mdx.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 19a7af1f-4122-4426-98b5-9774421f3255
📒 Files selected for processing (1)
src/app/blog/agent-memory-and-context-for-apps/page.mdx
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
src/app/blog/agent-memory-and-context-for-apps/page.mdx (1)
70-70:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix compound adjective hyphenation for publication quality.
Several compound adjectives throughout the post need hyphens for correct grammar. Line 70 uses "two stage" but should be "two-stage". Similar issues appear with "semi stable" (line 114), "first class" (lines 238, 287), "entity scoped" (lines 196, 198), "long term" (lines 313, 321), "category level" (line 313), and "simulation style" (line 192). These corrections improve readability and professionalism for published content.
✏️ Proposed fixes
-and it is often described as a two stage retrieval pattern where a fast +and it is often described as a two-stage retrieval pattern where a fastApply similar hyphenation fixes throughout:
- "semi stable" → "semi-stable" (line 114)
- "first class" → "first-class" (lines 238, 287)
- "entity scoped" → "entity-scoped" (lines 196, 198)
- "long term" → "long-term" (lines 313, 321)
- "category level" → "category-level" (line 313)
- "simulation style" → "simulation-style" (line 192)
As per static analysis hints: LanguageTool grammar check (QB_NEW_EN_HYPHEN).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx` at line 70, Replace unhyphenated compound adjectives with hyphenated forms for publication-quality grammar: change "two stage" to "two-stage", "semi stable" to "semi-stable", both instances of "first class" to "first-class", both instances of "entity scoped" to "entity-scoped", both instances of "long term" to "long-term", "category level" to "category-level", and "simulation style" to "simulation-style" in the article text so the compound modifiers are correctly hyphenated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx`:
- Line 198: In the paragraph that begins "Mem0 is best understood as a memory
layer..." remove the incorrect preposition by changing "emphasizes on filters
and entity scoped memory" to "emphasizes filters and entity scoped memory" so
the sentence reads correctly; locate the sentence in page.mdx (the line
containing "emphasizes on filters") and delete the word "on".
In `@src/app/blog/data.ts`:
- Around line 29-41: The new blog entry in the allBlogs array for slug
"agent-memory-and-context-for-apps" is missing the image property; add a cover
image file (e.g., src/app/blog/agent-memory-and-context-for-apps/cover.png),
import it at the top alongside other images, and add an image: <importedName>
property to the entry in the allBlogs array so the object for slug
"agent-memory-and-context-for-apps" matches the other entries and components
that expect an image field.
---
Duplicate comments:
In `@src/app/blog/agent-memory-and-context-for-apps/page.mdx`:
- Line 70: Replace unhyphenated compound adjectives with hyphenated forms for
publication-quality grammar: change "two stage" to "two-stage", "semi stable" to
"semi-stable", both instances of "first class" to "first-class", both instances
of "entity scoped" to "entity-scoped", both instances of "long term" to
"long-term", "category level" to "category-level", and "simulation style" to
"simulation-style" in the article text so the compound modifiers are correctly
hyphenated.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 05fa5abe-ca70-4edf-8684-3437d9a5340d
📒 Files selected for processing (2)
src/app/blog/agent-memory-and-context-for-apps/page.mdxsrc/app/blog/data.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@nirnejak can you add a cover image pls |
|
Would love for this to be live :) |
Summary by CodeRabbit