Documentation
¶
Overview ¶
Package schema contains a stateful schema-v2 for Agent. Bootstrapped with am-gen. Edit manually or re-gen & merge.
Package schema contains a stateful schema-v2 for Mem. Bootstrapped with am-gen. Edit manually or re-gen & merge.
Package schema contains a stateful schema-v2 for Tool. Bootstrapped with am-gen. Edit manually or re-gen & merge.
Index ¶
Constants ¶
const TagManual = "manual"
TagManual is for stories that CANNOT be triggered by the LLM orienting story.
const TagPrompt = "prompt"
TagPrompt is for states with LLM prompts.
const TagTrigger = "trigger"
TagTrigger is for stories that can be triggered by the LLM orienting story.
Variables ¶
var ( // AgentStates contains all the states for the Agent machine. AgentStates = ssA // AgentGroups contains all the state groups for the Agent machine. AgentGroups = sgA )
var ( // MemStates contains all the states for the Mem machine. MemStates = ssM // MemGroups contains all the state groups for the Mem machine. MemGroups = sgM )
var ( // ToolStates contains all the states for the Tool machine. ToolStates = ssT // ToolGroups contains all the state groups for the Tool machine. ToolGroups = sgT )
var AgentSchema = SchemaMerge( ssam.BasicSchema, ssam.DisposedSchema, ssrpc.WorkerSchema, am.Schema{ ssA.ErrLLM: { Multi: true, Require: S{Exception}, }, ssA.ErrDB: { Multi: true, Require: S{Exception}, }, ssA.ErrMem: { Multi: true, Require: S{Exception}, }, ssA.ErrUI: { Multi: true, Require: S{ssA.UIMode}, }, ssA.Start: {Add: S{ssA.BaseDBStarting}}, ssA.Ready: { Require: S{ssA.Start}, Add: S{ssA.Loop}, }, ssA.Loop: {Require: S{ssA.Ready}}, ssA.InputPending: {Remove: S{ssA.Prompt}}, ssA.InputBlocked: {Remove: S{ssA.Prompt}}, ssA.Requesting: {}, ssA.RequestingTool: { Multi: true, Add: S{ssA.Requesting}, }, ssA.RequestingLLM: { Multi: true, Add: S{ssA.Requesting}, }, ssA.Mock: {}, ssA.BaseDBStarting: { Require: S{ssA.Start}, Remove: S{ssA.BaseDBReady}, }, ssA.BaseDBReady: { Require: S{ssA.Start}, Remove: S{ssA.BaseDBStarting}, }, ssA.BaseDBSaving: {Multi: true}, ssA.Prompt: { Multi: true, Require: S{ssA.Start}, Remove: S{ssA.InputPending}, }, ssA.Interrupted: { Add: S{ssA.InputPending}, Remove: S{ssA.Resume}, }, ssA.Resume: { Remove: S{ssA.Interrupted}, }, ssA.Msg: { Multi: true, Require: S{ssA.Start}, }, ssA.UIMode: {}, ssA.UIReady: {Require: S{ssA.UIMode}}, ssA.UIButtonSend: {Require: S{ssA.UIMode}}, ssA.UIButtonIntt: {Require: S{ssA.UIMode}}, ssA.UISaveOutput: {Require: S{ssA.UIMode}}, ssA.UICleanOutput: { Multi: true, Require: S{ssA.UIMode}, }, ssA.UISessConn: { Multi: true, Require: S{ssA.UIMode}, }, ssA.UISessDisconn: { Multi: true, Require: S{ssA.UIMode}, }, ssA.UISrvListening: {Require: S{ssA.UIMode}}, })
AgentSchema represents all relations and properties of AgentStates.
var Exception = am.StateException
Exception is a type alias for the exception state.
var MemSchema = am.Schema{}
MemSchema represents all relations and properties of MemStates.
var SAdd = am.SAdd
SAdd is a func alias for merging lists of states.
var SchemaMerge = am.SchemaMerge
SchemaMerge is a func alias for extending an existing state structure.
var StateAdd = am.StateAdd
StateAdd is a func alias for adding to an existing state definition.
var StateSet = am.StateSet
StateSet is a func alias for replacing parts of an existing state definition.
var ToolSchema = SchemaMerge( ssam.BasicSchema, ssam.DisposedSchema, ssrpc.WorkerSchema, am.Schema{ ssT.Working: { Require: S{ssT.Ready}, Remove: S{ssT.Idle}, }, ssT.Idle: { Auto: true, Require: S{ssT.Ready}, Remove: S{ssT.Working}, }, })
ToolSchema represents all relations and properties of ToolStates.
Functions ¶
This section is empty.
Types ¶
type AgentGroupsDef ¶
type AgentGroupsDef struct{}
AgentGroupsDef contains all the state groups Agent state machine.
type AgentStatesDef ¶
type AgentStatesDef struct {
*am.StatesBase
ErrLLM string
ErrDB string
ErrMem string
ErrUI string
// Agent is waiting for user input.
InputPending string
// User input is blocked by the agent.
InputBlocked string
// Agent is currently requesting >=1 tools
RequestingTool string
// Agent is currently requesting >=1 LLMs
RequestingLLM string
// Requesting implies either RequestingTool or RequestingLLM being active
Requesting string
// The machine has been mocked.
Mock string
BaseDBStarting string
BaseDBReady string
// BaseDBSaving is lazy query execution.
BaseDBSaving string
// Loop is the agent-user loop (eg dialogue).
Loop string
// Prompt is the text the user has sent us.
Prompt string
// Interrupted is when the user interrupts the agent, until Resume.
Interrupted string
// Resume is the signal from the user to resume after an Interrupted.
Resume string
// Msg will output the passed text into the UI.
Msg string
UIMode string
UIReady string
// UI button "Send" has been pressed
UIButtonSend string
// UI button "Interrupt" has been pressed
UIButtonIntt string
UISaveOutput string
UICleanOutput string
UISessConn string
UISessDisconn string
UISrvListening string
// inherit from BasicStatesDef
*ssam.BasicStatesDef
// inherit from DisposedStatesDef
*ssam.DisposedStatesDef
// inherit from WorkerStatesDef
*ssrpc.WorkerStatesDef
}
AgentStatesDef contains all the states of the Agent state machine.
type MemGroupsDef ¶ added in v0.2.0
type MemGroupsDef struct {
}
MemGroupsDef contains all the state groups Mem state machine.
type MemStatesDef ¶ added in v0.2.0
type MemStatesDef struct {
*am.StatesBase
}
MemStatesDef contains all the states of the Mem state machine.
type ToolGroupsDef ¶
type ToolGroupsDef struct {
}
ToolGroupsDef contains all the state groups Tool state machine.
type ToolStatesDef ¶
type ToolStatesDef struct {
*am.StatesBase
Working string
Idle string
// inherit from BasicStatesDef
*ssam.BasicStatesDef
// inherit from DisposedStatesDef
*ssam.DisposedStatesDef
// inherit from WorkerStatesDef
*ssrpc.WorkerStatesDef
}
ToolStatesDef contains all the states of the Tool state machine.