Download: v1.51.0v1.51.0 ↓1.51.02026-11-10
+0
Daily
1,001
stars
373
forks
16
watchers
1,901
prs
942
issues
125
releases

README

!Temporal Go SDK

 Temporal Go SDK  

Temporal is a distributed, scalable, durable, and highly available orchestration engine used to execute asynchronous long-running business logic in a scalable and resilient way.

"Temporal Go SDK" is Temporal's framework for authoring workflows and activities using the Go language.

 Add the SDK to your project

The core Temporal Go SDK packages, including client, worker, and workflow,
are released together as the go.temporal.io/sdk module.

From your application's Go module, run:

bash
go get go.temporal.io/sdk@latest


Then import the packages you need, such as:

go
import (
	"go.temporal.io/sdk/client"
	"go.temporal.io/sdk/worker"
	"go.temporal.io/sdk/workflow"
)


The integrations and tools under contrib are released as separate
Go modules. See each package's README for its module path and version.

 Getting started

See samples to get started.

Documentation is available here.
You can also find the API documentation here.

 Using slog

If using Go version 1.21+ the Go SDK provides built in integration with the standard slog package.


go
package main
import (
	"log/slog"
	"os"

	"go.temporal.io/sdk/client"
	"go.temporal.io/sdk/log"
	"go.temporal.io/sdk/worker"
)

func main() {
	clientOptions := client.Options{
		Logger: log.NewStructuredLogger(
			slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
				AddSource: true,
				Level:     slog.LevelDebug,
			}))),
	}
	temporalClient, err := client.Dial(clientOptions)
	// ...
}


 Workflow determinism checker

See contrib/tools/workflowcheck for a tool to detect non-determinism in Workflow Definitions.

 Contributing
We'd love your help in making the Temporal Go SDK great. Please review our contribution guidelines.

 Development

 Prerequisites

- Go 1.24+ (see go.mod for the minimum supported version)
- NexGen (only needed when updating the go.temporal.io/api dependency)

 Local development workflow

The canonical local commands are provided by the build tool in internal/cmd/build.

Tests are managed through the build tool at internal/cmd/build. This tool handles starting an embedded Temporal dev
server with the required dynamic configs and search attributes, enforces consistent test flags (-race, -count 1, no caching),
and manages coverage collection, so you don't need to manually configure a server or remember the right flags.

bash
cd internal/cmd/build


Run static analysis checks:

bash
go run . check


Run unit tests (all packages except test/):

bash
go run . unit-test


Run integration tests with an embedded Temporal dev server:

bash
go run . integration-test -dev-server


If you omit -dev-server, integration tests connect to a server already running on localhost:7233.

If you update the go.temporal.io/api dependency, run the following command to bring generated code up to date (assuming you have nexgen on your PATH): 

bash
go run . generate


 Test output and logs

By default, the internal build tool only reports test failures. Full test 

Top issues

Latest release

v1.51.0 v1.51.0 2026-11-10
Highlights

 Added

- Added client.Options.RPCTimeout to configure the default RPC timeout cap, including raising it above 10 seconds. Shorter caller deadlines still take precedence, and calls with dedicated timeouts (such as long polls) are unchanged.
- converter.WorkflowTaskFailureError: an opt-in error a PayloadCodec can return from Encode or Decode on a workflow-side payload path to fail the current Workflow Task rather than the Workflow Execution, so the server retries the task and a transient codec failure can recover while the execution stays open. See the WorkflowTaskFailureError 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON