Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add local built-in agent support (#22)
* Fix 'NoneType' Object Error in Tool Loading ## What Changed 1. **Local Tool Loading**: Added logic to check and load tools from the local directory first. 2. **Fixed NoneType Error**: Resolved the issue where the version was `None`, causing a `'NoneType' object has no attribute 'replace'` error. 3. **Improved Error Messages**: Enhanced error messages for better clarity and debugging. ## How It Works Now - **Local First**: The system first checks the local tools folder. - **Use Local Tool**: If a tool is found locally, it uses that version. - **Remote Fallback**: If not found locally, it downloads the tool. - **Version Handling**: Retrieves version from local `config.json` to ensure correct versioning. ## Testing - Tested with `math_agent` using local `wikipedia` tool. - Tested with `story_teller` agent. - Confirmed no NoneType errors occur. * Fix 'NoneType' Object Error in Tool Loading ## What Changed 1. **Local Tool Loading**: Added logic to check and load tools from the local directory first. 2. **Fixed NoneType Error**: Resolved the issue where the version was `None`, causing a `'NoneType' object has no attribute 'replace'` error. 3. **Improved Error Messages**: Enhanced error messages for better clarity and debugging. ## How It Works Now - **Local First**: The system first checks the local tools folder. - **Use Local Tool**: If a tool is found locally, it uses that version. - **Remote Fallback**: If not found locally, it downloads the tool. - **Version Handling**: Retrieves version from local `config.json` to ensure correct versioning. * Fix 'NoneType' Object Error in Tool Loading ## What Changed 1. **Local Tool Loading**: Added logic to check and load tools from the local directory first. 2. **Fixed NoneType Error**: Resolved the issue where the version was `None`, causing a `'NoneType' object has no attribute 'replace'` error. 3. **Improved Error Messages**: Enhanced error messages for better clarity and debugging. ## How It Works Now - **Local First**: The system first checks the local tools folder. - **Use Local Tool**: If a tool is found locally, it uses that version. - **Remote Fallback**: If not found locally, it downloads the tool. - **Version Handling**: Retrieves version from local `config.json` to ensure correct versioning. * Fix 'NoneType' Object Error in Tool Loading ## What Changed 1. **Local Tool Loading**: Added logic to check and load tools from the local directory first. 2. **Fixed NoneType Error**: Resolved the issue where the version was `None`, causing a `'NoneType' object has no attribute 'replace'` error. 3. **Improved Error Messages**: Enhanced error messages for better clarity and debugging. ## How It Works Now - **Local First**: The system first checks the local tools folder. - **Use Local Tool**: If a tool is found locally, it uses that version. - **Remote Fallback**: If not found locally, it downloads the tool. - **Version Handling**: Retrieves version from local `config.json` to ensure correct versioning. * Fix * Create python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * fix: improve agent loading and error handling - Add debug logs to track agent loading - Fix config handling in agent manager - Update seeact_demo_agent config format The code now: - Shows better error messages - Loads agents more reliably - Keeps full config when packaging" * Add Local Agent Support to run-agent ## What's Changed - Added `--local_agent` flag to support loading agents from local filesystem - Added path validation for local agent loading - Simplified agent execution logic * Refactor Configuration Management for URLs This PR refactors the configuration management for Cerebrum by moving the URLs for the Agent and Tool Managers into a centralized configuration file (default.yaml). This change allows for easier management and customization of these URLs across different environments. Changes: Added agent_hub_url and tool_hub_url to default.yaml. 2. Updated AutoAgent and AutoTool classes to use URLs from the configuration file. * Revert "Add Local Agent Support to run-agent" This reverts commit 1324ed1. * Reapply "Add Local Agent Support to run-agent" * Revert "Refactor Configuration Management for URLs" This reverts commit 53fd503. * Update run_agent.py * Update run_agent.py * fix: LLM API Key Error Handling ## What's Changed - Added proper error handling for invalid API keys - Fixed response parsing for LiteLLM completion calls - Added HTTP status codes for different error types: - 402 for API key issues - 500 for other errors * Update * fix: add local built-in agent support ## What Changed 1. Added `_get_builtin_agent_path` method to find local built-in agents 2. Added dependency check for local built-in agents 3. Fixed agent loading flow for local built-in examples
- Loading branch information