Summary
agent_app currently hardcodes code lookup and web search behavior inside agent_app/agent_server/multi_agent/tools/web_search.py. For Databricks Apps deployment, this makes it difficult for users to bring their own external lookup service (BYOA) in a clean, bundle-configured way.
Proposal
Introduce a small provider abstraction for lookup tools so the app can route through one of several provider kinds configured from agent_app/databricks.yml and loaded at runtime via env vars in the Apps path. Suggested provider kinds:
builtin for the existing NLM/RxNorm fallbacks
http for user-supplied REST APIs
mcp for user-supplied MCP servers
Why this matters
agent_app is deployed as a Databricks App, and its config already comes from resources.apps.*.config.env in agent_app/databricks.yml
- That deployment model is a good fit for env-driven provider config, not hardcoded URLs in tool code
- A provider registry makes BYOA easier to test, document, and extend without changing the agent flow
Recommendation
Support both HTTP/API and MCP, but make HTTP/API the default BYOA path and MCP an optional advanced provider type. HTTP is simpler operationally for most users, while MCP is useful when a customer already has an MCP server or wants richer tool semantics.
Suggested config shape
Use a single JSON env var such as LOOKUP_PROVIDERS_JSON plus optional secret env vars for credentials. The router can then select providers by capability and code type with fallback ordering.
Acceptance criteria
- Existing behavior remains the default when no BYOA config is supplied
- Users can plug in at least one custom HTTP lookup provider via
agent_app/databricks.yml
- MCP providers can be added without changing the core agent workflow
- The design keeps secrets out of YAML and uses env vars or Databricks secret references instead
Notes
The current discover_tools.py already recognizes custom/external MCP server concepts, so this could align with the existing Databricks App / MCP direction while still keeping REST APIs as the easiest integration path.
Summary
agent_appcurrently hardcodes code lookup and web search behavior insideagent_app/agent_server/multi_agent/tools/web_search.py. For Databricks Apps deployment, this makes it difficult for users to bring their own external lookup service (BYOA) in a clean, bundle-configured way.Proposal
Introduce a small provider abstraction for lookup tools so the app can route through one of several provider kinds configured from
agent_app/databricks.ymland loaded at runtime via env vars in the Apps path. Suggested provider kinds:builtinfor the existing NLM/RxNorm fallbackshttpfor user-supplied REST APIsmcpfor user-supplied MCP serversWhy this matters
agent_appis deployed as a Databricks App, and its config already comes fromresources.apps.*.config.envinagent_app/databricks.ymlRecommendation
Support both HTTP/API and MCP, but make HTTP/API the default BYOA path and MCP an optional advanced provider type. HTTP is simpler operationally for most users, while MCP is useful when a customer already has an MCP server or wants richer tool semantics.
Suggested config shape
Use a single JSON env var such as
LOOKUP_PROVIDERS_JSONplus optional secret env vars for credentials. The router can then select providers by capability and code type with fallback ordering.Acceptance criteria
agent_app/databricks.ymlNotes
The current
discover_tools.pyalready recognizes custom/external MCP server concepts, so this could align with the existing Databricks App / MCP direction while still keeping REST APIs as the easiest integration path.