sdk-go is a free, open source orchestration & scheduling project written in Go and released under MIT. It has 996 GitHub stars, 368 forks and 229 open issues, and was last pushed 3 days ago. On this registry it ranks #99 of 130 tracked projects in Orchestration & Scheduling, with 5 head-to-head comparisons available. It gained 18 stars over the last 30 tracked days.

What is sdk-go?

The Temporal Go SDK is the official Go framework for authoring workflows and activities against Temporal, a distributed, scalable, durable, and highly available orchestration engine that executes asynchronous long-running business logic in a resilient way, and it is aimed at Go developers who need durable execution inside production services.

What it is

The Temporal Go SDK is Temporal's framework for authoring workflows and activities in the Go language. The core packages, including client, worker, and workflow, are released together as the go.temporal.io/sdk module. The integrations and tools under contrib are released separately as their own Go modules, each with its own module path and version. The project is licensed under MIT and lives in the Infrastructure and Operations / Orchestration and Scheduling category, among topics such as durable-execution, orchestration, workflow-engine, workflow-management-system, and service-bus.

The concrete problem it solves is coordination of asynchronous, long-running business logic that must survive process restarts and partial failures. Rather than hand-building retry loops, state machines, and scheduling glue on top of a service bus or a queue, a Go developer defines workflows and activities, registers them with a worker, and lets the Temporal engine track execution history and durability. The SDK is the authoring and worker-side layer; the Temporal server provides the durable orchestration engine that the SDK connects to.

Key capabilities

  • Core packages client, worker, and workflow ship together in the single go.temporal.io/sdk module, so client and worker code stay on one version.
  • Workflows and activities are authored directly in Go and registered through the worker package.
  • Built-in integration with the standard slog package on Go 1.21 and above, via log.NewStructuredLogger passed into client.Options{Logger: ...}, including a slog.NewJSONHandler with AddSource and a configurable level.
  • A workflow determinism checker at contrib/tools/workflowcheck detects non-determinism in workflow definitions.
  • Integrations and tools under contrib are distributed as independent Go modules with their own module paths and versions.
  • A build tool at internal/cmd/build exposes go run . check, go run . unit-test, and go run . integration-test -dev-server, and starts an embedded Temporal dev server with the required dynamic configs and search attributes.
  • The build tool enforces consistent test flags (-race, -count 1, no caching), manages coverage collection, writes logs to .build/test-logs, and supports -console-output full and -log-dir.

Who uses it and how

  • Go teams building durable, long-running asynchronous business logic that must run on Temporal's orchestration engine.
  • Application developers who install the SDK into an existing Go module and import client, worker, and workflow alongside their own service code.
  • Engineers running integration tests: with -dev-server the build tool starts an embedded Temporal dev server, while omitting the flag connects the tests to a server already listening on localhost:7233.
  • Platform or framework maintainers who run contrib/tools/workflowcheck over workflow definitions to catch non-determinism before deployment.
  • Contributors developing the SDK itself, who need Go 1.24 or newer as declared in go.mod.

Getting started

From an application's Go module, run go get go.temporal.io/sdk@latest, then import the packages needed, such as go.temporal.io/sdk/client, go.temporal.io/sdk/worker, and go.temporal.io/sdk/workflow. The samples repository at temporalio/samples-go, the documentation at docs.temporal.io, and the API reference on pkg.go.dev are the published entry points.

How it compares

This registry's facts name no competing SDKs or paid products that the project replaces, so it stands alone here as the Go-specific authoring layer for Temporal. Comparisons against other orchestration tooling can only be made against Temporal itself, which is the engine the SDK targets.

When to use it — and when not to

A self-hoster must operate the Temporal server or cluster that the SDK's workers connect to, since this repository supplies the client and worker library rather than the orchestration engine, and it also needs a Go 1.24 or newer toolchain for development. Teams that do not run Go, or that want a managed orchestration service without operating a server, should not pick it up. The README is thin: it covers installation, slog wiring, and the internal build tool, but leaves workflow semantics to external documentation and the samples repository, and the repository carries 229 open issues, so expect to lean on docs and community support rather than the README alone.

project readme (upstream, from github) — read inline

Temporal Go SDK

Temporal Go SDK Build Status PkgGoDev

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:

go get go.temporal.io/sdk@latest

Then import the packages you need, such as:

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.

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)

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.

cd internal/cmd/build

Run static analysis checks:

go run . check

Run unit tests (all packages except test/):

go run . unit-test

Run integration tests with an embedded Temporal dev server:

go run . integration-test -dev-server

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

Test output and logs

By default, the internal build tool only reports test failures. Full test output is written to .build/test-logs at the repository root.

To show full test and dev-server output in the console while still saving the log files, use -console-output full:

go run . unit-test -console-output full
go run . integration-test -dev-server -console-output full

Use -log-dir to write the files elsewhere. Relative paths are resolved from the repository root, and absolute paths are also accepted:

go run . integration-test -dev-server -log-dir artifacts/test-logs

Running specific tests

Use -run with the same semantics as go test -run.

Unit tests:

go run . unit-test -run "TestMyFunction"

Integration tests:

# Single test in a suite
go run . integration-test -dev-server -run "TestIntegrationSuite/TestMyTest"

# Entire suite
go run . integration-test -dev-server -run "TestWorkerTunerTestSuite"

Coverage

Unit test coverage (writes per-package profiles under .build/coverage):

go run . unit-test -coverage

Integration test coverage:

go run . integration-test -dev-server -coverage-file integration-test.out

Merge coverage files:

go run . merge-coverage-files coverage.out

Go module housekeeping

If dependencies change, tidy all modules:

find . -name go.mod -execdir go mod tidy \;

Pull request checklist

Before opening or updating a pull request:

  • Run go run . check from internal/cmd/build.
  • Run relevant tests (unit-test and, when needed, integration-test -dev-server).
  • Keep changes focused and include tests for behavior changes.
  • Update documentation/comments when public behavior changes.

Go SDK upgrading past v1.25.1

Go SDK version v1.26.0 switched from using https://github.com/gogo/protobuf to https://github.com/golang/protobuf. While this migration is mostly internal there are a few user visible changes to be aware of:

Change in types

Incompatible proto/json encoding

Proto enums will, when formatted to JSON, now be in SCREAMING_SNAKE_CASE rather than PascalCase. * If trying to deserialize old JSON with PascalCase to proto use go.temporal.io/api/temporalproto.

If users used Temporal proto types in their Workflows, such as for activity output, users may need to modify the default data converter to handle these payloads.

	converter.NewProtoJSONPayloadConverterWithOptions(converter.ProtoJSONPayloadConverterOptions{
		LegacyTemporalProtoCompat: true,
	}),

While upgrading from Go SDK version = 1.26.0 users may want to also bias towards using proto binary to avoid any potential incompatibilities due to having clients serialize messages with incompatible proto/json format.

On clients running Go SDK = 1.26.0

converter.NewCompositeDataConverter(
		converter.NewNilPayloadConverter(),
		converter.NewByteSlicePayloadConverter(),
		converter.NewProtoPayloadConverter(),
		converter.NewProtoJSONPayloadConverterWithOptions(converter.ProtoJSONPayloadConverterOptions{
			LegacyTemporalProtoCompat: true,
		}),
		converter.NewJSONPayloadConverter(),
	)

Note: Payloads encoded with proto/binary will not be readable in the Temporal web UI.

License

MIT License, please see LICENSE for details.

Frequently asked questions

Is sdk-go free to use?

sdk-go is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does sdk-go do?

Temporal Go SDK

What is sdk-go written in?

sdk-go is primarily written in Go. Its source is publicly available at https://github.com/temporalio/sdk-go, and it has 996 GitHub stars.