Documentation
¶
Index ¶
- type Entry
- type ForgetTool
- func (t *ForgetTool) Description() string
- func (t *ForgetTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *ForgetTool) Name() string
- func (t *ForgetTool) Schema() json.RawMessage
- func (t ForgetTool) Spec() toolmeta.OperationSpec
- func (t *ForgetTool) Timeout() time.Duration
- type ImportanceUpdater
- type RetrieveTool
- func (t *RetrieveTool) Description() string
- func (t *RetrieveTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *RetrieveTool) Name() string
- func (t *RetrieveTool) Schema() json.RawMessage
- func (t RetrieveTool) Spec() toolmeta.OperationSpec
- func (t *RetrieveTool) Timeout() time.Duration
- type Store
- type StoreTool
- func (t *StoreTool) Description() string
- func (t *StoreTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *StoreTool) Name() string
- func (t *StoreTool) Schema() json.RawMessage
- func (t StoreTool) Spec() toolmeta.OperationSpec
- func (t *StoreTool) Timeout() time.Duration
- type SummarizeTool
- func (t *SummarizeTool) Description() string
- func (t *SummarizeTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *SummarizeTool) Name() string
- func (t *SummarizeTool) Schema() json.RawMessage
- func (t SummarizeTool) Spec() toolmeta.OperationSpec
- func (t *SummarizeTool) Timeout() time.Duration
- type UpdateTool
- func (t *UpdateTool) Description() string
- func (t *UpdateTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *UpdateTool) Name() string
- func (t *UpdateTool) Schema() json.RawMessage
- func (t UpdateTool) Spec() toolmeta.OperationSpec
- func (t *UpdateTool) Timeout() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
ID string `json:"id"`
Content string `json:"content"`
Tags []string `json:"tags"`
Importance float64 `json:"importance"`
SessionID string `json:"session_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Metadata map[string]string `json:"metadata,omitempty"`
}
Entry is a single unit of agent-managed memory.
type ForgetTool ¶
type ForgetTool struct {
// contains filtered or unexported fields
}
func NewForgetTool ¶
func NewForgetTool(store Store) *ForgetTool
func (*ForgetTool) Description ¶
func (t *ForgetTool) Description() string
func (*ForgetTool) Execute ¶
func (t *ForgetTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*ForgetTool) Schema ¶
func (t *ForgetTool) Schema() json.RawMessage
func (ForgetTool) Spec ¶
func (t ForgetTool) Spec() toolmeta.OperationSpec
type ImportanceUpdater ¶
type RetrieveTool ¶
type RetrieveTool struct {
// contains filtered or unexported fields
}
func NewRetrieveTool ¶
func NewRetrieveTool(store Store) *RetrieveTool
func (*RetrieveTool) Description ¶
func (t *RetrieveTool) Description() string
func (*RetrieveTool) Execute ¶
func (t *RetrieveTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*RetrieveTool) Schema ¶
func (t *RetrieveTool) Schema() json.RawMessage
func (RetrieveTool) Spec ¶
func (t RetrieveTool) Spec() toolmeta.OperationSpec
type Store ¶
type Store interface {
Store(ctx context.Context, entry Entry) error
Retrieve(ctx context.Context, query string, limit int) ([]Entry, error)
Update(ctx context.Context, id string, content string) error
Forget(ctx context.Context, id string) error
}
Store abstracts the storage backend for agent-controlled memory tool calls.
type StoreTool ¶
type StoreTool struct {
// contains filtered or unexported fields
}
func NewStoreTool ¶
func (*StoreTool) Description ¶
func (t *StoreTool) Description() string
func (*StoreTool) Execute ¶
func (t *StoreTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*StoreTool) Schema ¶
func (t *StoreTool) Schema() json.RawMessage
func (StoreTool) Spec ¶
func (t StoreTool) Spec() toolmeta.OperationSpec
type SummarizeTool ¶
type SummarizeTool struct {
// contains filtered or unexported fields
}
func NewSummarizeTool ¶
func NewSummarizeTool(store Store) *SummarizeTool
func (*SummarizeTool) Description ¶
func (t *SummarizeTool) Description() string
func (*SummarizeTool) Execute ¶
func (t *SummarizeTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*SummarizeTool) Schema ¶
func (t *SummarizeTool) Schema() json.RawMessage
func (SummarizeTool) Spec ¶
func (t SummarizeTool) Spec() toolmeta.OperationSpec
type UpdateTool ¶
type UpdateTool struct {
// contains filtered or unexported fields
}
func NewUpdateTool ¶
func NewUpdateTool(store Store) *UpdateTool
func (*UpdateTool) Description ¶
func (t *UpdateTool) Description() string
func (*UpdateTool) Execute ¶
func (t *UpdateTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*UpdateTool) Schema ¶
func (t *UpdateTool) Schema() json.RawMessage
func (UpdateTool) Spec ¶
func (t UpdateTool) Spec() toolmeta.OperationSpec
Click to show internal directories.
Click to hide internal directories.