Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrAssistantNotFound = errors.New("assistant: not found")
)
var (
ErrMemoryNotFound = errors.New("assistant: memory key not found")
)
Functions ¶
This section is empty.
Types ¶
type AssistantConfig ¶
type AssistantConfig struct {
AssistantID string
Soul AssistantSoul
Skills []string
Policies []string
MemoryScope string
ToolAllowedList []skills.CapabilityType
}
AssistantConfig holds the configuration needed to bootstrap an AssistantRuntime.
type AssistantMemory ¶
type AssistantMemory interface {
Get(ctx context.Context, key string) ([]byte, error)
Set(ctx context.Context, key string, value []byte) error
Search(ctx context.Context, query string, limit int) ([]SearchResult, error)
}
AssistantMemory defines the contract for storing and searching assistant knowledge.
type AssistantProfile ¶
type AssistantProfile struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
}
AssistantProfile defines the static metadata for an assistant. It represents the "identity" of the assistant, which can be reused across multiple sessions and tenants if permitted.
type AssistantRegistry ¶
type AssistantRegistry struct {
// contains filtered or unexported fields
}
AssistantRegistry manages the registration and lookup of assistant definitions.
func NewAssistantRegistry ¶
func NewAssistantRegistry() *AssistantRegistry
NewAssistantRegistry creates a new in-memory registry.
func (*AssistantRegistry) GetConfig ¶
func (r *AssistantRegistry) GetConfig(id string) (AssistantConfig, error)
GetConfig retrieves an assistant's default configuration by ID.
func (*AssistantRegistry) GetProfile ¶
func (r *AssistantRegistry) GetProfile(id string) (AssistantProfile, error)
GetProfile retrieves an assistant profile by ID.
func (*AssistantRegistry) Register ¶
func (r *AssistantRegistry) Register(profile AssistantProfile, config AssistantConfig)
Register adds an assistant profile and its default configuration to the registry.
type AssistantRuntime ¶
type AssistantRuntime struct {
AssistantID string
TenantID string
// Soul defines the personality and behavioral instructions.
Soul AssistantSoul
// Memory provides access to ephemeral and persistent knowledge.
Memory AssistantMemory
// Skills available to this specific assistant instance.
Skills []string
// Policies enforce security and governance boundaries.
Policies []string
// MemoryScope defines the visibility and persistence of memory.
MemoryScope string
// ToolPermissions define which tools the assistant can invoke.
ToolPermissions []string
}
AssistantRuntime represents the active, request-scoped state of an assistant. It governs what the assistant can do and what data it can access.
type AssistantSoul ¶
type AssistantSoul struct {
SystemPrompt string `json:"system_prompt"`
Personality string `json:"personality"`
Instructions string `json:"instructions"`
AllowedSkills []string `json:"allowed_skills"`
AllowedTools []string `json:"allowed_tools"`
}
AssistantSoul defines the behavioral parameters of an assistant. It acts as the "inner logic" and "personality" that guides the LLM.
func LoadSoulFromMarkdown ¶
func LoadSoulFromMarkdown(path string) (AssistantSoul, error)
LoadSoulFromMarkdown attempts to populate an AssistantSoul from a markdown file. It expects specific headers or sections to identify personality and instructions.
type PersistentMemory ¶
type PersistentMemory struct {
}
PersistentMemory is a long-term storage implementation.
func (*PersistentMemory) Search ¶
func (m *PersistentMemory) Search(ctx context.Context, query string, limit int) ([]SearchResult, error)
type SearchResult ¶
SearchResult represents a single entry found during a semantic search.
type SessionMemory ¶
type SessionMemory struct {
// contains filtered or unexported fields
}
SessionMemory is an ephemeral, request-scoped memory implementation.
func NewSessionMemory ¶
func NewSessionMemory() *SessionMemory
func (*SessionMemory) Search ¶
func (m *SessionMemory) Search(ctx context.Context, query string, limit int) ([]SearchResult, error)
type VectorMemory ¶
type VectorMemory struct {
}
VectorMemory provides semantic search capabilities.
func (*VectorMemory) Search ¶
func (m *VectorMemory) Search(ctx context.Context, query string, limit int) ([]SearchResult, error)