Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 Changes in this version + type AgentConfig struct + BaseType string + MaxTurns int + Model string + Skills []string + Slug string + SystemPrompt string + Tools []string + type DBJobStore struct + func NewDBJobStore(database *db.DB) *DBJobStore + func (s *DBJobStore) CreateJob(ctx context.Context, job *Job) error + func (s *DBJobStore) CreateRun(ctx context.Context, run *JobRun) error + func (s *DBJobStore) DeleteJob(ctx context.Context, id, ownerID string) error + func (s *DBJobStore) GetJob(ctx context.Context, id string) (*Job, error) + func (s *DBJobStore) GetRun(ctx context.Context, id string) (*JobRun, error) + func (s *DBJobStore) ListJobs(ctx context.Context, ownerID string) ([]*Job, error) + func (s *DBJobStore) ListRuns(ctx context.Context, jobID string, limit int) ([]*JobRun, error) + func (s *DBJobStore) UpdateJob(ctx context.Context, job *Job) error + func (s *DBJobStore) UpdateRun(ctx context.Context, run *JobRun) error + type Job struct + Agent AgentConfig + CreatedAt time.Time + Description string + ID string + LastRunAt *time.Time + LastRunStatus string + Name string + NextRunAt *time.Time + OwnerID string + Status JobStatus + Task string + Trigger Trigger + UpdatedAt time.Time + type JobRun struct + EndedAt *time.Time + Error string + ID string + JobID string + Output string + StartedAt time.Time + Status RunStatus + type JobScheduler struct + func NewJobScheduler(store JobStore, runner *Runner) *JobScheduler + func (s *JobScheduler) AddJob(ctx context.Context, job *Job) error + func (s *JobScheduler) GetJob(ctx context.Context, id string) (*Job, error) + func (s *JobScheduler) GetRun(ctx context.Context, id string) (*JobRun, error) + func (s *JobScheduler) ListJobs(ctx context.Context, ownerID string) ([]*Job, error) + func (s *JobScheduler) ListRuns(ctx context.Context, jobID string, limit int) ([]*JobRun, error) + func (s *JobScheduler) PauseJob(ctx context.Context, id string) error + func (s *JobScheduler) RemoveJob(ctx context.Context, id, ownerID string) error + func (s *JobScheduler) ResumeJob(ctx context.Context, id string) error + func (s *JobScheduler) Run(ctx context.Context) error + func (s *JobScheduler) RunNow(ctx context.Context, id string) (*JobRun, error) + func (s *JobScheduler) SetLogger(l *log.Logger) + func (s *JobScheduler) SetRunnerResolver(resolver RunnerResolver) + func (s *JobScheduler) UpdateJob(ctx context.Context, job *Job) error + type JobStatus string + const JobStatusActive + const JobStatusInactive + const JobStatusPaused + type JobStore interface + CreateJob func(ctx context.Context, job *Job) error + CreateRun func(ctx context.Context, run *JobRun) error + DeleteJob func(ctx context.Context, id, ownerID string) error + GetJob func(ctx context.Context, id string) (*Job, error) + GetRun func(ctx context.Context, id string) (*JobRun, error) + ListJobs func(ctx context.Context, ownerID string) ([]*Job, error) + ListRuns func(ctx context.Context, jobID string, limit int) ([]*JobRun, error) + UpdateJob func(ctx context.Context, job *Job) error + UpdateRun func(ctx context.Context, run *JobRun) error + type RunStatus string + const RunStatusError + const RunStatusRunning + const RunStatusSuccess type RunnerConfig + DoclingURL string + RAGService *rag.Service + WebSearchKeys map[string]string + type RunnerResolver func(ctx context.Context, ownerID string, agentSlug string, modelOverride string) (*Runner, AgentConfig, error) + type Trigger struct + Cron string + Interval time.Duration + RunAt *time.Time + Type TriggerType + func (t Trigger) String() string + func (t Trigger) ToSchedule() (Schedule, error) + type TriggerType string + const TriggerTypeCron + const TriggerTypeInterval + const TriggerTypeOnce v0.1.0 Jun 22, 2026 Changes in this version + type CronSchedule struct + func Cron(expr string) (*CronSchedule, error) + func MustCron(expr string) *CronSchedule + func (c *CronSchedule) Next(from time.Time) time.Time + func (c *CronSchedule) String() string + type DiscardSink struct + func (DiscardSink) Write(_ context.Context, _ Result) error + type ExecuteConfig struct + ModelOverride string + StreamFn func(string) + SystemPrompt string + type ExecuteFunc func(ctx context.Context, w Workflow, opts Options) (Result, error) + type ExecutionState struct + ConsecErrors int + FailureCount int64 + LastError string + LastRunAt time.Time + LastStatus string + NextRunAt time.Time + RunCount int64 + SuccessCount int64 + WorkflowName string + type Executor struct + func NewExecutor(cfg ExecutorConfig) (*Executor, error) + func (e *Executor) Close() + func (e *Executor) Run(ctx context.Context, w Workflow, opts Options) (Result, error) + type ExecutorConfig struct + Middleware []Middleware + RunnerConfig RunnerConfig + Sinks []Sink + State StateStore + type FileSink struct + Dir string + Format string + func (s *FileSink) Write(ctx context.Context, r Result) error + type FileStateStore struct + Dir string + func NewFileStateStore(dir string) (*FileStateStore, error) + func (f *FileStateStore) Delete(_ context.Context, name string) error + func (f *FileStateStore) List(_ context.Context) ([]ExecutionState, error) + func (f *FileStateStore) Load(_ context.Context, name string) (*ExecutionState, error) + func (f *FileStateStore) Save(_ context.Context, s ExecutionState) error + type IntervalSchedule struct + Interval time.Duration + func Every(d time.Duration) *IntervalSchedule + func (s *IntervalSchedule) Next(from time.Time) time.Time + func (s *IntervalSchedule) String() string + type MemoryStateStore struct + func NewMemoryStateStore() *MemoryStateStore + func (m *MemoryStateStore) Delete(_ context.Context, name string) error + func (m *MemoryStateStore) List(_ context.Context) ([]ExecutionState, error) + func (m *MemoryStateStore) Load(_ context.Context, name string) (*ExecutionState, error) + func (m *MemoryStateStore) Save(_ context.Context, s ExecutionState) error + type Middleware func(next ExecuteFunc) ExecuteFunc + func Chain(middlewares ...Middleware) Middleware + func WithLogging(logger *log.Logger) Middleware + func WithMetrics(onResult func(Result)) Middleware + func WithRecovery() Middleware + func WithRetry(maxAttempts int, backoff time.Duration) Middleware + func WithTimeout(d time.Duration) Middleware + type MultiSink struct + Sinks []Sink + func NewMultiSink(sinks ...Sink) *MultiSink + func (m *MultiSink) Write(ctx context.Context, r Result) error + type OnceSchedule struct + At time.Time + func Once(at time.Time) *OnceSchedule + func (s *OnceSchedule) Next(from time.Time) time.Time + func (s *OnceSchedule) String() string + type Options struct + DryRun bool + Extra map[string]any + MaxRetries int + Model string + RetryBackoff time.Duration + Timeout time.Duration + func DefaultOptions() Options + func (o *Options) Set(key string, value any) + func (o Options) Get(key string) any + func (o Options) WithDryRun() Options + func (o Options) WithModel(model string) Options + func (o Options) WithRetry(maxRetries int, backoff time.Duration) Options + func (o Options) WithTimeout(d time.Duration) Options + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Get(name string) (Workflow, bool) + func (r *Registry) Len() int + func (r *Registry) List() []Workflow + func (r *Registry) MustRegister(w Workflow) + func (r *Registry) Names() []string + func (r *Registry) Register(w Workflow) error + func (r *Registry) Unregister(name string) + type Result struct + Duration time.Duration + Error error + FinishedAt time.Time + Metadata map[string]any + Output string + StartedAt time.Time + WorkflowName string + func (r Result) Success() bool + type Runner struct + func NewRunner(cfg RunnerConfig) (*Runner, error) + func (r *Runner) Close() + func (r *Runner) Execute(ctx context.Context, w Workflow, ec ExecuteConfig) error + type RunnerConfig struct + MaxTokens int + Model sdk.ModelIdentifier + ProviderConfig *providers.Config + type Schedule interface + Next func(from time.Time) time.Time + String func() string + type ScheduledRun struct + NextRun time.Time + Schedule string + WorkflowName string + type Scheduler struct + func NewScheduler(executor *Executor) *Scheduler + func (s *Scheduler) Add(w Workflow, schedule Schedule, opts Options) *Scheduler + func (s *Scheduler) Next() []ScheduledRun + func (s *Scheduler) Run(ctx context.Context) error + func (s *Scheduler) RunNow(ctx context.Context, name string, opts Options) (Result, error) + type Sink interface + Write func(ctx context.Context, r Result) error + type StateStore interface + Delete func(ctx context.Context, workflowName string) error + List func(ctx context.Context) ([]ExecutionState, error) + Load func(ctx context.Context, workflowName string) (*ExecutionState, error) + Save func(ctx context.Context, state ExecutionState) error + type StdoutSink struct + Quiet bool + func (s *StdoutSink) Write(_ context.Context, r Result) error + type SystemPrompter interface + SystemPrompt func() string + type WebhookSink struct + Headers map[string]string + Timeout time.Duration + URL string + func NewWebhookSink(url string) *WebhookSink + func (s *WebhookSink) Write(ctx context.Context, r Result) error + type Workflow interface + Description func() string + Name func() string + Run func(ctx context.Context, session *sdk.Session) error