feat: add MelleaTool.from_smolagents() for smolagents integration#430
Merged
ajbozarth merged 7 commits intogenerative-computing:mainfrom Feb 10, 2026
Merged
Conversation
Implements loading of HuggingFace smolagents tools into Mellea's tool system. - Add from_huggingface() classmethod to MelleaTool - Uses smolagents' get_tool_json_schema() for OpenAI-compatible conversion - Wraps smolagents Tool.forward() method with proper error handling - Add smolagents as optional dependency in pyproject.toml - Update .gitignore to exclude AI agent config directories Related to generative-computing#411 Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
Contributor
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Add comprehensive unit tests for the HuggingFace smolagents integration: - test_from_huggingface_basic: Tests basic tool loading and schema conversion - test_from_huggingface_multiple_inputs: Tests tools with multiple parameters - test_from_huggingface_invalid_tool: Tests error handling for invalid objects Tests follow existing patterns with try/except ImportError for graceful handling when smolagents is not installed. Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
- Add smolagents_example.py demonstrating MelleaTool.from_huggingface() - Update tools/README.md with smolagents example documentation - Add smolagents installation instructions to main README.md Related: generative-computing#411 Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
planetf1
reviewed
Feb 10, 2026
jakelorocco
requested changes
Feb 10, 2026
Contributor
jakelorocco
left a comment
There was a problem hiding this comment.
thank you! looks good to me; just one note on packages
planetf1
reviewed
Feb 10, 2026
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
jakelorocco
approved these changes
Feb 10, 2026
psschwei
reviewed
Feb 10, 2026
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
Contributor
Author
|
IIUC the following items are the remaining review and take-aways:
|
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
Contributor
Author
|
I've addressed all current review and opened #453 for follow up work around |
jakelorocco
approved these changes
Feb 10, 2026
Merged
via the queue into
generative-computing:main
with commit Feb 10, 2026
0471006
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Misc PR
Type of PR
Description
Adds support for using HuggingFace smolagents tools with Mellea, enabling seamless integration with the smolagents ecosystem.
Testing