Skip to content

Feature flag: EXA_WEB_TOOLS — track rollout and graduation #41

Description

@Number531

Feature Flag: EXA_WEB_TOOLS

Introduced: v4.7.0 (2026-03-12)
Default: false (OFF)
Commit: d605f1c

Description

Replaces Anthropic's built-in WebFetch and WebSearch tools with Exa-powered MCP equivalents:

  • fetch_document — Two-phase (direct HTTP → Exa /contents fallback). Preview mode (~2-4K chars) + full mode with verbosity control.
  • exa_web_search — Exa deep search with highlights, date filtering, categories.

Why Feature-Flagged

  • New external dependency: All web tool calls route through Exa API when enabled
  • Behavioral change: Subagents lose access to WebFetch/WebSearch and gain fetch_document/exa_web_search
  • Requires validation: Need live memo run confirming equal or better research quality before graduating to default-ON

Rollout Plan

  • Canary: Run single memo with EXA_WEB_TOOLS=true, verify no 403 failures on SEC/gov sites
  • Validation: Compare research quality (footnote count, QA score) against baseline memo with flag OFF
  • Soak: Run 3-5 memos with flag ON, monitor Exa API costs and error rates via getMetrics()
  • Graduate: Flip default to true in featureFlags.js, remove conditional code paths
  • Cleanup: Remove WebFetch/WebSearch branches from STANDARD_TOOLS, simplify prompt constants

Files Affected

  • src/config/featureFlags.js — flag definition
  • src/config/legalSubagents/_standardTools.js — conditional tool arrays
  • src/config/legalSubagents/_promptConstants.js — dynamic tool name interpolation
  • src/config/legalSubagents.js — legacy path (same conditionals)
  • src/config/domainMcpServers.js — conditional domain mapping
  • src/config/legalSubagents/agents/citation-websearch-verifier.js — conditional tool names
  • src/hooks/sdkHooks.js — counter tracking
  • src/utils/hookSSEBridge.js — SSE forwarding
  • test/react-frontend/app.js — counter display

Rollback

# Instant rollback — zero code change required
EXA_WEB_TOOLS=false

Related

  • Spec: docs/pending-updates/websearch-conversion.md
  • Exa API docs: docs/pending-updates/exa-api-documentation-feb-2026.md
  • DirectFetchHybridClient: src/api-clients/DirectFetchHybridClient.js
  • Tests: test/sdk/direct-fetch-hybrid.test.js, test/sdk/exa-web-search.test.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-flagTracks feature flag lifecycle: rollout, validation, graduation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions