Files
awesome-copilot/cookbook/copilot-sdk/java
Bruno Borges e03ccb978a fix: Java cookbook recipes to compile with copilot-sdk-java 0.2.1-java.1
Fix compilation errors and documentation inaccuracies in Java cookbook
recipes against the actual SDK API:

- MultipleSessions: Replace non-existent destroy() with close()
- AccessibilityReport: Replace non-existent McpServerConfig class with
  Map<String, Object> (the actual type accepted by setMcpServers)
- error-handling.md: Replace non-existent session.addTool(),
  ToolDefinition.builder(), and ToolResultObject with actual SDK APIs
  (ToolDefinition.create(), SessionConfig.setTools(),
  CompletableFuture<Object> return type)

All 7 recipes now compile successfully with jbang build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-06 15:20:20 -04:00
..
2026-04-06 15:20:20 -04:00
2026-04-06 15:20:20 -04:00

GitHub Copilot SDK Cookbook — Java

This folder hosts short, practical recipes for using the GitHub Copilot SDK with Java. Each recipe is concise, copypasteable, and points to fuller examples and tests. All examples can be run directly with JBang.

Recipes

  • Ralph Loop: Build autonomous AI coding loops with fresh context per iteration, planning/building modes, and backpressure.
  • Error Handling: Handle errors gracefully including connection failures, timeouts, and cleanup.
  • Multiple Sessions: Manage multiple independent conversations simultaneously.
  • Managing Local Files: Organize files by metadata using AI-powered grouping strategies.
  • PR Visualization: Generate interactive PR age charts using GitHub MCP Server.
  • Persisting Sessions: Save and resume sessions across restarts.
  • Accessibility Report: Generate WCAG accessibility reports using the Playwright MCP server.

Contributing

Add a new recipe by creating a markdown file in this folder and linking it above. Follow repository guidance in CONTRIBUTING.md.

Status

These recipes are complete, practical examples and can be used directly or adapted for your own projects.