Open
Conversation
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.
Description of Change
Problem:
The agent currently lacks a standardized, modular way to extend its capabilities using file-based "skills" (collections of instructions, resources, and executable scripts). There is also no built-in mechanism to execute local scripts provided by these skills, which limits the agent's ability to perform specialized tasks defined in external skill repositories.
Solution:
I have implemented an experimental "Skill" feature . The changes include:
skillspackage): Defined the data structures forSkill,Frontmatter,Resources, andScriptto parse and validate skill directories.tool/skilltool): ImplementedSkillToolsetwhich exposes the following tools to the agent:list_skills: Discover available skills.load_skill: Read skill instructions (SKILL.md).load_skill_resource: Access auxiliary files (references, assets).run_skill_script: Execute scripts contained within a skill.code_executors): AddedUnsafeLocalCodeExecutorto support running Python and Bash scripts locally viaos/exec.examples/skill): Added amain.goexample demonstrating how to initialize an agent with theSkillToolsetand load skills from a directory.Testing Plan
Unit Tests:
tool/skilltool: Addedskill_toolset_test.gowhich tests all tool handlers (list_skills,load_skill, etc.) using mock skills.code_executors: Addedunsafe_local_code_executor_test.gowhich verifies script execution (Python/Bash), argument passing, and timeout handling.Manual End-to-End (E2E) Tests:
cd examples/skill.GOOGLE_API_KEYenvironment variable set.load_skillandrun_skill_script, and returns the correct result.Additional context
Add any other context or screenshots about the feature request here.
This feature is currently experimental. The
UnsafeLocalCodeExecutorexecutes code directly on the host machine and should be used with caution. Future improvements may include sandboxed execution environments.