samples-java  by temporalio

Durable AI agents and complex workflows

Created 6 years ago
255 stars

Top 98.8% on SourcePulse

GitHubView on GitHub
Project Summary

This repository offers a comprehensive collection of samples for the Temporal Java SDK, targeting developers building resilient, distributed, and durable applications. It provides practical examples to understand and implement various Temporal features and integrations, accelerating adoption and development with the Java ecosystem.

How It Works

This repository provides a comprehensive suite of samples for the Temporal Java SDK, designed to illustrate its capabilities for building resilient, distributed applications. It covers core SDK features like workflow definitions, activity execution, signaling, querying, and error handling. The samples also demonstrate advanced integrations, including seamless Spring Boot auto-configuration for application development and sophisticated use cases with Spring AI, enabling durable AI agents with chat models, tools, and vector stores.

Quick Start & Requirements

  • Requirements: Java 17+, a local Temporal Server (Temporal CLI is recommended for ease of setup).
  • Build: Clone the repository (git clone https://github.com/temporalio/samples-java), navigate into the directory (cd samples-java), and build using Gradle (./gradlew build).
  • Running Samples: Core and Spring Boot samples can be run from the main project directory. Specific Gradle commands are detailed within each sample's README. Spring Boot samples can be launched with ./gradlew :springboot:bootRun or ./gradlew :springboot-basic:bootRun. Spring AI samples require specific commands like ./gradlew :springai:basic:bootRun.
  • Links: Temporal Server repo, Java SDK repo, Java SDK Guide.

Highlighted Details

  • Extensive coverage of Temporal Java SDK features, from basic activity execution and asynchronous operations to complex patterns like SAGA, cron schedules, and custom DSLs.
  • Deep integration examples with Spring Boot, showcasing auto-configuration and application development patterns, and with Spring AI for building durable AI agents with various tool integrations and retrieval-augmented generation.
  • Demonstrations of advanced system design patterns including worker versioning, Nexus integration for external service orchestration, and robust error handling with retries and cancellation scopes.
  • Practical examples for observability (SDK metrics, OpenTelemetry tracing with Jaeger) and data security (payload encryption, custom payload converters).

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), or roadmap were found in the provided README.

Licensing & Compatibility

The license type and compatibility notes for commercial use or closed-source linking are not explicitly stated in the provided README.

Limitations & Caveats

Some Spring AI samples require specific API keys (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY) and may need additional setup as detailed in their respective sources. The breadth of samples may present a learning curve for new users.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Starred by Gagan Bansal Gagan Bansal(Coauthor of AutoGen; Research Scientist at Microsoft Research), Elvis Saravia Elvis Saravia(Founder of DAIR.AI), and
1 more.

agent-framework by microsoft

1.2%
12k
AI agent and multi-agent workflow framework
Created 1 year ago
Updated 22 hours ago
Feedback? Help us improve.