docs: fix Agent API architectural drift in home.mdx#217
docs: fix Agent API architectural drift in home.mdx#217MervinPraison wants to merge 1 commit intomainfrom
Conversation
- Fix memory example: move user_id into MemoryConfig instead of top-level Agent kwarg - Fix RAG example: consolidate knowledge sources into single knowledge= parameter - Remove invalid knowledge_sources= parameter that doesn't exist on Agent constructor - Add proper imports for MemoryConfig class - Ensure examples are copy-paste runnable and match actual SDK API 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Mervin Praison <454862+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. ✨ 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 documentation in docs/home.mdx to reflect changes in the Agent configuration, specifically introducing the MemoryConfig class for persistent memory and consolidating knowledge sources into a single list. A review comment identifies that the documentation example includes a URL as a knowledge source, which is currently unsupported by the SDK's implementation and could lead to confusion.
| knowledge_sources=[ # Or multiple sources | ||
| knowledge=[ # Multiple knowledge sources | ||
| "./docs/", | ||
| "https://example.com/api", |
There was a problem hiding this comment.
The example includes a URL as a knowledge source, but the current implementation of Agent._process_knowledge in praisonaiagents/agent/agent.py (lines 4403-4405) contains a pass statement for URLs, meaning they are currently ignored during knowledge processing. Additionally, Knowledge.add (line 451) raises a NotImplementedError for URLs. To ensure the example is fully functional and matches the current SDK capabilities as stated in the PR description, consider using only local file paths for now.
Summary
Fixes architectural drift between
docs/home.mdxcode examples and actual PraisonAI Agent constructor API.user_idparameter intoMemoryConfiginstead of invalid top-level Agent kwargknowledge=parameter, removed non-existentknowledge_sources=parameterMemoryConfigclassChanges
Memory Example (Lines 96-106)
Before: Invalid
user_idas top-level Agent parameterAfter: Proper nested configuration
RAG Example (Lines 112-123)
Before: Conflicting parameters
After: Consolidated single parameter
Test Plan
user_idandsession_idare defined inMemoryConfigclass (praisonaiagents/config/feature_configs.py:191-193)knowledge_sourcesparameter does not exist on Agent constructorknowledge=as list of sourcesFixes #205
🤖 Generated with Claude Code