Skip to main content
VeADK Java builds on the ADK Java tool system and adds Volcengine-oriented built-in tools and toolsets. You can attach Java functions, web search, web fetch, MCP Router, Skills, Skills Sandbox, Code Sandbox, and other capabilities to the same Agent, then let the model decide which tool to call at runtime.

Entry Point

Tools are usually passed through Agent.builder().tools(...). You can mix BaseTool, Toolsets, and ADK Java FunctionTool instances.
When an Agent uses MCP or remote Toolsets, call agent.close().blockingAwait() after the task so the underlying sessions and connections can be released.

Built-In Tools

Web Search And Web Fetch

Use WebSearchTool for one query and ParallelWebSearchTool when a question should be split into multiple concurrent queries. Use WebFetchTool when the user gives an explicit URL and the Agent should read the page or PDF body.
web_fetch accepts url, extract_mode, and max_chars. extract_mode defaults to markdown and also supports text. The tool blocks private, loopback, link-local, multicast, and reserved addresses, limits redirects and response size, and is intended for public resources rather than authenticated back-office pages.

MCP Router

If tools are centrally registered in MCP Router, expose the Router as a Toolset. The default constructor reads environment variables, and the explicit constructor lets you pass the URL, API key, and allowed tool names.
Without arguments, McpRouterToolset.create() reads TOOL_MCP_ROUTER_URL and optional TOOL_MCP_ROUTER_API_KEY. When an API key is configured, the client sends it as Bearer authentication.

Skills

There are two common ways to use Skills. The first is to expose a Skill Source as ordinary tools, so the model can call skills just like any other tool.
The second is to execute remote skill workflows through Skills Sandbox. For synchronous workflows, use ExecuteSkillsTool; it sends workflow_prompt to the remote skill space and waits for the result.
For asynchronous workflows, combine InvokeSkillTool and PollSkillTool. The model calls invoke_skill to create the remote task, then calls poll_skill with the returned task_id until it receives a final result.

Code Sandbox

RunCodeTool lets the model execute code in AgentKit Code Sandbox. It is useful for data processing, temporary code checks, and artifact generation. Tool arguments include code, language, and optional timeout.
If you already have a Code Sandbox MCP service, connect it through CodeSandboxToolset.
Application code can manage remote sandbox sessions directly with SandboxClient. Paths are resolved under remote /workspace, and the client rejects traversal and unsafe absolute paths.

Environment Variables

Automatic Tools

When an Agent is configured with a knowledge base or long-term memory, VeADK Java automatically adds retrieval tools such as loadKnowledgebase and loadMemory. When local Skills are configured and no explicit SkillToolset is provided, the framework also prepares the corresponding Skill tools. For skills_sandbox mode, pass ExecuteSkillsTool explicitly.

Security Notes

Tools let the model access external systems, execute code, and trigger business workflows, so configure credentials and allowed tool names with least privilege. For tools that can write data, approve requests, make payments, delete resources, publish content, or send notifications, add business-level confirmation, auditing, and idempotency protection. Code Sandbox and Skills Sandbox provide execution isolation, but you should still limit input files, timeouts, network access, and the secret scope available to the execution environment.
Last modified on October 20, 2026