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

Add mechanism for tool dependencies in AGS (installation, secrets) #4263

Open
2 tasks
Tracked by #4006
victordibia opened this issue Nov 18, 2024 · 4 comments
Open
2 tasks
Tracked by #4006
Assignees
Labels
proj-studio Related to AutoGen Studio.
Milestone

Comments

@victordibia
Copy link
Collaborator

victordibia commented Nov 18, 2024

AssistantAgent can take a list of tools.
These tools are typically python functions which themselves can have dependencies and secrets.
For example, a search tool might use a specific search library e.g. googlesearch and need a search api key.

In a no code environment, it is useful to have some mechanism to

  • install specified libraries and
  • load specified keys to make them available when the tool is called.

How

Create a ToolHelper class that is used with the component_factory in loading tools.

  • For each dependency, check if the dependency is installed (attempt to import)
  • If not installed, install it (or validate and provide some confirmation workflow where the user can agree to explicitly install)
  • load the tool

Challenges / Considerations

  • Tool calls get executed in the same environment as the application (AGS in this case).
    • UX should communicate this to the user
    • One assumption here is that the user designs/understands the tools they create and implicitly are comfortable with outcomes and side effects of their execution. The opposite of this is with a general purpose tool like code execution where arbitrary code with arbitrary side effects can be executed.
@victordibia victordibia changed the title Add mechanism for tool dependencies. Add mechanism for tool dependencies (installation, secrets) Nov 18, 2024
@victordibia victordibia added the proj-studio Related to AutoGen Studio. label Nov 18, 2024
@victordibia victordibia self-assigned this Nov 18, 2024
@victordibia victordibia added this to the 0.4.1 milestone Nov 18, 2024
@ekzhu
Copy link
Collaborator

ekzhu commented Nov 19, 2024

This can be helped by using distributed agent runtime. Agents don't have to be in the same application process. The agent that uses tools can be running from a separate machine.

We can make agentchat to run on distributed runtime.

@victordibia
Copy link
Collaborator Author

I agree that the challenge above can be helped by using a distributed runtime.
We will need to create a design doc/discussion around how to support distributed runtimes in AgentChat.

Beyond that, any other comments on the proposed implementation (I added a how section.) ?

@ekzhu
Copy link
Collaborator

ekzhu commented Nov 19, 2024

I am wondering if the dependencies & secret should be provided and resolved at start of a runtime in the backend rather than managed through some UI. It is very hard to secure the application environment against arbitrary code execution (i.e., user defined tools).

@victordibia
Copy link
Collaborator Author

I agree that end users should not be defining tools.
However - AGS is a developer tool. For debugging. Fair to assume similar exposure with e.g., a notebook?
My feeling is that it should be treated sort of like an IDE?
Open to thoughts here.

@victordibia victordibia changed the title Add mechanism for tool dependencies (installation, secrets) Add mechanism for tool dependencies in AGS (installation, secrets) Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proj-studio Related to AutoGen Studio.
Projects
None yet
Development

No branches or pull requests

2 participants