runtime

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package runtime holds the opt-in execution-runtime factory contract used by github.com/agenticenv/agent-sdk-go/pkg/agent and the temporal/restate subpackages. Local runtime is built directly by pkg/agent and does not use RuntimeFactory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWithRuntimeFactoryHook

func RegisterWithRuntimeFactoryHook(h func(RuntimeFactory) RuntimeFactoryOption)

RegisterWithRuntimeFactoryHook is called once from pkg/agent so opt-in packages can attach a RuntimeFactory without an exported agent.WithRuntimeFactory.

Types

type RuntimeFactory

type RuntimeFactory interface {
	// Name identifies the runtime ("temporal", "restate").
	Name() string
	// Validate checks factory-specific options before the agent is built.
	Validate() error
	// Build constructs the execution runtime.
	Build(params *RuntimeParams, remoteWorker bool) (internal_runtime.Runtime, error)
}

RuntimeFactory builds an opt-in agent execution runtime (Temporal, Restate, …).

type RuntimeFactoryOption

type RuntimeFactoryOption any

RuntimeFactoryOption is an opaque agent option. Concrete type is pkg/agent.Option; callers in opt-in packages type-assert when returning to agent.NewAgent.

func WithRuntimeFactory

func WithRuntimeFactory(f RuntimeFactory) RuntimeFactoryOption

WithRuntimeFactory attaches a runtime factory to the agent config. Used by pkg/agent/runtime/temporal and pkg/agent/runtime/restate only.

type RuntimeName

type RuntimeName string
const (
	RuntimeNameTemporal RuntimeName = "temporal"
	RuntimeNameRestate  RuntimeName = "restate"
)

type RuntimeParams

type RuntimeParams struct {
	Logger                   logger.Logger
	AgentSpec                internal_runtime.AgentSpec
	AgentConfig              internal_runtime.AgentConfig
	ApprovalHandler          types.ApprovalHandler
	Tracer                   interfaces.Tracer
	Metrics                  interfaces.Metrics
	ToolExecutionMode        types.AgentToolExecutionMode
	ToolsResolver            func(context.Context) ([]interfaces.Tool, error)
	PolicyFingerprint        string
	MCPFingerprint           string
	A2AFingerprint           string
	ObservabilityFingerprint string
	RetrieverFingerprint     string
	HooksFingerprint         string
	AgentMode                string
	DisableLocalWorker       bool
	DisableFingerprintCheck  bool
}

RuntimeParams is the agent wiring snapshot passed to RuntimeFactory.Build.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package restate provides Restate options for agent.NewAgent.
Package restate provides Restate options for agent.NewAgent.
Package temporal provides Temporal options for agent.NewAgent.
Package temporal provides Temporal options for agent.NewAgent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL