Keep load_skill tool bound; remove dynamic tool gating and refine active-skill handling#41
Open
weilixu wants to merge 1 commit intoskills_devfrom
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.
Motivation
self.graph.toolsat runtime and keep theload_skilltool bound to the agent at all times to simplify behavior and avoid errors whenself.graphlacks atoolsattribute.invokeand streaming flows.Description
_apply_active_skill_tool_gating()and any code paths that mutatedself.graph.tools, soload_skillremains statically available when skills are enabled.automa_ai/skills/active_skill.pywithActiveSkillState,ACTIVE_SKILL_HEADER, andformat_active_skill_message()to manage active-skill state and formatting._active_skill_state, injecting formatted active-skill system messages in_build_stream_inputs()ahead of retriever/memory context, and adding_capture_skill_tool_outputs()to mark skills loaded from tool responses.clear_active_skill()andrequest_clear_active_skill()helpers and adjustedinvoke/streamflows to build inputs using the active-skill injection and to captureload_skilltool outputs from both synchronous responses and streamingToolMessages.Testing
pytest automa_ai/agents/langgraph_chatagent_test.pyin this environment and test collection failed withModuleNotFoundError: No module named 'langchain_core', so automated tests could not be executed here.automa_ai/agents/langgraph_chatagent_test.pyto remove gating-related assertions and to verify active-skill injection, ordering, absence when unset, and capture ofload_skilloutputs, which should be exercised in a local environment wherelangchain_coreis available.Codex Task