-
Notifications
You must be signed in to change notification settings - Fork 4
feat(knowledgebase): add knowledgebase adk capability #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive knowledge base (KB) capability to the AgentRun SDK, supporting both Bailian and RagFlow providers. The feature enables knowledge base management (CRUD operations) and retrieval functionality, with seamless integration across multiple AI frameworks.
Changes:
- Added complete knowledge base module with support for Bailian and RagFlow providers
- Integrated KB retrieval as toolsets for LangChain, LangGraph, CrewAI, PydanticAI, Google ADK, and AgentScope
- Updated SDK version from 0.0.9 to 0.0.10 and bumped dependency versions
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Version bump to 0.0.10, added bailian SDK dependency and knowledgebase extras |
| agentrun/utils/config.py | Added bailian_endpoint configuration support |
| agentrun/utils/control_api.py | Added _get_bailian_client method for Bailian API access |
| agentrun/utils/data_api.py | Added KnowledgeBase resource type |
| agentrun/knowledgebase/* | Core KB module with models, client, APIs, and resource management |
| agentrun/integration/*/builtin.py | Added knowledgebase_toolset functions for all frameworks |
| examples/*.py | Added comprehensive KB examples and updated quick_start with KB integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # 返回结果 / Return result | ||
| data = result.get("data", {}) | ||
|
|
||
| if data == False: |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using == False is not the recommended way to check for falsy values in Python. This comparison will only match the exact boolean value False, but not other falsy values like empty strings, None, 0, etc. Use if not data: or if data is False: depending on whether you want to check for any falsy value or specifically False.
| if data == False: | |
| if data is False: |
| # 返回结果 / Return result | ||
| data = result.get("data", {}) | ||
|
|
||
| if data == False: |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using == False is not the recommended way to check for falsy values in Python. This comparison will only match the exact boolean value False, but not other falsy values. Use if not data: or if data is False: depending on the intent.
| if data == False: | |
| if data is False: |
| # 返回结果 / Return result | ||
| data = result.get("data", {}) | ||
|
|
||
| if data == False: |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using == False is not the recommended way to check for falsy values in Python. Use if not data: or if data is False: depending on the intent.
| if data == False: | |
| if data is False: |
|
|
||
| try: | ||
| client = self._get_client(config) | ||
| response = await client.update_knowledgebase_with_options_async( |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The async method name is incorrect. It should be update_knowledge_base_with_options_async instead of update_knowledgebase_with_options_async (missing underscore). This typo will cause the async update functionality to fail.
| response = await client.update_knowledgebase_with_options_async( | |
| response = await client.update_knowledge_base_with_options_async( |
c5aa1eb to
5c7999f
Compare
Change-Id: I7787c114a02f37e76a0a5dd97f1c0f005e17760c Co-developed-by: Aone Copilot <[email protected]> Signed-off-by: Sodawyx <[email protected]>
5c7999f to
ded443f
Compare
Change-Id: I40733b161d8ab1333cc83cfdbb5f32e6e2ff2638
Co-developed-by: Aone Copilot [email protected]
Fix bugs
Bug detail
Pull request tasks
Update docs
Reason for update
Pull request tasks
Add contributor
Contributed content
Content detail
Others
Reason for update