modules

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package modules defines the interface every autopilot module must implement. Modules are self-contained capabilities (email, calendar, finance, etc.) that register tools and scheduled tasks with the agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module interface {
	// Name returns the unique identifier for this module (e.g. "email", "finance").
	Name() string

	// Description returns a human-readable summary of what the module does.
	Description() string

	// Tools returns the set of tools this module exposes to the agent.
	Tools() []agent.Tool

	// ScheduledTasks returns tasks that should run on a cron schedule.
	ScheduledTasks() []ScheduledTask

	// Init configures the module with its config section and a memory store
	// for persisting state. Called once at startup before any tools or tasks run.
	Init(cfg map[string]any, mem *memory.Store) error
}

Module is the interface that every autopilot module must satisfy. Modules provide tools the agent can call during conversations and scheduled tasks that run automatically on cron expressions.

type ScheduledTask

type ScheduledTask struct {
	Name string
	Cron string // standard 5-field cron expression: minute hour day month weekday
	Task func(ctx context.Context, a *agent.Agent) error
}

ScheduledTask represents a recurring job tied to a cron expression. The agent is passed in so the task can call tools, send notifications, or trigger autonomous runs.

Directories

Path Synopsis
Package finance provides portfolio monitoring, stock quotes, price alerts, and market briefings.
Package finance provides portfolio monitoring, stock quotes, price alerts, and market briefings.
Package monitor watches URLs for meaningful content changes and alerts the user when something important changes.
Package monitor watches URLs for meaningful content changes and alerts the user when something important changes.

Jump to

Keyboard shortcuts

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