Skip to content

[Feature] Define one provider-neutral web search capability contract #28

Open

Description

@kvnloo

What outcome should OpenMuse handle?

OpenMuse should expose one stable public-web search capability to its agents even when the backing provider changes.

There are currently two open implementations of the same search_web capability:

Both are reasonable provider integrations, but the fact that two contributors independently needed the same tool name with incompatible contracts suggests that provider identity is leaking into the agent-facing capability boundary.

Proposed behavior

Define one small, provider-neutral search_web contract owned by OpenMuse, then put provider adapters behind it.

The important invariant would be:

agent capability identity != provider identity

A minimal version could standardize:

  • one request schema for the model-facing tool;
  • one bounded result schema with source URL, title, excerpt/snippet, optional publication metadata, warnings, and truncation;
  • cancellation/deadline behavior;
  • treatment of results as untrusted evidence rather than authority;
  • how delegated tasks persist search evidence;
  • provider selection/configuration separately from the tool contract.

This does not need a generic plugin framework. A narrow SearchProvider/adapter seam would be enough if that is the smallest shape that keeps the model/tool contract stable.

That would let Parallel, You.com, or a future provider compete behind the same capability without changing prompts, model schemas, persisted evidence, or tests each time.

How would we verify it works?

  • Contract-test at least two provider adapters against the same request/result fixtures.
  • Run the same native-chat and delegated-task test against each adapter.
  • Verify provider failures remain visible rather than becoming empty success.
  • Verify cancellation and response-size bounds are preserved.
  • Verify delegated-task evidence has the same shape regardless of provider.
  • Verify changing providers does not change the model-visible tool schema.

This seems worth agreeing on as an issue first because it affects connector placement and architecture, per CONTRIBUTING.md.

AI-use note: I used an AI assistant to compare the current #22/#26 implementations and draft this issue; I verified the incompatible schemas and runtime placement against their current PR heads before filing.

Activity

  1. brainsparker commented on Oct 12, 2026

    @brainsparker

    Disclosure: I work at You.com, so treat this accordingly.

    +1 to keeping provider identity out of the agent-facing contract. Since #84 landed, apps/server/src/search.ts is the one place that knows about the provider, so the seam could be small:

    1. Keep the current search_web input and result schema as the OpenMuse-owned contract. No model-visible change.
    2. Add a SearchProvider interface (search(input, signal) -> { results, warnings, truncated }) and move the existing Parallel code behind it unchanged. Parallel stays the default.
    3. Select with one env var (for example WEB_SEARCH_PROVIDER=parallel), next to WEB_SEARCH_ENABLED.
    4. Run the shared fixtures from your verification list against every adapter: visible failures, cancellation, size bounds, same evidence shape.

    You.com could be one adapter behind it. Our free MCP (https://api.you.com/mcp?profile=free) is 100 searches a day, no key, and speaks the same StreamableHTTP MCP the Parallel adapter already uses, so it's a second adapter with no new dependency.

    Per CONTRIBUTING.md I'll wait for a maintainer to agree on the shape here first. If this fits, I'm happy to send the seam PR first (Parallel only, a pure move) and the You.com adapter as a separate PR. If it overlaps something you already have planned, say so and I'll close it out without fuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions