METAL for iPhone

Read AI news in the METAL app.

Download METAL and discover fresh AI stories every day.

Download on the App Store

For iPhone · Free download

Search for METAL AI Magazine in the App Store on your iPhone.

METAL

GitHub Releases Copilot SDK for Java, Cutting Vendor Lock-in

New SDK lets developers control AI agents directly from Java servers using virtual threads and annotations

GitHub Releases Copilot SDK for Java, Cutting Vendor Lock-in

Summary

  • GitHub has released the GitHub Copilot SDK for Java, distributed as a Maven dependency (1.0.7-preview.1)
  • It supports BYOK (Bring Your Own Key), allowing integration with any model provider including OpenAI, Azure, and Anthropic
  • A sample real estate lead management agent app was released alongside it, built on Jakarta EE 11 and virtual threads

Java code that becomes an AI agent

When a real estate inquiry app receives a query like "find a three-bedroom home in London under 800 million won," the server spins up a virtual thread to create an independent Copilot agent. That agent queries the property database, matches listings to the criteria, and generates a response — all handled in just a few lines of Java code. This is how the GitHub Copilot SDK for Java, released by GitHub on August 10, actually works.

An SDK that breaks framework lock-in

Until now, enterprise Java developers looking to add AI to their apps had only two paths. Using Langchain4j — a library that abstracts away AI model providers for the Java ecosystem — avoids lock-in to a specific AI vendor, but ties the developer to Langchain4j itself. Using Spring AI means following the Spring Framework's own design conventions.

GitHub describes this new SDK as a tool that is "truly framework-agnostic." On top of that, it adds BYOK (Bring Your Own Key) support, enabling free connections to OpenAI, Azure, Anthropic, and even OpenAI-compatible endpoints. Notably, developers can use the SDK without a GitHub Copilot subscription simply by passing their own base URL and API key.

Familiar syntax for Java developers

The SDK relies on tools Java developers already know well: CompletableFuture, annotations, lambdas, and virtual threads. Virtual threads, officially introduced in Java 21, are a lightweight threading model that allows thousands of concurrent requests to be handled with minimal system resources. The core API is the @CopilotTool annotation. Developers who have written a @GET endpoint for a REST API will find the process of defining tools for AI to call familiar.

Jakarta EE is the enterprise standard platform carried forward by the Java community after Oracle handed it off. GitHub built this sample application on Jakarta EE 11, a choice that appears intended to underscore the SDK's framework-agnostic design philosophy.

Sample app: a real estate lead pipeline

The released sample application is a real estate lead management agent that automatically matches customer inquiries to property listings. Submitting multiple inquiries at once shows separate Copilot sessions running in parallel, each on its own virtual thread. Because the server pushes processing steps to the browser in real time via Jakarta WebSocket, users can watch on screen as the agent calls tools and moves through each stage.

ComponentTechnology Used
RuntimeOpen Liberty 26.0.0.5
PlatformJakarta EE 11 (Faces 4.1, CDI 4.1, WebSocket 2.2, Data 1.0, Persistence 3.2)
UIPrimeFaces 15.0.16
AI OrchestrationCopilot SDK for Java 1.0.7-preview.1
DatabaseH2 in-memory (seeded with 10 listings)

Requirements and deployment

The SDK is distributed as a Maven dependency and requires JDK 17 or 25 to run. GitHub recommends version 25, as it allows full use of the latest features, including virtual threads. Prerequisites include Maven 3.9 or higher, a GitHub account with an active Copilot subscription, and Copilot CLI version 1.0.71 or higher.

RequirementValue
SDK Version1.0.7-preview.1
JDK17 or 25 (25 recommended)
Maven3.9 or higher
Copilot CLI1.0.71 or higher

So what changes

Until now, adding AI to Java projects meant committing to a specific ecosystem, whether Langchain4j or Spring AI. This SDK challenges that premise. Its core contribution is expanding choice on both the framework side and the model provider side. For companies maintaining enterprise Java codebases, it opens a path to add AI agent capabilities without disturbing existing CI/CD, build tools, or deployment pipelines. Since it's still in preview, caution is warranted before adopting it in production until the API stabilizes — but for developers already familiar with the Java ecosystem, the barrier to entry is clearly low, since they can start testing it immediately without a steep learning curve.

Comments