local

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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.

Local runtime is durable by default: every Run/Stream call is journaled via durable-go so an in-process crash can be resumed instead of losing the in-flight agent turn. Import this package and use WithLocalConfig to customize that behavior (change the journal directory, tune retries/timeouts) or opt out entirely by setting [LocalConfig.Durability] to a pointer to false — see DurabilityOff.

Same split as Temporal: LocalConfig knobs build a default engine (like temporal.WithTemporalConfig). [LocalConfig.Engine] is a caller-owned engine for payload codec, journal MAC, step-token key, and other durable-go options (like temporal.WithTemporalClient). The agent does not Close a supplied Engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurabilityOff

func DurabilityOff() *bool

DurabilityOff returns a pointer to false, for [LocalConfig.Durability]. Opts a local runtime out of durable-go entirely, restoring the original pure in-memory execution path (no journal, no resume, no crash recovery — matches pre-durability behavior).

func WithLocalConfig

func WithLocalConfig(cfg *LocalConfig) agent.Option

WithLocalConfig sets durable-go execution configuration for the local runtime. Not calling this option (or passing nil) means the zero-value LocalConfig — durable by default, using an engine constructed from defaults (DataDir "./agent_data/<agent_name>", 7-day auto-purge, no run timeout). Set [LocalConfig.Engine] to supply a pre-built engine (payload codec, journal MAC, step-token key); the caller owns Close. Incompatible with agent.WithTemporalConfig / an opt-in runtime factory: those runtimes don't use LocalRuntime, so a local config would be silently ignored — the agent build fails instead with a clear error.

Types

type LocalConfig

type LocalConfig = internal_local.LocalConfig

LocalConfig configures durable-go-backed execution for the local runtime. See the field docs on github.com/agenticenv/agent-sdk-go/internal/runtime/local.LocalConfig (aliased here) for full semantics: Durability, Engine (caller-owned; TLS/Cloud equivalent), DataDir, AutoPurgeAge, AutoPurgeInterval, AutoPurgeMaxRuns, AutoPurgeMaxBytes, MaxRetries, Timeout, LockTimeout.

Jump to

Keyboard shortcuts

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