SKILLS_PATH - a search path for agent skills

I'm interested in answers to the question: how do we make it as easy as possible for users of a package (PyPI package, conda package, npm package, etc) to use the skills for that package? This post explains my best idea so far: an environment variable that specifies paths to search.

As a maintainer of a package (in my case scikit-learn or cuml) I'd like to create skills for users of the package. For example, a skill that helps you design and iterate on your machine learning pipeline. Users are already installing my package and already trust the package authors, so it feels natural to ship the files related to skills in that artifact. In an ideal world installing the package would be all that is needed for the user's agent to become aware of the skills.

In the Python world we use virtual environments, conda environments, etc to manage the dependencies for different projects/tasks. This means that what package is installed depends on which "environment" the user is currently using. A user might have different versions of the same package installed in different environments. This means copying skills to ~/.agents/skills at install time is not really an option.

A solution to this could be having an environment variable (e.g. SKILLS_PATH) that specifies search paths for skills. Similar to how PATH and LD_LIBRARY_PATH work. It would allow users to add additional directories beyond what is configured in a particular agent. Most importantly, when activating/deactivating an environment many tools give you the chance to modify environment variables. This means during activation the paths to installed packages with skills could be added to the SKILLS_PATH variable. When the environment is deactivated they get removed again.

There is a lot of discussion about how to ship skills and deal with versioning and trust. Most seem to propose using a new tool, I think the downside of using an additional tool is that the average user won't use it. The reason for that being that it is hard to discover and that it is an extra step to take. The tool/skills manager would also need to be quite clever to deal with the case of several versions of a package being installed/version depending on the current environment.

A search path is not perfect. For example it increases the number of directories an agent has to look at. How do you indicate that a directory is trusted? Setting up the logic in the environment activation/deactivation mechanism to cleanly add and remove directories can be a bit fiddly. But overall I haven't managed to think of a better idea.

This post started as a post on the agentskills repository.

Copyright © 2014-2021 - Tim Head