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, plus the hook pkg/agent/runtime/local uses to reach pkg/agent's unexported agentConfig fields for local's built-in (not opt-in) durability config. Local runtime itself is still built directly by pkg/agent and does not implement RuntimeFactory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterWithLocalConfigHook ¶ added in v0.3.6
func RegisterWithLocalConfigHook(h func(*internal_local.LocalConfig) LocalConfigOption)
RegisterWithLocalConfigHook is called once from pkg/agent so github.com/agenticenv/agent-sdk-go/pkg/agent/runtime/local can attach durable-go config for the (always-built-in, non-opt-in) local runtime without an exported agent.WithLocalConfig — the same reasoning as RegisterWithRuntimeFactoryHook, applied to local instead of Temporal/Restate.
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 LocalConfigOption ¶ added in v0.3.6
type LocalConfigOption any
LocalConfigOption is an opaque agent option. Concrete type is pkg/agent.Option; pkg/agent/runtime/local type-asserts when returning to agent.NewAgent.
func WithLocalConfig ¶ added in v0.3.6
func WithLocalConfig(cfg *internal_local.LocalConfig) LocalConfigOption
WithLocalConfig attaches durable-go configuration for the local runtime. Used by pkg/agent/runtime/local only.
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 local provides durable-go configuration for the local (in-process) execution runtime used by agent.NewAgent when no opt-in runtime factory (Temporal, Restate) is configured.
|
Package local provides durable-go configuration for the local (in-process) execution runtime used by agent.NewAgent when no opt-in runtime factory (Temporal, Restate) is configured. |
|
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. |