Skip to content

docs: fix parameter-resolution.mdx memory examples (fixes #203)#218

Open
MervinPraison wants to merge 1 commit intomainfrom
claude/issue-203-20260422-0445
Open

docs: fix parameter-resolution.mdx memory examples (fixes #203)#218
MervinPraison wants to merge 1 commit intomainfrom
claude/issue-203-20260422-0445

Conversation

@MervinPraison
Copy link
Copy Markdown
Owner

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

  • Fixed array example: Replaced memory array with correct single-item patterns
  • Fixed dict example: Changed provider/port keys to backend/config structure
  • Fixed config example: Updated MemoryConfig to use correct backend and config fields
  • Updated table: Changed memory array column to reflect ArrayMode.SINGLE_OR_LIST behavior
  • Added explanatory note: Clarified memory parameter array limitations with correct alternatives

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

- 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>
Copilot AI review requested due to automatic review settings April 22, 2026 04:48
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@MervinPraison has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 40 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 338c77d2-2b33-4c69-ba0c-c9daebec43e4

📥 Commits

Reviewing files that changed from the base of the PR and between 95ceda2 and 2de4670.

📒 Files selected for processing (1)
  • docs/reference/parameter-resolution.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-203-20260422-0445

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 and usage tips.

Copy link
Copy Markdown

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

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 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.

Comment on lines +21 to +22
| 3 | **Dict** | `memory={"backend": "redis"}` | Config shorthand (strict validation) |
| 4 | **Array** | `knowledge=["docs/", "data.pdf"]` | Multiple sources (feature-specific) |
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

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) |

Comment on lines +47 to +48
# 4. String URL - Direct connection string
agent = Agent(instructions="...", memory="redis://localhost:6379")
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

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"])

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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] Architectural mismatch: parameter-resolution.mdx memory progression vs Agent resolver

2 participants