docs: fix parameter-resolution.mdx memory examples (fixes #203)#218
docs: fix parameter-resolution.mdx memory examples (fixes #203)#218MervinPraison wants to merge 1 commit intomainfrom
Conversation
- Replace broken memory array examples with correct patterns - Update MemoryConfig to use backend instead of provider - Fix dict examples to use proper MemoryConfig fields - Add note explaining memory parameter's SINGLE_OR_LIST limitation - Update table to reflect actual memory array behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Mervin Praison <MervinPraison@users.noreply.github.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 40 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Code Review
This pull request updates the parameter resolution documentation to reflect the new backend and config structure for memory settings and clarifies that the memory parameter only supports single-item arrays. The review feedback points out a priority error in the resolution table and suggests using a single-item array example to maintain the documentation's narrative flow.
| | 3 | **Dict** | `memory={"backend": "redis"}` | Config shorthand (strict validation) | | ||
| | 4 | **Array** | `knowledge=["docs/", "data.pdf"]` | Multiple sources (feature-specific) | |
There was a problem hiding this comment.
The resolution order table incorrectly lists Dict (Priority 3) as having higher precedence than Array (Priority 4). According to the implementation in praisonaiagents/config/param_resolver.py (lines 95-110), arrays are resolved before dictionaries. To maintain accuracy, the order of these two rows should be swapped.
| 3 | **Array** | `knowledge=["docs/", "data.pdf"]` | Multiple sources (feature-specific) |
| 4 | **Dict** | `memory={"backend": "redis"}` | Config shorthand (strict validation) |
| # 4. String URL - Direct connection string | ||
| agent = Agent(instructions="...", memory="redis://localhost:6379") |
There was a problem hiding this comment.
The user-friendly progression defined on line 32 is Bool → String → Array → Dict → Config → Instance. By changing step 4 from an Array example to another String example, the numbered list no longer aligns with the conceptual progression. Since the memory parameter supports single-item arrays (as noted on line 65), it is better to use a single-item array here to maintain the narrative flow of the documentation.
# 4. Array - Single-item list (feature-specific)
agent = Agent(instructions="...", memory=["redis://localhost:6379"])
Fixes the architectural mismatch between parameter-resolution.mdx and the actual Agent memory resolver implementation.
Summary
Fixed broken examples #4-6 in the memory progression section that were failing with TypeError when executed against the current SDK.
Changes
Validation
✅ All examples now use valid MemoryConfig fields (backend, config, user_id, etc.)
✅ Array patterns match ArrayMode.SINGLE_OR_LIST behavior from agent.py:1100
✅ Dict examples pass strict validation in param_resolver.py
Fixes #203
🤖 Generated with Claude Code