Post

1️⃣ Local Java Tools & Structured Output Annotate Java methods with @Tool and @Param to let the agent call your code. With .finishToolSchema(Record.class), the SDK derives the JSON Schema and deserializes the response directly into your Java record. Zero manual parsing.

2️⃣ Real-time Streaming & Thinking Modern Gemini models think before answering. With chatStream(), you stream tokens as they arrive while separating the model's internal chain-of-thought (thoughtsDelta) from the final response text (textDelta). Great for transparent UIs.

3️⃣ Deny-by-default Security Policies Autonomous agents shouldn't have unrestricted privileges. Configure guardrails with Policies.denyIf(...) to intercept and block destructive operations before execution, allow safe read tools, and fall back to denyAll().

5️⃣ GitHub PR Review Agent (Main Demo) Combines custom GitHub tools, review rubrics via Agent Skills, subagents, and lifecycle hooks to compare two competing PRs in LangChain4j, stream thoughts live, and produce an objective review report.

No replies yet.