memory

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package memory 提供与 aggo memory 模块配套使用的 Agent 工具。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchUserMemoryTool

func SearchUserMemoryTool(provider memory.UserMemoryEventSearcher) (tool.BaseTool, error)

SearchUserMemoryTool 构造 search_user_memory 工具。

provider: 实现了 UserMemoryEventSearcher 接口的对象(一般直接传 memory provider)。

工具会自动从 adk.SessionValues 取 userID;调用方也可以显式传 user_id 覆盖。

Types

type SearchUserMemoryParams

type SearchUserMemoryParams struct {
	Keywords []string `` /* 191-byte string literal not displayed */
	Match    string   `` /* 150-byte string literal not displayed */
	Type     string   `` /* 163-byte string literal not displayed */
	Since    string   `` /* 133-byte string literal not displayed */
	Until    string   `` /* 133-byte string literal not displayed */
	Limit    int      `json:"limit,omitempty" jsonschema:"description=返回上限,默认 10,最大 30"`
	UserID   string   `json:"user_id,omitempty" jsonschema:"description=用户ID。未传时自动取 session 中的 userID"`
}

SearchUserMemoryParams 是 search_user_memory 工具参数。

type SearchUserMemoryResult

type SearchUserMemoryResult struct {
	Total  int                          `json:"total"`
	Events []SearchUserMemoryResultItem `json:"events"`
}

SearchUserMemoryResult 是 search_user_memory 工具返回值。

type SearchUserMemoryResultItem

type SearchUserMemoryResultItem struct {
	ID       string   `json:"id"`
	Type     string   `json:"type"`
	Date     string   `json:"date"`
	Summary  string   `json:"summary"`
	Keywords []string `json:"keywords,omitempty"`
}

SearchUserMemoryResultItem 是 search_user_memory 工具返回的单条事件。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL