Documentation
¶
Overview ¶
Package agent runs one turn. The model proposes, policy decides, and the follow-up pack goes back to the caller.
Index ¶
- type Call
- type Completer
- type Executor
- type Loop
- func (l *Loop) Follow(ctx context.Context, operationID string, params map[string]string, ...) ([]Call, error)
- func (l *Loop) Invoke(ctx context.Context, operationID string, params map[string]string, ...) (Call, error)
- func (l *Loop) Run(ctx context.Context, userText string) (Outcome, error)
- func (l *Loop) Runtime() runtime.Runtime
- func (l *Loop) SetFloor(hook policy.Hook)
- func (l *Loop) SetInvokeLimit(n int)
- func (l *Loop) SetPolicy(hook policy.Hook)
- func (l *Loop) WrapPolicy(around policy.Around)
- type Memory
- type Notes
- type Outcome
- type Request
- type Response
- type Scripted
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loop ¶
type Loop struct {
Catalog *catalog.Catalog
Semantics Notes
Model Completer
Policy policy.Hook
State *policy.State
Exec Executor
Notify policy.Notifier
Memory Memory
Flows map[string]*flow.Definition
Packs *runctx.Builder
// contains filtered or unexported fields
}
The follow-up pack is returned. The model is not called again.
func (*Loop) Follow ¶
func (l *Loop) Follow(ctx context.Context, operationID string, params map[string]string, approvalID string) ([]Call, error)
Follow runs operationID through Invoke, then each declared relation or link that names a value. A link with no parameter mapping is not called. A missing response field is an error.
func (*Loop) Runtime ¶
Runtime is the invoke sequence this loop uses. Policy and state are the loop's current values.
func (*Loop) SetInvokeLimit ¶ added in v0.1.1
SetInvokeLimit sets calls per second per caller. Zero keeps 16.
func (*Loop) WrapPolicy ¶
type Scripted ¶
type Scripted struct {
// contains filtered or unexported fields
}
func NewScripted ¶
func NewScripted() *Scripted
func (*Scripted) WithOperation ¶
Click to show internal directories.
Click to hide internal directories.