workflowagent

package
v1.15.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent executes a workflow graph behind an agent-like Generate and Run API.

func New

func New(config Config) (*Agent, error)

New builds a graph-backed agent from workflow edges.

func (*Agent) Description

func (a *Agent) Description() string

func (*Agent) Generate

func (a *Agent) Generate(ctx context.Context, sessionID, input string) (any, error)

Generate runs the workflow graph with session-aware context.

func (*Agent) Graph

func (a *Agent) Graph() *workflow.Graph

func (*Agent) Name

func (a *Agent) Name() string

func (*Agent) ResumeRun added in v1.13.5

func (a *Agent) ResumeRun(ctx context.Context, store workflow.RunStore, runID string) (any, error)

ResumeRun continues a durable graph run from its most recently saved node transition. Completed runs return their saved result without re-executing.

func (*Agent) Run

func (a *Agent) Run(ctx context.Context, input string) (string, error)

Run lets a workflow agent satisfy the root agent.SubAgent interface.

func (*Agent) StartRun added in v1.13.5

func (a *Agent) StartRun(ctx context.Context, store workflow.RunStore, runID, sessionID string, input any) (any, error)

StartRun creates and executes a durable graph run. Use ResumeRun after a transient node failure or process restart.

type Config

type Config struct {
	Name        string
	Description string
	Edges       []workflow.Edge
	MaxSteps    int
}

Config describes a graph-backed agent.

Jump to

Keyboard shortcuts

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