feat(tools): pluggable prebuilt tools framework + Exa (5.8.0) - #92
Closed
abhishekmishragithub wants to merge 1 commit into
Closed
feat(tools): pluggable prebuilt tools framework + Exa (5.8.0)#92abhishekmishragithub wants to merge 1 commit into
abhishekmishragithub wants to merge 1 commit into
Conversation
Add smallestai.tools: a small registry of prebuilt tools that plug into a crew's ToolRegistry. Each tool wraps a third-party capability with a @function_tool-decorated run(), so registering is one line and the LLM can call it; run() is also directly callable for standalone use. - smallestai.tools.base.Tool: base with a register(registry) helper. - smallestai.tools.exa.ExaSearchTool: first integration (web search); lazy-imports exa-py and raises a clear "install smallestai[exa]" error otherwise; runs the sync client off the event loop. - list_tools()/get_tool(name) for discovery; third-party libs are optional extras only. Core deps unchanged. Version 5.8.0.
This was referenced Aug 6, 2026
Collaborator
Author
|
Superseded by the consolidated release PR release/5.10.0 (single review + single version bump). Branch kept. |
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.
What
smallestai.tools: a small, extensible framework for prebuilt tools that plug into a crew. Third-party libraries stay optional (extras, lazy-imported).The pattern
A tool wraps a capability with a
@function_tool-decoratedrun, so it drops straight into a crew:Standalone use works too:
results = await ExaSearchTool().run(query="..."). Discover withlist_tools()/get_tool("exa_search").Design
exa-pyis an extra (pip install "smallestai[exa]"), imported on first use; missing it gives a clear install error. Importingsmallestai.toolsnever pulls a third-party lib.Toolwith a@function_tool run+register(registry), so the crew's existing schema extraction + execution just work.ExaSearchTool.runruns the synchronous Exa client viaasyncio.to_thread.Checks
pytest tests/custom/test_tools_framework.py— 5 passed (registry, crew-plug, lazy missing-dep path).mypy src/smallestai/tools/— clean.Notes for review
Draft — merging bumps the version and auto-publishes. Hold for your review.