Documentation
¶
Overview ¶
Package core provides core loop types and interfaces for REAL/VEAL loop patterns.
Index ¶
- Constants
- func AgentsFromLoop(loop *Loop) []string
- func EnrichAgentWithLoop(agent *multiagentspec.Agent, loop *Loop, role string) *multiagentspec.Agent
- func GenerateCoordinatorInstructions(loops []*Loop) string
- func GenerateLoopInstructions(loop *Loop, role string) string
- type CheckType
- type EscalationPolicy
- type Loop
- type LoopAgentConfig
- type LoopCheck
- type LoopSet
- type LoopType
Constants ¶
const ( LoopREAL = multiagentspec.LoopREAL LoopVEAL = multiagentspec.LoopVEAL )
Loop type constants.
const ( CheckTypeCommand = multiagentspec.CheckTypeCommand CheckTypePattern = multiagentspec.CheckTypePattern CheckTypeFile = multiagentspec.CheckTypeFile CheckTypeManual = multiagentspec.CheckTypeManual )
Check type constants.
const ( EscalationHuman = multiagentspec.EscalationHuman EscalationAbort = multiagentspec.EscalationAbort EscalationContinue = multiagentspec.EscalationContinue EscalationFallback = multiagentspec.EscalationFallback )
Escalation policy constants.
Variables ¶
This section is empty.
Functions ¶
func AgentsFromLoop ¶
AgentsFromLoop returns the agent names involved in a loop.
func EnrichAgentWithLoop ¶
func EnrichAgentWithLoop(agent *multiagentspec.Agent, loop *Loop, role string) *multiagentspec.Agent
EnrichAgentWithLoop adds loop participation instructions to an agent.
func GenerateCoordinatorInstructions ¶
GenerateCoordinatorInstructions generates instructions for a loop coordinator. This is used when a coordinator agent orchestrates multiple loops.
func GenerateLoopInstructions ¶
GenerateLoopInstructions generates loop-aware instructions for an agent. This is appended to the agent's existing instructions when it participates in a loop.
Types ¶
type EscalationPolicy ¶
type EscalationPolicy = multiagentspec.EscalationPolicy
EscalationPolicy defines what to do when max attempts are reached.
type Loop ¶
type Loop = multiagentspec.Loop
Loop is the canonical loop type from multi-agent-spec.
func LoadLoopFromFile ¶
LoadLoopFromFile loads a loop from a JSON or YAML file.
func LoadLoopsFromDir ¶
LoadLoopsFromDir loads all loops from a directory.
func NewREALLoop ¶
NewREALLoop creates a new REAL loop with actor agent and mission.
func NewVEALLoop ¶
NewVEALLoop creates a new VEAL loop with validator and actor agents.
type LoopAgentConfig ¶
type LoopAgentConfig struct {
// IncludeLoopInstructions adds loop-specific instructions to agents.
IncludeLoopInstructions bool
// ValidatorSuffix is appended to validator agent instructions.
ValidatorSuffix string
// ActorSuffix is appended to actor agent instructions.
ActorSuffix string
}
LoopAgentConfig describes how to generate agents from a loop.
func DefaultLoopAgentConfig ¶
func DefaultLoopAgentConfig() *LoopAgentConfig
DefaultLoopAgentConfig returns the default configuration.
type LoopCheck ¶
type LoopCheck = multiagentspec.LoopCheck
LoopCheck is a validation check within a loop.