mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
docs: Clarify research tool instructions in YAML agent
PiperOrigin-RevId: 823255928
This commit is contained in:
committed by
Copybara-Service
parent
0d0fb4d034
commit
53209f1bb9
@@ -240,44 +240,25 @@ tools:
|
||||
|
||||
### ADK Knowledge and Research Tools
|
||||
|
||||
#### Remote Semantic Search
|
||||
- **adk_knowledge_agent**: Search ADK knowledge base for ADK examples, patterns, and documentation
|
||||
**Default research tool**: Use `adk_knowledge_agent` first for ADK concepts, APIs,
|
||||
examples, and troubleshooting. Switch to the tools below only when the
|
||||
knowledge agent lacks the needed information.
|
||||
|
||||
#### Web-based Research
|
||||
- **google_search_agent**: Search web for ADK examples, patterns, and documentation (returns full page content as results)
|
||||
- **url_context_agent**: Fetch content from specific URLs when mentioned in search results or user queries (use only when specific URLs need additional fetching)
|
||||
- `search_adk_source`: Regex search across ADK source for classes, methods, and
|
||||
signatures; follow up with `read_files` for full context.
|
||||
- `google_search_agent`: Broader web search for ADK-related examples or docs.
|
||||
- `url_context_agent`: Fetch content from specific URLs returned by search
|
||||
results.
|
||||
|
||||
#### Local ADK Source Search
|
||||
- **search_adk_source**: Search ADK source code using regex patterns for precise code lookups
|
||||
* Use for finding class definitions: `"class FunctionTool"`
|
||||
* Use for constructor signatures: `"def __init__.*FunctionTool"`
|
||||
* Use for method definitions: `"def method_name"`
|
||||
* Returns matches with file paths, line numbers, and context
|
||||
* Follow up with **read_files** to get complete file contents
|
||||
**Trigger research when** users ask ADK questions, request unfamiliar features,
|
||||
need agent-type clarification, want best practices, hit errors, express
|
||||
uncertainty about architecture, or you otherwise need authoritative guidance.
|
||||
|
||||
**Research Workflow for ADK Questions:**
|
||||
Mainly rely on **adk_knowledge_agent** for ADK questions. Use other tools only when the knowledge agent doesn't have enough information.
|
||||
|
||||
1. **search_adk_source** - Find specific code patterns with regex
|
||||
2. **read_files** - Read complete source files for detailed analysis
|
||||
3. **google_search_agent** - Find external examples and documentation
|
||||
4. **url_context_agent** - Fetch specific GitHub files or documentation pages
|
||||
|
||||
### When to Use Research Tools
|
||||
**ALWAYS use research tools when:**
|
||||
1. **User asks ADK questions**: Any questions about ADK concepts, APIs, usage patterns, or troubleshooting
|
||||
2. **Unfamiliar ADK features**: When user requests features you're not certain about
|
||||
3. **Agent type clarification**: When unsure about agent types, their capabilities, or configuration
|
||||
4. **Best practices**: When user asks for examples or best practices
|
||||
5. **Error troubleshooting**: When helping debug ADK-related issues
|
||||
6. **Agent building uncertainty**: When unsure how to create agents or what's the best practice
|
||||
7. **Architecture decisions**: When evaluating different approaches or patterns for agent design
|
||||
|
||||
**Research Tool Usage Patterns:**
|
||||
|
||||
**Default Research Tool:**
|
||||
Use **adk_knowledge_agent** as the primary research tool for ADK questions.
|
||||
Use other tools only when the knowledge agent doesn't have enough information.
|
||||
**Recommended research sequence** (stop once you have enough information):
|
||||
1. `adk_knowledge_agent`
|
||||
2. `search_adk_source` → `read_files`
|
||||
3. `google_search_agent`
|
||||
4. `url_context_agent`
|
||||
|
||||
**For ADK Code Questions (NEW - Preferred Method):**
|
||||
1. **search_adk_source** - Find exact code patterns:
|
||||
|
||||
Reference in New Issue
Block a user