Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 9 min read How-to mediumAdept

Using the GitHub Copilot SDK for Java

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.

Assumes: Java and MavenJakarta EE CDI basicsLLM tool calling

Related posts

  • Building a VSCode Chat Extension to Order Lunch

    Neon mediumAdept

    A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools. Intercepting a real checkout with Chrome DevTools and Postman Interceptor showed that an order takes five calls: create cart, add line, set delivery info, attach payment, and checkout. Each endpoint becomes a JSON-schema tool declared in package.json and implemented with vscode.LanguageModelTool. The main lesson is that raw APIs make poor agent interfaces because they expose sessions and IDs that need extra calls, so they should be wrapped in simplified workflows.

  • Kafka App? There’s a Skill for That

    Etsy Code as Craft mediumAdept

    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. The agent handles the ambiguous parts, such as interpreting the request and picking schemas and fields, then passes structured inputs to versioned scaffolding scripts so the generated code stays deterministic. Telemetry hooks emit start and completion events via protobuf to Kafka and BigQuery. Adoption was initially near zero because agents never offered the Skills. The team fixed this by adding vocabulary-based entry points and repository-level routing, and tightened Kafka ACLs and permissions for least privilege.

  • How to Build GitHub Copilot Extensions

    Neon mediumAdept

    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. The walkthrough builds a Python FastAPI server whose POST /completion endpoint injects a system prompt, forwards the conversation to the Copilot chat completions API using the x-github-token header, and streams the response back as server-sent events. Registration means creating a GitHub App with read-only Copilot Chat and Editor Context permissions, setting its Copilot app type to Agent, and exposing the local server through an ngrok tunnel. Production extensions such as Neon's also need RAG, function calling and analytics, which the post pitches Layer's platform to handle.

  • Open SWE: An Open-Source Framework for Internal Coding Agents

    LangChain mediumAdept

    Open SWE is an MIT-licensed framework for internal coding agents, built on Deep Agents and LangGraph. It packages the patterns that Stripe's Minions, Ramp's Inspect and Coinbase's Cloudbot converged on: per-task isolated cloud sandboxes, a small curated toolset, context drawn from AGENTS.md plus the source Linear issue or Slack thread, subagents for delegated subtasks, and deterministic middleware around the agent loop. Two middleware examples are injecting follow-up messages mid-run and opening a PR if the agent didn't. It is invoked from Slack, Linear and GitHub, and the sandbox provider, model, tools, triggers, prompt and middleware are all pluggable.

  • Skill Issue, Writing /skills to solve agent failures

    Railway mediumAdept

    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. Railway fixed this with Agent Skills, first turning internal runbooks into skills scoped to allowed tools. They then published twelve public skills, but agents were bad at loading and unloading them on demand, so the set was collapsed into a single `use-railway` skill. In that skill, SKILL.md acts as a router that loads one or two intent-specific reference files and supporting scripts. A `railway skills install` CLI command distributes the skills to Claude Code, Cursor, Codex and other agent directories, with background auto-updates.

The quest for software engineering knowledge.

Look:
Layout: