Documentation
¶
Overview ¶
Package serverless exposes AGNT5 workflows as signed HTTP endpoints without running a persistent worker process.
Index ¶
- Constants
- func RegisterAgent(h *Handler, agent Agent) error
- func RegisterFunction[In any, Out any](h *Handler, name string, fn func(*Context, In) (Out, error)) error
- func RegisterTool(h *Handler, tool Tool) error
- func RegisterWorkflow[In any, Out any](h *Handler, name string, fn func(*Context, In) (Out, error)) error
- func Step[T any](ctx *Context, name string, fn func(context.Context) (T, error)) (T, error)
- func WaitForSignal[T any](ctx *Context, signalName, waitingStep string) (T, error)
- type Agent
- type AgentInput
- type AgentResult
- type AgentSessionCheckpoint
- type Context
- type Event
- type Handler
- type Message
- type Options
- type OutputRef
- type OutputUpload
- type PayloadRef
- type Suspension
- type Tool
- type UserInput
- type UserInputOption
Constants ¶
View Source
const ( ProtocolVersion = "workerless.v1" SignatureVersion = "workerless-hmac-sha256.v1" ManifestPath = "/.well-known/agnt5" InvokePath = "/agnt5/invoke" )
Variables ¶
This section is empty.
Functions ¶
func RegisterAgent ¶
func RegisterFunction ¶
func RegisterTool ¶
func RegisterWorkflow ¶
Types ¶
type Agent ¶
type Agent struct {
Name string
Description string
Run func(*Context, AgentInput) (AgentResult, error)
}
type AgentInput ¶
type AgentResult ¶
type AgentSessionCheckpoint ¶
type Context ¶
type Context struct {
context.Context
RunID string
Attempt int
ComponentName string
Metadata map[string]string
// contains filtered or unexported fields
}
func (*Context) YieldIfNeeded ¶
type OutputUpload ¶
type PayloadRef ¶
type Suspension ¶
type Suspension struct {
Reason string
ReadyAtMS int64
TimerKey string
SignalName string
WaitingStep string
PauseIndex int
StepName string
Question string
InputType string
Options []UserInputOption
AllowCustom bool
Skippable bool
}
func (*Suspension) Error ¶
func (s *Suspension) Error() string
type UserInput ¶
type UserInput struct {
Question string
Type string
Options []UserInputOption
AllowCustom bool
Skippable bool
}
type UserInputOption ¶
Click to show internal directories.
Click to hide internal directories.