Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostTurnHook ¶
type PostTurnHook struct {
// contains filtered or unexported fields
}
PostTurnHook captures memories from a completed agent turn.
func NewPostTurnHook ¶
func NewPostTurnHook(logger *slog.Logger) *PostTurnHook
NewPostTurnHook creates a post-turn hook handler.
func (*PostTurnHook) Execute ¶
func (h *PostTurnHook) Execute(_ context.Context, input PostTurnInput) error
Execute runs the post-turn hook (delegates to capture pipeline).
type PostTurnInput ¶
type PostTurnInput struct {
UserMessage string `json:"user_message"`
AssistantMessage string `json:"assistant_message"`
SessionID string `json:"session_id"`
Project string `json:"project"`
}
PostTurnInput contains the conversation turn data.
type PreTurnHook ¶
type PreTurnHook struct {
// contains filtered or unexported fields
}
PreTurnHook retrieves relevant memories before an agent turn.
func NewPreTurnHook ¶
func NewPreTurnHook(emb embedder.Embedder, st store.Store, recaller *recall.Recaller, logger *slog.Logger) *PreTurnHook
NewPreTurnHook creates a pre-turn hook handler.
func (*PreTurnHook) Execute ¶
func (h *PreTurnHook) Execute(ctx context.Context, input PreTurnInput) (*PreTurnOutput, error)
Execute runs the pre-turn hook.
type PreTurnInput ¶
type PreTurnInput struct {
Message string `json:"message"`
Project string `json:"project"`
TokenBudget int `json:"token_budget"`
}
PreTurnInput contains the context for a pre-turn hook.
type PreTurnOutput ¶
type PreTurnOutput struct {
Memories []models.RecallResult `json:"memories"`
TokensUsed int `json:"tokens_used"`
MemoryCount int `json:"memory_count"`
Context string `json:"context"`
}
PreTurnOutput contains the memories to inject into context.
Click to show internal directories.
Click to hide internal directories.