Skip to content

feat: Built-in fetch tool#399

Draft
andrii-novikov wants to merge 5 commits into
developmentfrom
feat/344-web-fetch-tool
Draft

feat: Built-in fetch tool#399
andrii-novikov wants to merge 5 commits into
developmentfrom
feat/344-web-fetch-tool

Conversation

@andrii-novikov

Copy link
Copy Markdown
Collaborator

Applicable issues

Description of changes

Adds the design doc for a built-in web fetch capability, split after review into two dedicated internal tools:

  • internal_web_fetch — loads a text resource inline (internal_tooling module), gated by features.web_fetch.enabled, with a configurable max_inline_size.
  • internal_file_download — persists any resource into the agent-home workspace via the existing file-family write path, gated by features.dial_files.enabled_tools.

Both tools are feature-gated and preview-gated, and reuse ExternalUrlFetcher plus the existing two-tier external-egress policy — independent of the large-tool-response offload processor. Status: Approved.

Checklist

  • Title of the pull request follows Conventional Commits specification
  • Design documented is updated/created and approved by the team (if applicable)
  • Documentation is updated/created (if applicable)
  • Changes are tested on review environment
  • App schema changes are backward compatible, or breaking changes are documented with a migration guide
  • Integration tests pass

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@andrii-novikov andrii-novikov self-assigned this Jul 2, 2026
@andrii-novikov andrii-novikov changed the title docs: revise and approve web fetch & file download design feat: Built-in fetch tool Jul 2, 2026
Add design doc for `internal_file_fetch`, a self-contained internal tool
that fetches a web URL. A `save` flag selects between loading content
inline (default) and persisting it as a workspace DIAL file for the
existing file tools. Reuses ExternalUrlFetcher and the two-tier egress
policy; independent of the large-tool-response offload processor.
Split the feature into two dedicated tools after review:
- internal_web_fetch: load a text resource inline (internal_tooling module,
  gated by features.web_fetch.enabled, configurable max_inline_size).
- internal_file_download: persist any resource into the agent-home workspace
  via the file-family write path (gated by features.dial_files.enabled_tools).

Both feature-gated and preview-gated. Reuses ExternalUrlFetcher + the
two-tier egress policy; independent of the offload processor. Status: Approved.
Move internal_web_fetch out of the deprecated internal_tooling module into
a new self-contained, feature-gated web_tooling module. Drop module-name
references to other in-flight work and note the prerequisite PRs (#368, #393)
that merge first: the file-family subclass API (_resolve_appdata_url /
_to_display_path) that internal_file_download relies on is preserved by #368,
and edits to the shared wiring files are additive alongside both PRs.
Collapse the two-tool proposal (internal_web_fetch + internal_file_download)
into a single internal_web_fetch(url, save_path=None): omit save_path to read
text inline, provide it to persist under the agent home. Approved.
Implement the approved one-tool design: internal_web_fetch(url, save_path).
Omit save_path to return the fetched text inline (textual, size-guarded);
provide it to persist the resource under the agent home via the shared
HomePathResolver + DialFileService.write_bytes, returning the workspace path.

- Promote HomePathResolver to shared/home_path (HomePathModule in shared_module),
  injected by both the file tools and the web tool.
- Remove the superseded internal_file_download tool and its dial_files wiring.
- Gate the tool on external egress at init: when web_fetch is enabled but egress
  is disabled, the tool is not exposed and a hard ToolInitializationException is
  surfaced, instead of failing on every call.
- Reject files/-prefixed save_path; uniquify on collision (overwrite=False).
- Regenerate schemas; dump_internal_tools enables egress so the tool materializes.
@andrii-novikov
andrii-novikov force-pushed the feat/344-web-fetch-tool branch from ecf65aa to 270b548 Compare July 3, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built-in fetch tool

1 participant