add fetch_url tool to CMSCompOpsAgent#502
Draft
harz05 wants to merge 1 commit intoarchi-physics:mainfrom
Draft
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.
Summary
Closes #451.
As noted by @lucalavezzo in #451, @hassan11196 already implemented an HTTP GET tool as part of the larger sandboxing feature in #433. This PR extracts just the
fetch_urltool from that work and merges it independently, so the agent can fetch live URLs without needing the full Docker sandbox infrastructure.The implementation is adapted from the
http_get.pyintroduced in #433, refactored to match the existing tool factory pattern (create_fetch_url_tool) and wired intoCMSCompOpsAgentcleanly.Changes
src/archi/pipelines/agents/tools/fetch_url.pycreate_fetch_url_tool()factorysrc/archi/pipelines/agents/tools/__init__.pycreate_fetch_url_toolsrc/archi/pipelines/agents/cms_comp_ops_agent.pyfetch_urlin_tool_definitions()+_build_fetch_url_tool()builderexamples/agents/cms-comp-ops.mdfetch_urlto the agent spec tools listHow it works
create_fetch_url_tool()follows the same pattern as other tools in the codebase (create_retriever_tool,create_file_search_tool, etc.)requests(already a project dependency, no new deps)http://andhttps://schemes acceptedmax_response_chars(default 40 000) to avoid context window overflowtools:http_getenforced via@require_tool_permission(setrequired_permission=Noneto disable)store_tool_inputcallback supported for tracingUsage
Enable via agent spec: