GitHub

Using the GitHub Copilot SDK for Java

Aug 10, 2026Edward Burns
Using the GitHub Copilot SDK for Java
SummaryAI, from the source post

This post introduces the GitHub Copilot SDK for Java, a framework-agnostic client library that allows server-side Java code to programmatically create Copilot agent sessions, register tools using annotations or lambdas, send prompts, and receive structured responses. It highlights the use of virtual threads for efficient agent processing and real-time UI updates via WebSockets. The post details the SDK's features, including `@CopilotTool` and `@CopilotToolParam` for defining tools, `ToolDefinition.from(...)` for inline lambda tools, cross-class tool scanning, customization of system messages, and the `sendAndWait(...)` method for the agentic loop. A sample Jakarta EE 11 application is provided to demonstrate these capabilities.

More from the AI-Assisted Code Development and Review trail