Skip to content

feat:Add google search tool - #4

Closed
esafwan wants to merge 2 commits into
legacyfrom
add-google-search-tool
Closed

feat:Add google search tool#4
esafwan wants to merge 2 commits into
legacyfrom
add-google-search-tool

Conversation

@esafwan

@esafwan esafwan commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Important: Merge after merging liteLLM PR.

Add Google Search Tool

Adds Google Programmable Search Engine (PSE) support as a tool via LiteLLM.

  • Implements Google Search tool in SDK tools
  • Integrates with LiteLLM unified provider
  • Adds configuration and error handling
### How to Add and Configure Google Search API Key in Frappe

#### Step 1: Add Keys in Site Config

The Google Search tool uses credentials stored in `site_config.json`. You need to add:

* `google_pse_api_key` → your Google Programmable Search API key
* `google_pse_engine_id` → your Google Custom Search Engine ID


~~~json
{
  "google_pse_api_key": "YOUR_API_KEY_HERE",
  "google_pse_engine_id": "YOUR_ENGINE_ID_HERE"
}
~~~

#### Step 2: Get Your Google API Credentials

1. Go to [[Google Cloud Console](https://console.cloud.google.com/)](https://console.cloud.google.com/)
2. Create/select a project
3. Enable **Custom Search API**
4. Under **APIs & Services → Credentials**, create an API key → this is `google_pse_api_key`
5. Visit [[Programmable Search Engine](https://programmablesearchengine.google.com/)](https://programmablesearchengine.google.com/)
6. Create or open your search engine
7. Copy the **Search Engine ID** → this is `google_pse_engine_id`

Once added, the tool automatically detects these values from `site_config` — no restart required.

Integrates Google Search as a new tool for agents, allowing them to perform web searches. This includes adding the tool to the AgentToolFunction doctype, defining its parameters, and implementing the handler function using LiteLLM.
@esafwan
esafwan force-pushed the add-google-search-tool branch 2 times, most recently from dc6e64e to 2f340fc Compare November 5, 2025 14:45
@esafwan

esafwan commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing — superseded by #439, which re-implements Google Search as an Agent Tool Function type against current develop (this branch targets the pre-rename agentflo/ tree and cannot be rebased; the LiteLLM prerequisite it mentions has long since landed). Same configuration surface: google_pse_api_key + google_pse_engine_id in site_config.json.

@esafwan esafwan closed this Jul 26, 2026
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