microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
34.65k stars 5.01k forks source link

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

Open victordibia opened 3 days ago

victordibia commented 3 days ago

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

How

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

Challenges / Considerations

ekzhu commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

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.