Skip to content

feat: add Google Search and Perplexity Search agent tool types - #439

Closed
esafwan wants to merge 1 commit into
developfrom
feat/google-perplexity-search-tools
Closed

feat: add Google Search and Perplexity Search agent tool types#439
esafwan wants to merge 1 commit into
developfrom
feat/google-perplexity-search-tools

Conversation

@esafwan

@esafwan esafwan commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-implements the search-tool features from the stale PRs #4 and #5 against current develop (those PRs targeted the pre-rename agentflo/ tree and were unmergeable). Supersedes/closes #4 and #5.

Changes

  • Google Search tool type: Google Programmable Search Engine via REST. Credentials from site_config.json: google_pse_api_key + google_pse_engine_id. Returns top-N {title, link, snippet} results.
  • Perplexity Search tool type: via LiteLLM (perplexity/sonar). Key from perplexity_api_key in site_config, falling back to PERPLEXITY_API_KEY env (matches existing provider key routing in huf/ai/providers/litellm.py). Returns answer + citations.
  • Types added to: Agent Tool Function types options, prepare_function_params branches, sdk_tools.create_agent_tools mapping, flow_tool_executor handler map, app_seeding/loaders.py VALID_TYPES, frontend ToolType union + toolTemplates.json (new "Web Search" template).

Validation

  • python3 -m compileall on edited modules; edited JSON files parse.
  • Stubbed smoke tests: missing-key errors, Google result shape (mocked HTTP), Perplexity answer/citations (mocked litellm), env fallback, flow-executor mapping.
  • yarn typecheck clean.

Re-implements the features from old PRs #4 and #5 against the current
LiteLLM-based develop branch.

- New 'Google Search' and 'Perplexity Search' types on Agent Tool Function,
  with JSON schemas for their query parameters
- handle_google_search: Google Programmable Search Engine via site_config
  keys google_pse_api_key / google_pse_engine_id; returns compact
  {title, link, snippet} results
- handle_perplexity_search: LiteLLM completion with perplexity/sonar using
  perplexity_api_key from site_config (fallback: PERPLEXITY_API_KEY env);
  returns grounded answer with citations
- Wired into sdk_tools.create_agent_tools, flow_tool_executor type map,
  app seeding VALID_TYPES, frontend ToolType union and tool templates
@esafwan

esafwan commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by separate Google Search #462 and Perplexity Search #463 PRs, both included in integration PR #468.

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.

1 participant