Skip to content

docs: update custom-memory-adapters.mdx for friendly imports + add_/has_ aliases#805

Merged
MervinPraison merged 1 commit into
mainfrom
claude/issue-803-20260623-0811
Jun 23, 2026
Merged

docs: update custom-memory-adapters.mdx for friendly imports + add_/has_ aliases#805
MervinPraison merged 1 commit into
mainfrom
claude/issue-803-20260623-0811

Conversation

@MervinPraison

Copy link
Copy Markdown
Owner

Summary

  • Migrates all deep imports to friendly top-level imports from praisonaiagents
  • Replaces register_memory_adapter calls with add_memory_adapter (canonical alias)
  • Adds Inspect the registry common pattern showing has_memory_adapter + list_memory_adapters
  • Updates lazy-loaded backend pattern to use add_memory_factory (with synonym callout)
  • Adds Registry API at a Glance table documenting all five registry functions
  • Adds Note callout explaining add_/register_ are synonyms
  • Adds missing memory adapter entries to praisonaiagents/init.py _LAZY_IMPORTS

Sanity check results (both printed ok)

python -c from praisonaiagents import register_memory_adapter, register_memory_factory, get_memory_adapter, list_memory_adapters ok
python -c from praisonaiagents import add_memory_adapter, add_memory_factory, has_memory_adapter ok

Fixes #803

Generated with Claude Code https://claude.ai/code

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-803-20260623-0811

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mintlify

mintlify Bot commented Jun 23, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
praisonai 🟢 Ready View Preview Jun 23, 2026, 8:17 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation and lazy imports in praisonaiagents/__init__.py to support the new memory adapter registry API, introducing canonical names like add_memory_adapter and add_memory_factory. The review feedback suggests importing these new functions from praisonaiagents.memory.adapters instead of praisonaiagents.memory.adapters.registry to maintain consistency with other memory-related registry functions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +337 to +338
'add_memory_adapter': ('praisonaiagents.memory.adapters.registry', 'add_memory_adapter'),
'add_memory_factory': ('praisonaiagents.memory.adapters.registry', 'add_memory_factory'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other memory adapter registry functions (such as register_memory_adapter, register_memory_factory, get_memory_adapter, list_memory_adapters, and has_memory_adapter), add_memory_adapter and add_memory_factory should be imported from praisonaiagents.memory.adapters instead of directly from praisonaiagents.memory.adapters.registry.

Suggested change
'add_memory_adapter': ('praisonaiagents.memory.adapters.registry', 'add_memory_adapter'),
'add_memory_factory': ('praisonaiagents.memory.adapters.registry', 'add_memory_factory'),
'add_memory_adapter': ('praisonaiagents.memory.adapters', 'add_memory_adapter'),
'add_memory_factory': ('praisonaiagents.memory.adapters', 'add_memory_factory'),

@MervinPraison MervinPraison marked this pull request as ready for review June 23, 2026 10:56
@MervinPraison MervinPraison merged commit 8b11aeb into main Jun 23, 2026
18 checks passed
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: update custom-memory-adapters.mdx for PR #2167 (friendly imports + new add_/has_ aliases)

1 participant