Skip to content

GitHub launches GitHub Copilot SDK for Java a framework independent way to manage AI

Share
GitHub launches GitHub Copilot SDK for Java a framework independent way to manage AI

Listen to this article

Read by Anchor

GitHub announced the launch of the GitHub Copilot SDK for Java, a software development kit that gives developers a framework-independent way to manage AI from within enterprise applications. Unlike earlier solutions such as the Langchain4j framework, which required its own library, or the Spring AI framework, which is tied to Spring-specific design choices, the new kit handles AI with complete neutrality toward both frameworks and model providers. The kit also supports a bring-your-own-key (BYOK) option, allowing direct integration with providers such as OpenAI, Azure, Anthropic, or any OpenAI-compatible endpoint, without needing a paid Copilot subscription when using direct endpoints.

The kit is a library for Java clients on the server side and enables programs to create Copilot agent sessions, register tools, send prompts and receive programmatically formatted responses within server environments such as Jakarta EE and Spring. It builds on core Java concepts including virtual threads, CompletableFuture, lambdas and annotations. The kit requires JDK version 17 or 25, with a recommendation for version 25 to take advantage of virtual threads, as well as Maven 3.9 or higher, a GitHub account, installation of the Copilot CLI version 1.0.71 or later, and is available as a Maven dependency with version 1.0.7-preview.1.

Edward Burns, coordinator of the Jakarta EE 11 release, presented a demonstration application for property request management that runs on the Open Liberty server and uses the PrimeFaces UI with an in-memory H2 database containing ten property listings.When the system receives a property search query, it creates an independent Copilot agent on a virtual thread to process the request through multiple stages, including validation, search and report generation, while updating the user interface in real time via the Jakarta WebSocket protocol.This architecture allows multiple agents to run concurrently through virtual threads that achieve high throughput and full independence without consuming platform threads while waiting.

The kit allows defining model tools in several ways, including direct description via annotations such as @CopilotTool and @CopilotToolParam to specify tool functions and parameters and automatically generate JSON schemas, which requires enabling experimental features in the Maven compiler plugin through a custom flag and specifying the annotation processor path. It also permits using a lambda function for quick definition or overriding built-in tools, as well as scanning tools across different classes. The kit provides fine-grained control over the system message sent to the model through customization mode and replacement of specific parts such as the agent identity while preserving safety controls.

The agent’s entire workflow is executed via a single command that handles reasoning and repeatedly invokes registered tools, feeding results back to the model until a final answer is produced. In enterprise environments, the managed thread pool in the application server is combined with a separate client option to run virtual threads in a context container that ensures access to services and database queries via supported Jakarta protocols, with the ability to precisely define tool permissions for each session to protect the runtime environment.

Don't miss the next story

Subscribe for updates