ec2b666284
Continuous Integration / Pre-commit Linter (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.10) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.11) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.12) (push) Waiting to run
Continuous Integration / Mypy Check (Python 3.13) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.10) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.11) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.12) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.13) (push) Waiting to run
Continuous Integration / Unit Tests (Python 3.14) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.10) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.11) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.12) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.13) (push) Waiting to run
Continuous Integration / A2A v0.3 Tests (Python 3.14) (push) Waiting to run
Copybara PR Handler / close-imported-pr (push) Waiting to run
29 lines
1005 B
Plaintext
29 lines
1005 B
Plaintext
ADK Tools Guide
|
|
|
|
Tools are capabilities that agents can invoke during their reasoning process.
|
|
ADK supports several types of tools:
|
|
|
|
1. Function Tools
|
|
Define Python functions and pass them directly to an agent.
|
|
The function signature and docstring become the tool schema.
|
|
|
|
2. Retrieval Tools
|
|
- FilesRetrieval: Index and search local files using embeddings.
|
|
Uses gemini-embedding-2-preview by default.
|
|
- VertexAiRagRetrieval: Search Vertex AI RAG corpora.
|
|
|
|
3. Code Execution
|
|
Agents can generate and execute code in a sandboxed environment.
|
|
|
|
4. Third-Party Tool Integration
|
|
- LangchainTool: Wraps LangChain tools for use in ADK.
|
|
- CrewaiTool: Wraps CrewAI tools for use in ADK.
|
|
|
|
5. MCP Tools
|
|
Connect to Model Context Protocol servers for external tool access.
|
|
|
|
Tool Configuration:
|
|
Tools can be configured with authentication, rate limiting, and custom
|
|
schemas. The ToolContext provides access to session state, artifacts,
|
|
and other contextual information during tool execution.
|