Discover Packages
github.com/agenticenv/durable-go
examples
agent
command
Version:
v0.0.0-...-a4802bf
Opens a new window with list of versions in this module.
Published: Sep 6, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Agent Example — Struct / Method Receiver Style
Demonstrates AgentRunner, a struct with injected dependencies (OpenAIClient, Database)
that implements durable.Task directly via an Exec method.
This is the idiomatic pattern for production services and local AI agents where
dependencies are constructed once and reused across task runs.
Run
go run .
Reset
rm examples/agent/.data/agent.db
Expand ▾
Collapse ▴
Documentation
¶
Package main demonstrates the struct / method-receiver style of durable-go.
AgentRunner is a production-style struct with injected dependencies.
It implements durable.Task[AgentInput, AgentOutput] so it can be passed
directly to durable.Run – no adapter or wrapper needed.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.