Skip to content

feat!: add default Parallel web research tools for agents - #1178

Open
George Pickett (georgeatparallel) wants to merge 1 commit into
microsoft:mainfrom
georgeatparallel:parallel-search-af934a91-1c1c-426e-a62a-aebf0196d22e
Open

George Pickett (georgeatparallel) wants to merge 1 commit into
microsoft:mainfrom
georgeatparallel:parallel-search-af934a91-1c1c-426e-a62a-aebf0196d22e

Conversation

@georgeatparallel

Copy link
Copy Markdown

Purpose

Give agents free web search and page fetching with Parallel Search MCP. Anonymous search uses Fast mode, with no Parallel account or API key needed. The agent factory exposes parallel_web_search and parallel_web_fetch through the existing client-side MCP dispatcher.

Does this introduce a breaking change?

  • Yes
  • No

Existing teams without web-search settings also gain these tools. Set WEB_SEARCH_PROVIDER=none before starting the backend to retain no-web behavior for the entire deployment, or set an agent's web_search_provider to "none". Per-agent web_search_tools restricts search and fetch separately; an empty list denies both. Existing domain MCP, knowledge-base, and code-interpreter choices retain their own configuration and connections.

How to Test

With the backend dependencies installed, run from the repository root:

PYTHONPATH=src/backend python -m pytest src/tests/agents/test_parallel_search.py -q

These tests use a scripted model, the real Agent Framework/MCP client, and HTTP fixtures. They make no external requests and require no Azure, model, or Parallel credentials.

What to Check

  • Saved team settings reach the factory and tool dispatcher, and search results and fetched source URLs reach the model.
  • Global denial, per-agent denial, and allowed-tool restrictions prevent unauthorized web calls.
  • Dedicated Parallel credentials stay separate from Azure credentials; requests carry the project User-Agent.
  • Errors, timeouts, and cancellation preserve cleanup and do not switch providers.

Other Information

The backend web research guide documents the new default, controls, and data sent to Parallel. Free access has service limits; Azure inference still uses the application's normal setup.

I work at Parallel.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Production orchestration does not retain and close the template that owns the new HTTP client's cleanup.

1 open issue
What changed in this PR

Adds default Parallel web search and page fetching through the existing agent tool dispatcher, including for saved teams without web settings.

Changes:

  • Adds deployment-wide and per-agent access controls.
  • Integrates dedicated credentials and MCP transport handling.
  • Documents the breaking default and adds dispatcher tests.
File Description
src/​tests/​backend/​services/​test_team_service.py Adds web settings to agent mocks.
src/​tests/​backend/​agents/​test_agent_factory.py Disables web access in existing unit tests.
src/​tests/​agents/​test_parallel_search.py Tests dispatch, permissions, credentials, and cleanup.
src/​backend/​services/​team_service.py Preserves uploaded web settings.
src/​backend/​README.md Documents defaults, controls, and testing.
src/​backend/​config/​web_search_config.py Resolves permissions and dedicated credentials.
src/​backend/​common/​models/​messages.py Adds per-agent web settings.
src/​backend/​common/​config/​app_config.py Reads deployment web configuration.
src/​backend/​agents/​agent_template.py Connects Parallel tools and registers cleanup.
src/​backend/​agents/​agent_factory.py Passes resolved settings to agents.
content_packs/​README.md Links web controls for team authors.

Review effort: Balanced

Comment on lines +497 to +500
web_client = await self._stack.enter_async_context(AsyncClient(
headers=self.web_search_config.get_headers(),
timeout=Timeout(60.0, connect=10.0),
))

This branch has not been deployed

No deployments
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.

2 participants