This repository was archived by the owner on Nov 12, 2026. It is now read-only.
Repository navigation
Add skill loading support to generic agent - #279
Merged
Merged
Conversation
This commit introduces comprehensive skill loading functionality to the generic agent: Core Features: - Added SKILL_FOLDERS configuration to load custom skills from specified directories - Implemented load_skills_content() function to read skill files (SKILL.md, *.py, *.md) - Enhanced system prompt to include loaded skill descriptions and capabilities - Updated agent card to display available skills alongside MCP servers Error Handling: - Graceful degradation when MCP servers are unavailable - Warning messages instead of failures for missing skill folders - Continues operation with partial skill loading if some skills fail Testing: - Added comprehensive test suite in tests/ directory - Includes test_skill_loading.py for full integration tests - Includes test_skill_loading_simple.py for basic functionality tests - Added run_skill_test.sh script for easy test execution - Created tests/README.md with testing documentation Documentation: - Updated README.md with skill loading information - Added testing section with quick start guide - Documented SKILL_FOLDERS environment variable Code Quality: - Fixed trailing whitespace and newline issues in multiple files - Added proper logging throughout skill loading process - Improved error messages for better debugging Signed-off-by: Eran Raichstein <[email protected]>
eranra
force-pushed
the
feature/add-skill-loading-support
branch
from
April 29, 2026 15:28
ef6dd6a to
b54ca35
Compare
1 task done
pdettori
suggested changes
Apr 30, 2026
pdettori
left a comment
Member
There was a problem hiding this comment.
Review Summary
The core concept of skill loading (reading files from configurable folders into the LLM system prompt) is reasonable and the code structure is clean. However, there are two must-fix issues: a dead try/except in get_mcpclient() and a broken relative import in the summarizer scripts.
Areas reviewed: Python, Shell, Dockerfile, Docs
Commits: 1 commit, signed-off: yes
CI status: passing (DCO)
- Remove @lru_cache from get_mcpclient() to allow retry on transient failures - Add 100KB content size limit to prevent ConfigMap and context window issues - Add size tracking and warnings when limits are exceeded - Simplify MCP client configuration (remove unnecessary try-catch) - Fix test script to use correct test file (manual_test_skill_loading.py) - Improve shell script error handling with set -euo pipefail - Fix relative import in summarizer skill These changes address PR review feedback and improve the reliability of skill loading in production environments. Signed-off-by: Eran Raichstein <[email protected]>
Contributor
Author
|
@pdettori thanks for the quick review and comments. I fixed and pushed an updated version of the PR for you review ^^^^ |
Contributor
Author
|
FYI: @pavelanni |
Signed-off-by: Eran Raichstein <[email protected]>
Contributor
Author
|
@pdettori can you review |
pdettori
approved these changes
May 6, 2026
pdettori
left a comment
Member
There was a problem hiding this comment.
All review comments from the initial review have been addressed in efd25f8:
- Dead try/except removed
- 100KB size limit added to skill loading with warning logs
- Broken absolute import fixed (now relative)
- Manual test properly named (
manual_test_skill_loading.py) - Shell script uses
set -euo pipefail @lru_cacheremoved to allow retry on transient failures
CI is green. LGTM.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #278
Summary
This PR implements comprehensive skill loading functionality for the generic agent, enabling it to dynamically load and utilize custom skills from configurable folder paths.
Changes
Core Features
load_skills_content()function to read skill files (SKILL.md, *.py, *.md) from configured directoriesSKILL_FOLDERSenvironment variable for specifying skill folder paths (default:/app/skills/)Error Handling & Resilience
Testing Infrastructure
a2a/generic_agent/tests/test_skill_loading.py: Full integration tests with mock skillstest_skill_loading_simple.py: Basic functionality testsrun_skill_test.sh: Convenient test execution scripttests/README.md: Comprehensive testing documentationDocumentation
SKILL_FOLDERSenvironment variableCode Quality
Testing
The changes have been tested with:
To run tests:
cd a2a/generic_agent/tests ./run_skill_test.shDesign Decisions
Breaking Changes
None. This is a backward-compatible addition that doesn't affect existing functionality.
Signed-off-by: Eran Raichstein [email protected]