Skip to content

Commit 53209f1

Browse files
GWealecopybara-github
authored andcommitted
docs: Clarify research tool instructions in YAML agent
PiperOrigin-RevId: 823255928
1 parent 0d0fb4d commit 53209f1

File tree

1 file changed

+19
-38
lines changed

1 file changed

+19
-38
lines changed

contributing/samples/adk_agent_builder_assistant/instruction_embedded.template

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -240,44 +240,25 @@ tools:
240240

241241
### ADK Knowledge and Research Tools
242242

243-
#### Remote Semantic Search
244-
- **adk_knowledge_agent**: Search ADK knowledge base for ADK examples, patterns, and documentation
245-
246-
#### Web-based Research
247-
- **google_search_agent**: Search web for ADK examples, patterns, and documentation (returns full page content as results)
248-
- **url_context_agent**: Fetch content from specific URLs when mentioned in search results or user queries (use only when specific URLs need additional fetching)
249-
250-
#### Local ADK Source Search
251-
- **search_adk_source**: Search ADK source code using regex patterns for precise code lookups
252-
* Use for finding class definitions: `"class FunctionTool"`
253-
* Use for constructor signatures: `"def __init__.*FunctionTool"`
254-
* Use for method definitions: `"def method_name"`
255-
* Returns matches with file paths, line numbers, and context
256-
* Follow up with **read_files** to get complete file contents
257-
258-
**Research Workflow for ADK Questions:**
259-
Mainly rely on **adk_knowledge_agent** for ADK questions. Use other tools only when the knowledge agent doesn't have enough information.
260-
261-
1. **search_adk_source** - Find specific code patterns with regex
262-
2. **read_files** - Read complete source files for detailed analysis
263-
3. **google_search_agent** - Find external examples and documentation
264-
4. **url_context_agent** - Fetch specific GitHub files or documentation pages
265-
266-
### When to Use Research Tools
267-
**ALWAYS use research tools when:**
268-
1. **User asks ADK questions**: Any questions about ADK concepts, APIs, usage patterns, or troubleshooting
269-
2. **Unfamiliar ADK features**: When user requests features you're not certain about
270-
3. **Agent type clarification**: When unsure about agent types, their capabilities, or configuration
271-
4. **Best practices**: When user asks for examples or best practices
272-
5. **Error troubleshooting**: When helping debug ADK-related issues
273-
6. **Agent building uncertainty**: When unsure how to create agents or what's the best practice
274-
7. **Architecture decisions**: When evaluating different approaches or patterns for agent design
275-
276-
**Research Tool Usage Patterns:**
277-
278-
**Default Research Tool:**
279-
Use **adk_knowledge_agent** as the primary research tool for ADK questions.
280-
Use other tools only when the knowledge agent doesn't have enough information.
243+
**Default research tool**: Use `adk_knowledge_agent` first for ADK concepts, APIs,
244+
examples, and troubleshooting. Switch to the tools below only when the
245+
knowledge agent lacks the needed information.
246+
247+
- `search_adk_source`: Regex search across ADK source for classes, methods, and
248+
signatures; follow up with `read_files` for full context.
249+
- `google_search_agent`: Broader web search for ADK-related examples or docs.
250+
- `url_context_agent`: Fetch content from specific URLs returned by search
251+
results.
252+
253+
**Trigger research when** users ask ADK questions, request unfamiliar features,
254+
need agent-type clarification, want best practices, hit errors, express
255+
uncertainty about architecture, or you otherwise need authoritative guidance.
256+
257+
**Recommended research sequence** (stop once you have enough information):
258+
1. `adk_knowledge_agent`
259+
2. `search_adk_source` → `read_files`
260+
3. `google_search_agent`
261+
4. `url_context_agent`
281262

282263
**For ADK Code Questions (NEW - Preferred Method):**
283264
1. **search_adk_source** - Find exact code patterns:

0 commit comments

Comments
 (0)