Versions in this module Expand all Collapse all v0 v0.1.0 Sep 23, 2025 Changes in this version + const DefaultMaxPlanDepth + const MCPServerTypeCommand + const MCPServerTypeMemory + const MCPServerTypeSSE + const ProfileTypeChat + const ProfileTypeEmbedded + const ProfileTypeEmulator + const StateErrorTypeLuaSyntax + const StateErrorTypeRetryable + const StateErrorTypeUnknown + const StateErrorTypeUnrecoverable + const TraceMessageTypeCallBegin + const TraceMessageTypeCallEnd + const TraceMessageTypeLuaSource + func CosineSimilarity(vec1, vec2 []float32) float64 + func GenerateStringIdentifier(prefix string, length int) (string, error) + func MonotonicIdGenerator(prefix string) func() string + type AnnotatedMessage struct + Annotations map[string]Annotation + type AnnotatedMessages []AnnotatedMessage + func AppendToMessages(messages AnnotatedMessages, message llm.ChatCompletionMessage) AnnotatedMessages + func (a AnnotatedMessages) AddTraceInformation(name string) + func (a AnnotatedMessages) ChatCompletionMessages() (m []llm.ChatCompletionMessage) + func (a AnnotatedMessages) FlattenedAnnotations() map[string]Annotation + func (a AnnotatedMessages) GetAnnotation(name string) *Annotation + func (a AnnotatedMessages) LastMessage() *AnnotatedMessage + type Annotation struct + Data any + Explanation string + Name string + type AnnotationTemplate struct + func (a *AnnotationTemplate) Execute(wr io.Writer, messages AnnotatedMessages) error + func (a *AnnotationTemplate) Parse(text string) (*AnnotationTemplate, error) + type Behavior interface + Call func(ctx context.Context, messages AnnotatedMessages) (AnnotatedMessages, Signal) + Copy func() Behavior + Description func() string + Name func() string + type BehaviorRef string + type BehaviorState struct + ClientID string + HashId string + Lambda func(ctx context.Context, history AnnotatedMessages) (AnnotatedMessages, Signal) + StateDescription string + StateName string + func CannedResponseState(message string) *BehaviorState + func LLMCompletionState(options LLMCompletionOptions) BehaviorState + func PauseState(reason string) BehaviorState + func (b *BehaviorState) Call(ctx context.Context, history AnnotatedMessages) (AnnotatedMessages, Signal) + func (b *BehaviorState) Copy() Behavior + func (b *BehaviorState) Description() string + func (b *BehaviorState) Hash() string + func (b *BehaviorState) Name() string + type BehaviorTree struct + BehaviorDescription string + BehaviorName string + ClientID string + Example string + Graph Graph[Behavior] + State Stack[Behavior] + Traversed map[string]bool + func CreateBehaviorTree(name, description, example string) BehaviorTree + func CreateBehaviorTreeWithId(name, description, example, id string) BehaviorTree + func (b *BehaviorTree) AddState(s Behavior) + func (b *BehaviorTree) AddTransition(from, to Behavior) + func (b *BehaviorTree) Call(ctx context.Context, history AnnotatedMessages) (AnnotatedMessages, Signal) + func (b *BehaviorTree) Copy() Behavior + func (b *BehaviorTree) Description() string + func (b *BehaviorTree) Hash() string + func (b *BehaviorTree) Name() string + type Channel interface + AllocateID func() string + Receive func() (*ChannelMessage, error) + Send func(*ChannelMessage) error + type ChannelMessage struct + Content string + Id string + type Chunk struct + Embedding string + End int + Start int + Text string + type ChunkingStrategy interface + Chunk func(s string) ([]string, error) + type CollectUserInputSignal struct + Reason string + func (c CollectUserInputSignal) Description() string + type ErrorSignal struct + ErrorMessage string + ErrorType string + func (e ErrorSignal) Description() string + func (e ErrorSignal) Error() string + func (e ErrorSignal) Type() string + type ExecGeneratedStep struct + Behavior Behavior + Messages AnnotatedMessages + ReplanTombstone bool + type ExecGeneratedStepSkeleton struct + Messages AnnotatedMessages + Ref string + ReplanTombstone bool + Snapshot Snapshot + type Graph struct + Nodes []T + Transitions [][]int + func (g *Graph[T]) AddNode(n T) int + func (g *Graph[T]) AddTransition(from, to T) + func (g *Graph[T]) Children(of T) []T + func (g *Graph[T]) Initial() T + type Hashable interface + Hash func() string + type LLMCompletionOptions struct + AllowTools bool + Annotation string + ClientID string + Description string + ExtraContext []string + Id string + Model string + Name string + System string + Terminal bool + type MCPClientMux struct + func NewMCPClientMux() *MCPClientMux + func (m *MCPClientMux) AddInMemoryServer(ctx context.Context, transport mcp.Transport) error + func (m *MCPClientMux) AddProfilesOfType(t string, profiles []MCPProfile) error + func (m *MCPClientMux) AddSSEServer(ctx context.Context, baseURL string) error + func (m *MCPClientMux) CallTool(ctx context.Context, params *mcp.CallToolParams) (*mcp.CallToolResult, error) + func (m *MCPClientMux) Close() error + func (m *MCPClientMux) Tools() []llm.ChatTool + type MCPProfile struct + Servers []MCPServer + Type string + func ProfilesForArtifact(artifact []byte) ([]MCPProfile, error) + type MCPServer struct + Location string + Type string + type MemoryChunk struct + Distance float64 + Embedding llm.Embedding + Metadata string + Text string + type MemoryStore struct + func CreateMemoryStore(db *sqlite3.Conn, provider llm.ModelProvider) *MemoryStore + func (m *MemoryStore) CreateMemoryBankIfNotExists(name string) error + func (m *MemoryStore) Recall(ctx context.Context, bank, query, prefix string) ([]MemoryChunk, error) + func (m *MemoryStore) Store(ctx context.Context, bank string, chunk string, metadata string) error + func (m *MemoryStore) StoreBatch(ctx context.Context, bank string, chunks []string, metadatas []string) error + type PlanResult struct + Messages AnnotatedMessages + Signal Signal + Step *ExecGeneratedStep + type SemanticChunker struct + Threshold float64 + func NewSemanticChunker(m llm.ModelProvider) *SemanticChunker + func (s *SemanticChunker) Chunk(c string) ([]Chunk, error) + type Signal interface + Description func() string + type SkipSignal struct + Reason string + func (c SkipSignal) Description() string + type Snapshot map[string]snapshotvalue + func TakeSnapshot(root Behavior) (Snapshot, error) + func (snap Snapshot) Restore(root Behavior) error + type Stack struct + Items []T + func (s *Stack[T]) IsEmpty() bool + func (s *Stack[T]) Pop() T + func (s *Stack[T]) Push(b T) + type TerminalChannel struct + func (TerminalChannel) AllocateID() string + func (TerminalChannel) Receive() (*ChannelMessage, error) + func (TerminalChannel) Send(m *ChannelMessage) error + type TerminalSignal struct + Reason string + func (c *TerminalSignal) Description() string + type TodoListExecutive struct + Behaviors []Behavior + ClientID string + ExecDescription string + ExecName string + History AnnotatedMessages + MaxPlanDepth int + OutOfBoundsHandler Behavior + Output string + Preamble string + func CreateTodoListExecutive(name, description string, behaviors ...Behavior) *TodoListExecutive + func CreateTodoListExecutiveWithId(name, description, id string, behaviors ...Behavior) *TodoListExecutive + func (e *TodoListExecutive) Call(ctx context.Context, messages AnnotatedMessages) (AnnotatedMessages, Signal) + func (e *TodoListExecutive) Copy() Behavior + func (e *TodoListExecutive) Description() string + func (e *TodoListExecutive) Execute(ctx context.Context, messages AnnotatedMessages) + func (e *TodoListExecutive) Hash() string + func (e *TodoListExecutive) Name() string + func (e *TodoListExecutive) Plan(messages AnnotatedMessages) + func (e *TodoListExecutive) RunLoop(c Channel) error + type Trace chan *TraceMessage + func (t Trace) Send(msg *TraceMessage) + type TraceHistoryOperation struct + Action string + Annotation *Annotation + Message *llm.ChatCompletionMessage + Type string + type TraceMessage struct + ClientID string + Error error + ID string + Message string + Name string + Operations []*TraceHistoryOperation + Signal *TraceSignal + Telemetry *TraceTelemetry + Type string + type TraceSignal struct + Reason string + Type string + func TraceForSignal(sig Signal) *TraceSignal + type TraceTelemetry struct + End *time.Time + Start time.Time + type TwilioSMSChannel struct + AllowList []string + func CreateTwilioSMSChannel() *TwilioSMSChannel + func (c *TwilioSMSChannel) AllocateID() string + func (c *TwilioSMSChannel) Receive() (*ChannelMessage, error) + func (c *TwilioSMSChannel) Send(m *ChannelMessage) error