adk-java

googleApache-2.0活跃维护

用 Java 以代码优先方式构建、评估和部署复杂 AI Agent 的开源工具包,让开发者对 Agent 行为有更强的灵活性和控制力。

An open-source, code-first Java toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.

v1.14.0发布于 2026-11-02 15:21 UTC1,767star +1 / 7 天446fork同步于 2026-11-10 05:52 UTC

怎么上手

由 README 提炼,执行前请确认
<dependency>
  <groupId>com.google.adk</groupId>
  <artifactId>google-adk</artifactId>
  <version>1.14.0</version>
</dependency>
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

Google 开源的 Java 代码优先 AI Agent 开发工具包,让你在代码里掌控编排与工具调用

用 Java 以代码优先方式构建、评估和部署复杂 AI Agent 的开源工具包,让开发者对 Agent 行为有更强的灵活性和控制力。

核心能力

  • 用 Java 代码定义 Agent 逻辑、工具与编排
  • 支持预置工具、自定义函数与 OpenAPI 规范接入
  • 可将多个专用 Agent 组合成层级多智能体系统
  • 内置开发 UI,用于测试、调试与展示 Agent
  • 集成 A2A 协议实现远程 Agent 间通信

容易踩的坑

示例默认使用 gemini-2.0-flash 模型,需自行准备对应模型访问凭据;Agent 评估(Evaluate Agents)功能 README 标注为 Coming soon,尚不可用;A2A 集成需另行参考 a2a/README.md 完成端到端配置

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.14.0
  1. v1.14.0最新正式版2026-11-02 · 2026-11-02 15:21 UTC

    1.14.0 (2026-11-02)

    Features

    • add a Spring Boot chat app backed by an ADK agent (bca0591)
    • add a Spring Boot chat that streams replies and mixes ADK and Spring AI tools (7391fa8)
    • add App.toBuilder() (2e8dbea)
    • add bidirectional conversion between ADK and Spring AI (9949265)
    • add Event.isolationScope (86f3130)
    • add NodeInfo.name, runId, and parentRunId, and Event.nodeName (52f2be7)
    • add RunConfig.dollarEscapedPlaceholders to leave escaped placeholders in instructions as written (72b4af8)
    • load apps, agents and workflows through AppLoader (9c3d550)
    • pause a workflow for user input (8578068)
    • plugins: port DebugLoggingPlugin from adk-python (3c3633e)
    • plugins: port SaveFilesAsArtifactsPlugin from adk-python (272ea6c)
    • rebuild a workflow's node progress from session events (7096019)
    • reject node names that corrupt node paths (08d4b62)
    • resume a paused workflow from its session events (2e88a6d)
    • run a node once per item of a list input (528a99d)
    • run a tool as a workflow node (8b560fc)
    • run child nodes from a workflow node with Context.runNode (e293898)
    • serve an app's structure, including workflow graphs (6fd21b5)
    • share one run per Context.runNode run ID (a313ce4)
    • validate workflow graphs at construction time (7674c2b)
    • workflow: add NodeExecutionException as the base of NodeTimeoutException (a4c8ac1)
    • workflow: let RetryConfig match exceptions by class (fb4c916)

    Bug Fixes

    • close the Gemini response stream after a read error (461f7d6)
    • drop a delegating node's own output, as Python ADK does (5177269)
    • enforce node retry policies and timeouts (367b402)
    • fail a timed-out node with NodeTimeoutException (0c661e1)
    • **f
  2. v1.13.02026-10-21 · 2026-10-21 13:58 UTC
    查看更新说明

    1.13.0 (2026-10-21)

    Features

    • add a builder for workflow graph edges (4721491)
    • expose turnComplete for live content (857ee63)
    • langchain4j: make modelName optional when ChatModel or StreamingChatModel is provided (03036c3)
    • run a single workflow node (28f2606)
    • run a workflow graph (cecad8f)
    • run a workflow node as the invocation root (66eab8c)

    Bug Fixes

    • dev: allow only same-origin requests by default for CORS and /run_live (5667d38)
    • dev: reject DNS-rebinding requests that reach the server over loopback (1ae5078)
    • mcp: emit valid JSON Schema when converting ADK tools to MCP tools (60250a9)
    • omit caller values from VertexAiSessionService error messages (dc56f11)
    • round-trip thinking blocks in the Claude model (d1d9dc2)
  3. v1.12.02026-10-14 · 2026-10-14 10:48 UTC
    查看更新说明

    1.12.0 (2026-10-14)

    Features

    • add a context caching demo sample (91a1838)
    • add a Gemini context cache manager (e5083e3)
    • add an injectable scheduler for ADK's internal fan-out (1b89d23)
    • add cacheIntervals and createHttpOptions to ContextCacheConfig, as in ADK Python (3afe4e5)
    • add Context as the common base of CallbackContext and ToolContext (1309d38)
    • add injectable time and UUID providers for timestamps and ids (caccc7c)
    • add the experimental Edge and Start workflow types (a7b317a)
    • add the experimental JoinNode workflow node (5137604)
    • add the experimental Node and BaseNode workflow types (189d463)
    • add the experimental Workflow type for workflow graphs (4c77cdf)
    • add the workflow fields Event.output, Event.nodeInfo and EventActions.route (e823fba)
    • carry context cache config and metadata on LlmRequest, LlmResponse and Event (187a4e1)
    • carry the continuation token across the Kotlin engine interop (b3f0665)
    • make BaseAgent extend BaseNode so every agent is a workflow node (dbc973b)
    • mcp: allow rejecting config-supplied stdio MCP servers (28810cd)

    Bug Fixes

    • a2a: skip an unconvertible remote A2A part instead of failing the turn (9debe96)
    • create and use Gemini context caches when ContextCacheConfig is set (68914c5), closes #1530
    • run approved tool confirmations for agents under a ParallelAgent (f866804)
    • send MCP tool input schemas in chat completions requests (ce88237)
    • spring-ai: order SpringAIAutoConfiguration after Spring AI model auto-configurations (d342a95)
    • spring-ai: preserve enum and items in tool schema conversion (7b1a5b8), closes #1609
    • stop losing event fields on Vertex AI session reloads (887f9da)
    • wait for the transfer event to be persisted before running the transfer target (9f5d5ce)
  4. v1.11.02026-10-02 · 2026-10-02 12:26 UTC
    查看更新说明

    1.11.0 (2026-10-02)

    Features

    • add rewindBeforeInvocationId to EventActions and carry it through the Kotlin interop (4ff229b)
    • add thread-safe immutableEvents, addEvent, and addEvents helpers to Session (950b869)
    • carry code-execution, media resolution and more config across the Java/Kotlin interop (4f3b02d)
    • dev: add the /version and /health endpoints (849e1f6)
    • drop model-name checks from GoogleSearchTool and UrlContextTool (887da0e)
    • honor the plain-text continuation flag and allow only one resumability flag (f5c7561)
    • let the ADK Java <-> Kotlin interop run on a caller-supplied dispatcher (29481a9)
    • resume Gemini 4 Argon generations paused with a continuation token (e8dfcb0)
    • sessions: add an opt-in switch for rejecting a duplicate session id (e6a46b1)
    • support pausing and resuming a session invocation (8361c5f)
    • support the resume runAsync overload when adapting a Kotlin runner to the Java Runner API (4e67b3d)

    Bug Fixes

    • agents: only stop ParallelAgent on direct sub-agent escalation (fc3e352)
    • dev: ignore an unusable adk.web.backend-url instead of serving it (f7d7a7c)
    • dev: let the dev UI's public address be configured (2c5bd9e)
    • keep structuredContent and non-text content in MCP tool results (9b128df)
    • make Java session appends on the Kotlin engine update the caller's session in place (650e950)
    • record the thinking budget and level on the call_llm telemetry span (ed72ddb)
    • respect OpenTelemetry LIFO scoping in reactive streams (33e28e3)
    • scope the tool-confirmation resume scan to the current branch (b00e25d)
    • sessions: reject a duplicate session id in FirestoreSessionService (9fe5830)
    • sessions: reject negative numRecentEvents in GetSessionConfig (3adb8cf)
    • tools: run an AgentTool under the caller's RunConfig (18560ba)

    Reverts

    • keeping structuredContent and non-text content in MCP tool results (c897cdb
  5. v1.10.12026-09-18 · 2026-09-18 13:24 UTC
    查看更新说明

    1.10.1 (2026-09-18)

    Features

    • add @Experimental annotation for unstable ADK APIs (69914f4)
    • add EventActions.agentState for session-resumability checkpoints (8505a01)
    • add one-way ADK Java to Kotlin engine interop module (baff584)
    • add opt-in ResumabilityConfig flag for plain-text continuation auto-resume (f0fb722)
    • Add unique event_id to BigQuery agent analytics events (15c70de)
    • bridge ADK Java plugin onRunErrorCallback to the Kotlin engine (4ee155b)
    • fire ADK Java plugin tool callbacks for native Kotlin tools (fda5a10)
    • run an ADK Kotlin-engine runner behind the ADK Java Runner API (6ff8241)

    Bug Fixes

    • dev: serve the dev UI and its assets under a /dev-ui path (6866919)
    • memory: format search timestamps as epoch millis (5269b87)
    • models: set additionalProperties on schemas for OpenAI strict structured outputs (4b058cd)
    • sessions: forward the caller-supplied session id in VertexAiSessionService (77eae25)
    • sessions: validate HTTP status before parsing Vertex AI session responses (4192aca)

    Documentation

    • remove TODO regarding default InMemoryRunner.appName (99adf57)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Agent Development Kit (ADK) for Java

    License Maven Central r/agentdevelopmentkit Ask DeepWiki

    Agent Development Kit (ADK) is designed for developers seeking fine-grained control and flexibility when building advanced AI agents that are tightly integrated with services in Google Cloud. It allows you to define agent behavior, orchestration, and tool use directly in code, enabling robust debugging, versioning, and deployment anywhere – from your laptop to the cloud.


    ✨ Key Features

    • Rich Tool Ecosystem: Utilize pre-built tools, custom functions, OpenAPI specs, or integrate existing tools to give agents diverse capabilities, all for tight integration with the Google ecosystem.

    • Code-First Development: Define agent logic, tools, and orchestration directly in Java for ultimate flexibility, testability, and versioning.

    • Modular Multi-Agent Systems: Design scalable applications by composing multiple specialized agents into flexible hierarchies.

    🚀 Installation

    If you're using Maven, add the following to your dependencies:

    <dependency>
      <groupId>com.google.adk</groupId>
      <artifactId>google-adk</artifactId>
      <version>1.14.0</version>
    </dependency>
    <!-- Dev UI -->
    <dependency>
        <groupId>com.google.adk</groupId>
        <artifactId>google-adk-dev</artifactId>
        <version>1.14.0</version>
    </dependency>
    

    To instead use an unreleased version, you could use https://jitpack.io/#google/adk-java/; see https://github.com/enola-dev/LearningADK#jitpack for an example illustrating this.

    📚 Documentation

    For building, evaluating, and deploying agents by follow the Java documentation & samples:

    🏁 Feature Highlight

    Same Features & Familiar Interface As Python ADK:

    import com.google.adk.agents.LlmAgent;
    import com.google.adk.tools.GoogleSearchTool;
    
    LlmAgent rootAgent = LlmAgent.builder()
        .name("search_assistant")
        .description("An assistant that can search the web.")
        .model("gemini-2.0-flash") // Or your preferred models
        .instruction("You are a helpful assistant. Answer user questions using Google Search when needed.")
        .tools(new GoogleSearchTool())
        .build();
    

    Development UI

    Same as the beloved Python Development UI. A built-in development UI to help you test, evaluate, debug, and showcase your agent(s).

    Evaluate Agents

    Coming soon...

    🤖 A2A and ADK integration

    For remote agent-to-agent communication, ADK integrates with the A2A protocol. See a2a/README.md for end-to-end setup instructions and sample commands.

    🤝 Contributing

    We welcome contributions from the community! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please see our Contributing Guidelines to get started.

    📄 License

    This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

    Preview

    This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.


    Happy Agent Building!