Problem
agentflow4j-samples ships demos against Mistral and Ollama. There is no sample showing AgentFlow4J wired to Anthropic Claude — one of the most widely used providers.
Task
Add ClaudeResearchDemo.java to agentflow4j-samples:
- Two-agent graph: a researcher (
ExecutorAgent) + a writer (ExecutorAgent)
CoordinatorAgent with RoutingStrategy.llmDriven(chatClient)
BudgetPolicy capping the run at $0.10
- Falls back to stubs when
ANTHROPIC_API_KEY is not set (same pattern as existing demos)
Spring AI dependency to add
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-anthropic</artifactId>
</dependency>
Acceptance criteria
- Demo runs with
ANTHROPIC_API_KEY set
- Demo runs in stub mode without any API key
- Follows the existing demo structure (see
MistralIntegrationDemo.java)
- Listed in the samples table in
docs/samples.md
Notes
Good first issue — the pattern is established in MistralIntegrationDemo.java, this is a straight adaptation.
Problem
agentflow4j-samplesships demos against Mistral and Ollama. There is no sample showing AgentFlow4J wired to Anthropic Claude — one of the most widely used providers.Task
Add
ClaudeResearchDemo.javatoagentflow4j-samples:ExecutorAgent) + a writer (ExecutorAgent)CoordinatorAgentwithRoutingStrategy.llmDriven(chatClient)BudgetPolicycapping the run at $0.10ANTHROPIC_API_KEYis not set (same pattern as existing demos)Spring AI dependency to add
Acceptance criteria
ANTHROPIC_API_KEYsetMistralIntegrationDemo.java)docs/samples.mdNotes
Good first issue — the pattern is established in
MistralIntegrationDemo.java, this is a straight adaptation.