Skip to content
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

[RFC] Dynamic tool support in agent framework #3202

Open
zane-neo opened this issue Nov 5, 2024 · 2 comments
Open

[RFC] Dynamic tool support in agent framework #3202

zane-neo opened this issue Nov 5, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@zane-neo
Copy link
Collaborator

zane-neo commented Nov 5, 2024

The current tool implementation has quite a few drawbacks and we can enhance this by supporting dynamic tools in agent framework, the implementation of it needs a little change in /agents/_register and /agents/execute API, more details can be found in this issue: opensearch-project/skills#459

@zane-neo zane-neo added enhancement New feature or request untriaged labels Nov 5, 2024
@mingshl
Copy link
Collaborator

mingshl commented Nov 5, 2024

can you explain more details in the changes in ml_commons @zane-neo ?

@mingshl mingshl removed the untriaged label Nov 5, 2024
@mingshl mingshl assigned mingshl and zane-neo and unassigned mingshl Nov 5, 2024
@mingshl mingshl moved this to Backlog in ml-commons projects Nov 5, 2024
@zane-neo
Copy link
Collaborator Author

zane-neo commented Nov 6, 2024

Sure, there are limited changes in ml-commons.
In agents/_register API:

  • MLToolSpec needs to add a new field private List<MLToolSpec> toolSpecList to support the new dynamical tool definition.
    In agents/_execute API:
  • The toolSpectList needs to be passed into the parameters map(tool interface run method arg) when running the tool.

I also have the plan to change ml-commons project structure and tool's interface to extract the MLToolSpec to a separate module so that it can be depended by ml-algorithms and spi modules to mitigate the seder effort between agent running and tool running, e.g. an object parameter might need to serialized to string to put it into Map<String, String> parameters and then deserialize it back to an object in tool's run method. This needs much more effort in both ml-commons and skills so this is a future plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants