---
title: "Using the GitHub Copilot SDK for Java"
description: "GitHub Copilot SDK for Java lets server-side Java code create agent sessions, register tools, send prompts and stream events without depending on Langchain4j or Spring AI, and with BYOK it can target OpenAI, Azure, Anthropic or compatible endpoints."
url: "https://swe.quest/articles/using-the-github-copilot-sdk-for-java-66dac2758b7e2365"
canonical: "https://github.blog/engineering/using-the-github-copilot-sdk-for-java/"
source: "GitHub Engineering"
published: "2026-08-10"
difficulty: "medium"
kind: "How-to"
reading_minutes: 9
tags: ["jvm","ai-agents","llms","concurrency"]
---

# Using the GitHub Copilot SDK for Java

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2026-08-10, 9 min read, How-to. Original: [https://github.blog/engineering/using-the-github-copilot-sdk-for-java/](https://github.blog/engineering/using-the-github-copilot-sdk-for-java/)

## Summary

GitHub Copilot SDK for Java lets server-side Java code create agent sessions, register tools, send prompts and stream events without depending on Langchain4j or Spring AI, and with BYOK it can target OpenAI, Azure, Anthropic or compatible endpoints. A Jakarta EE 11 real-estate lead pipeline on Open Liberty demonstrates the core APIs: annotation-based tools via @CopilotTool (experimental, needs an annotation processor and compiler flag), inline lambda tools, section-level system message overrides, a one-line sendAndWait agentic loop, and session.on event streaming pushed over WebSocket. The key integration point is passing a ManagedThreadFactory-backed virtual-thread Executor so tool callbacks keep CDI, JNDI and transaction context, while ToolSet restricts which built-in tools each session can use in production.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Java & JVM](https://swe.quest/tags/jvm.md) (Languages)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)

## Prerequisites

- Java and Maven ([easy posts on Java & JVM](https://swe.quest/tags/jvm.md?difficulty=easy))
- Jakarta EE CDI basics
- LLM tool calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

GitHub Copilot SDK for Java, Jakarta EE 11, Open Liberty, virtual threads, Copilot CLI, PrimeFaces, Jakarta Concurrency

## Related posts

- [Building a VSCode Chat Extension to Order Lunch](https://swe.quest/articles/building-a-vscode-chat-extension-to-order-lunch-64da87e69c43d744.md): Neon · 2025-03-07 · Medium · 6 min read · AI agents, Developer tools, TypeScript, API design
  A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools.
- [Kafka App? There’s a Skill for That](https://swe.quest/articles/kafka-app-there-s-a-skill-for-that-db613ac72530c591.md): Etsy Code as Craft · 2026-07-31 · Medium · 6 min read · AI agents, AI for coding, Stream processing, Developer productivity, Queues & messaging
  Etsy's streaming platform team built Agent Skills that let coding agents like Claude scaffold, validate, run locally and open PRs for Kafka streaming apps that produce ML features and embeddings.
- [How to Build GitHub Copilot Extensions](https://swe.quest/articles/how-to-build-github-copilot-extensions-be22dc85804ae8a3.md): Neon · 2025-02-06 · Medium · 5 min read · AI for coding, AI agents, Python, Developer tools
  GitHub Copilot extensions are plain HTTP servers that GitHub calls whenever a user mentions the extension in Copilot Chat, so they can be written in any language.
- [Open SWE: An Open-Source Framework for Internal Coding Agents](https://swe.quest/articles/open-swe-an-open-source-framework-for-internal-coding-agents-1b0f7521a5a00040.md): LangChain · 2026-10-13 · Medium · 8 min read · AI agents, AI for coding, Open source, Sandboxing & isolation
  Open SWE is an MIT-licensed framework for internal coding agents, built on Deep Agents and LangGraph.
- [Skill Issue, Writing /skills to solve agent failures](https://swe.quest/articles/skill-issue-writing-skills-to-solve-agent-failures-84b24819a17adea0.md): Railway · 2026-06-24 · Medium · 6 min read · AI agents, AI for coding, Developer tools
  Agents driving Railway failed because they lacked platform knowledge: they guessed CLI flags, ignored the 30-tool MCP server unless told to call it, and invented features.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
