feat: add shell skills, file-based instructions, and disable tracing#8
Merged
Conversation
- Load agent instructions from instructions.md instead of hardcoded DEFAULT_INSTRUCTIONS - Add ShellTool support with auto-discovered skills from skills/ directory - Gate shell skills behind SHELL_SKILLS_ENABLED environment variable - Reduce MAX_TURNS from 25 to 10 for consistency across bots - Disable OpenAI tracing with set_tracing_disabled(True) - Add instructions.md.example as template - Remove instructions field from servers_config.example.json - Update README with Agent Instructions, Shell Skills, and Docker sections
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.
Summary
instructions.mdfile instead of hardcodedDEFAULT_INSTRUCTIONS, with fail-fast behavior when file is missingShellToolsupport with auto-discovered skills fromskills/directory, gated behindSHELL_SKILLS_ENABLEDenvironment variableset_tracing_disabled(True)MAX_TURNSfrom 25 to 10 for consistency across all three bots (Telegram, Discord, Slack)Changes
bot/agent.pyDEFAULT_INSTRUCTIONSconstant_load_instructions()— readsinstructions.mdfrom working directory_parse_skill_description()— extracts description from SKILL.md YAML frontmatter_load_shell_skills()— auto-discovers skills underskills/directory_shell_executor()— async shell command runner with timeout supportOpenAIAgent.__init__to accepttoolsparameter, makeinstructionsrequired (no default)OpenAIAgent.from_dictto use file-based instructions and conditionally load shell skillsTests (
tests/test_agent.py)TestLoadShellSkills(9 tests) — env var gating, skill discovery, error handlingTestParseSkillDescription(8 tests) — frontmatter parsing edge casesTestShellExecutor(9 tests) — command execution, timeouts, error handlingTestInstructionsfor file-based loadingTestHistoryTruncationto assertMAX_TURNS == 10Documentation
instructions.md.exampletemplateinstructionsfield fromservers_config.example.json.gitignoreentry forinstructions.mdinstructions.md