Documentation
¶
Overview ¶
APIs for managing agent memory and durable session state. This interface is under active development and may change.
Index ¶
- type AgentKitAPI
- func (a *AgentKitAPI) AppendSessionItems(ctx context.Context, request AppendSessionItemsRequest) (*AppendSessionItemsResponse, error)
- func (a *AgentKitAPI) ClearSessionItems(ctx context.Context, request ClearSessionItemsRequest) (*ClearSessionItemsResponse, error)
- func (a *AgentKitAPI) CreateMemory(ctx context.Context, request CreateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
- func (a *AgentKitAPI) CreateMemoryStore(ctx context.Context, request CreateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
- func (a *AgentKitAPI) CreateSession(ctx context.Context, request CreateSessionRequest) (*Session, error)
- func (a *AgentKitAPI) CreateSessionStore(ctx context.Context, request CreateSessionStoreRequest) (*SessionStore, error)
- func (a *AgentKitAPI) DeleteMemory(ctx context.Context, request DeleteManagedMemoryEntryRequest) error
- func (a *AgentKitAPI) DeleteMemoryStore(ctx context.Context, request DeleteManagedMemoryStoreRequest) error
- func (a *AgentKitAPI) DeleteSession(ctx context.Context, request DeleteSessionRequest) error
- func (a *AgentKitAPI) DeleteSessionStore(ctx context.Context, request DeleteSessionStoreRequest) error
- func (a *AgentKitAPI) ExtractMemories(ctx context.Context, request ExtractMemoriesRequest) (*ExtractMemoriesResponse, error)
- func (a *AgentKitAPI) ForkSession(ctx context.Context, request ForkSessionRequest) (*ForkSessionResponse, error)
- func (a *AgentKitAPI) GetMemory(ctx context.Context, request GetManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
- func (a *AgentKitAPI) GetMemoryStore(ctx context.Context, request GetManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
- func (a *AgentKitAPI) GetSession(ctx context.Context, request GetSessionRequest) (*Session, error)
- func (a *AgentKitAPI) GetSessionStore(ctx context.Context, request GetSessionStoreRequest) (*SessionStore, error)
- func (a *AgentKitAPI) ListMemories(ctx context.Context, request ListManagedMemoryEntriesRequest) listing.Iterator[ManagedMemoryEntry]
- func (a *AgentKitAPI) ListMemoriesAll(ctx context.Context, request ListManagedMemoryEntriesRequest) ([]ManagedMemoryEntry, error)
- func (a *AgentKitAPI) ListMemoryStores(ctx context.Context, request ListManagedMemoryStoresRequest) listing.Iterator[ManagedMemoryStore]
- func (a *AgentKitAPI) ListMemoryStoresAll(ctx context.Context, request ListManagedMemoryStoresRequest) ([]ManagedMemoryStore, error)
- func (a *AgentKitAPI) ListSessionItems(ctx context.Context, request ListSessionItemsRequest) listing.Iterator[SessionItem]
- func (a *AgentKitAPI) ListSessionItemsAll(ctx context.Context, request ListSessionItemsRequest) ([]SessionItem, error)
- func (a *AgentKitAPI) ListSessionStores(ctx context.Context, request ListSessionStoresRequest) listing.Iterator[SessionStore]
- func (a *AgentKitAPI) ListSessionStoresAll(ctx context.Context, request ListSessionStoresRequest) ([]SessionStore, error)
- func (a *AgentKitAPI) ListSessions(ctx context.Context, request ListSessionsRequest) listing.Iterator[Session]
- func (a *AgentKitAPI) ListSessionsAll(ctx context.Context, request ListSessionsRequest) ([]Session, error)
- func (a *AgentKitAPI) PopSessionItem(ctx context.Context, request PopSessionItemRequest) (*PopSessionItemResponse, error)
- func (a *AgentKitAPI) SearchMemories(ctx context.Context, request SearchManagedMemoryEntriesRequest) listing.Iterator[ManagedMemoryEntrySearchResult]
- func (a *AgentKitAPI) SearchMemoriesAll(ctx context.Context, request SearchManagedMemoryEntriesRequest) ([]ManagedMemoryEntrySearchResult, error)
- func (a *AgentKitAPI) UpdateMemory(ctx context.Context, request UpdateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
- func (a *AgentKitAPI) UpdateMemoryStore(ctx context.Context, request UpdateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
- func (a *AgentKitAPI) UpdateSession(ctx context.Context, request UpdateSessionRequest) (*Session, error)
- func (a *AgentKitAPI) UpdateSessionStore(ctx context.Context, request UpdateSessionStoreRequest) (*SessionStore, error)
- type AgentKitInterface
- type AgentKitServicedeprecated
- type AppendSessionItemsRequest
- type AppendSessionItemsResponse
- type ClearSessionItemsRequest
- type ClearSessionItemsResponse
- type CreateManagedMemoryEntryRequest
- type CreateManagedMemoryStoreRequest
- type CreateSessionRequest
- type CreateSessionStoreRequest
- type DeleteManagedMemoryEntryRequest
- type DeleteManagedMemoryStoreRequest
- type DeleteSessionRequest
- type DeleteSessionStoreRequest
- type ExtractMemoriesRequest
- type ExtractMemoriesResponse
- type ForkSessionRequest
- type ForkSessionResponse
- type GetManagedMemoryEntryRequest
- type GetManagedMemoryStoreRequest
- type GetSessionRequest
- type GetSessionStoreRequest
- type ListManagedMemoryEntriesRequest
- type ListManagedMemoryEntriesResponse
- type ListManagedMemoryStoresRequest
- type ListManagedMemoryStoresResponse
- type ListSessionItemsRequest
- type ListSessionItemsResponse
- type ListSessionStoresRequest
- type ListSessionStoresResponse
- type ListSessionsRequest
- type ListSessionsResponse
- type ManagedMemoryEntry
- type ManagedMemoryEntrySearchResult
- type ManagedMemoryEntrySourceType
- type ManagedMemoryStore
- type PopSessionItemRequest
- type PopSessionItemResponse
- type SearchManagedMemoryEntriesRequest
- type SearchManagedMemoryEntriesResponse
- type Session
- type SessionItem
- type SessionStore
- type StorageBackend
- type StorageBackendType
- type UpdateManagedMemoryEntryRequest
- type UpdateManagedMemoryStoreRequest
- type UpdateSessionRequest
- type UpdateSessionStoreRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentKitAPI ¶
type AgentKitAPI struct {
// contains filtered or unexported fields
}
APIs for managing agent memory and durable session state. This interface is under active development and may change.
func NewAgentKit ¶
func NewAgentKit(client *client.DatabricksClient) *AgentKitAPI
func (*AgentKitAPI) AppendSessionItems ¶
func (a *AgentKitAPI) AppendSessionItems(ctx context.Context, request AppendSessionItemsRequest) (*AppendSessionItemsResponse, error)
func (*AgentKitAPI) ClearSessionItems ¶
func (a *AgentKitAPI) ClearSessionItems(ctx context.Context, request ClearSessionItemsRequest) (*ClearSessionItemsResponse, error)
func (*AgentKitAPI) CreateMemory ¶
func (a *AgentKitAPI) CreateMemory(ctx context.Context, request CreateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
func (*AgentKitAPI) CreateMemoryStore ¶
func (a *AgentKitAPI) CreateMemoryStore(ctx context.Context, request CreateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
func (*AgentKitAPI) CreateSession ¶
func (a *AgentKitAPI) CreateSession(ctx context.Context, request CreateSessionRequest) (*Session, error)
func (*AgentKitAPI) CreateSessionStore ¶
func (a *AgentKitAPI) CreateSessionStore(ctx context.Context, request CreateSessionStoreRequest) (*SessionStore, error)
func (*AgentKitAPI) DeleteMemory ¶
func (a *AgentKitAPI) DeleteMemory(ctx context.Context, request DeleteManagedMemoryEntryRequest) error
func (*AgentKitAPI) DeleteMemoryStore ¶
func (a *AgentKitAPI) DeleteMemoryStore(ctx context.Context, request DeleteManagedMemoryStoreRequest) error
func (*AgentKitAPI) DeleteSession ¶
func (a *AgentKitAPI) DeleteSession(ctx context.Context, request DeleteSessionRequest) error
func (*AgentKitAPI) DeleteSessionStore ¶
func (a *AgentKitAPI) DeleteSessionStore(ctx context.Context, request DeleteSessionStoreRequest) error
func (*AgentKitAPI) ExtractMemories ¶
func (a *AgentKitAPI) ExtractMemories(ctx context.Context, request ExtractMemoriesRequest) (*ExtractMemoriesResponse, error)
func (*AgentKitAPI) ForkSession ¶
func (a *AgentKitAPI) ForkSession(ctx context.Context, request ForkSessionRequest) (*ForkSessionResponse, error)
func (*AgentKitAPI) GetMemory ¶
func (a *AgentKitAPI) GetMemory(ctx context.Context, request GetManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
func (*AgentKitAPI) GetMemoryStore ¶
func (a *AgentKitAPI) GetMemoryStore(ctx context.Context, request GetManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
func (*AgentKitAPI) GetSession ¶
func (a *AgentKitAPI) GetSession(ctx context.Context, request GetSessionRequest) (*Session, error)
func (*AgentKitAPI) GetSessionStore ¶
func (a *AgentKitAPI) GetSessionStore(ctx context.Context, request GetSessionStoreRequest) (*SessionStore, error)
func (*AgentKitAPI) ListMemories ¶
func (a *AgentKitAPI) ListMemories(ctx context.Context, request ListManagedMemoryEntriesRequest) listing.Iterator[ManagedMemoryEntry]
Lists managed memory entries for one actor. An exact `path` filters entries across sessions, ignoring session metadata. Otherwise, `session_id` and `path_prefix` restrict the actor partition. `read_mask` selects fields in each returned entry.
func (*AgentKitAPI) ListMemoriesAll ¶
func (a *AgentKitAPI) ListMemoriesAll(ctx context.Context, request ListManagedMemoryEntriesRequest) ([]ManagedMemoryEntry, error)
Lists managed memory entries for one actor. An exact `path` filters entries across sessions, ignoring session metadata. Otherwise, `session_id` and `path_prefix` restrict the actor partition. `read_mask` selects fields in each returned entry.
func (*AgentKitAPI) ListMemoryStores ¶
func (a *AgentKitAPI) ListMemoryStores(ctx context.Context, request ListManagedMemoryStoresRequest) listing.Iterator[ManagedMemoryStore]
Lists managed memory stores in the caller's workspace.
func (*AgentKitAPI) ListMemoryStoresAll ¶
func (a *AgentKitAPI) ListMemoryStoresAll(ctx context.Context, request ListManagedMemoryStoresRequest) ([]ManagedMemoryStore, error)
Lists managed memory stores in the caller's workspace.
func (*AgentKitAPI) ListSessionItems ¶
func (a *AgentKitAPI) ListSessionItems(ctx context.Context, request ListSessionItemsRequest) listing.Iterator[SessionItem]
Lists items in a session.
func (*AgentKitAPI) ListSessionItemsAll ¶
func (a *AgentKitAPI) ListSessionItemsAll(ctx context.Context, request ListSessionItemsRequest) ([]SessionItem, error)
Lists items in a session.
func (*AgentKitAPI) ListSessionStores ¶
func (a *AgentKitAPI) ListSessionStores(ctx context.Context, request ListSessionStoresRequest) listing.Iterator[SessionStore]
Lists session stores.
func (*AgentKitAPI) ListSessionStoresAll ¶
func (a *AgentKitAPI) ListSessionStoresAll(ctx context.Context, request ListSessionStoresRequest) ([]SessionStore, error)
Lists session stores.
func (*AgentKitAPI) ListSessions ¶
func (a *AgentKitAPI) ListSessions(ctx context.Context, request ListSessionsRequest) listing.Iterator[Session]
Lists sessions within a session store.
func (*AgentKitAPI) ListSessionsAll ¶
func (a *AgentKitAPI) ListSessionsAll(ctx context.Context, request ListSessionsRequest) ([]Session, error)
Lists sessions within a session store.
func (*AgentKitAPI) PopSessionItem ¶
func (a *AgentKitAPI) PopSessionItem(ctx context.Context, request PopSessionItemRequest) (*PopSessionItemResponse, error)
func (*AgentKitAPI) SearchMemories ¶
func (a *AgentKitAPI) SearchMemories(ctx context.Context, request SearchManagedMemoryEntriesRequest) listing.Iterator[ManagedMemoryEntrySearchResult]
Searches managed memory entries by text query for one actor. Returns matching entries and scores ranked by relevance; `read_mask` selects fields in each returned entry.
func (*AgentKitAPI) SearchMemoriesAll ¶
func (a *AgentKitAPI) SearchMemoriesAll(ctx context.Context, request SearchManagedMemoryEntriesRequest) ([]ManagedMemoryEntrySearchResult, error)
Searches managed memory entries by text query for one actor. Returns matching entries and scores ranked by relevance; `read_mask` selects fields in each returned entry.
func (*AgentKitAPI) UpdateMemory ¶
func (a *AgentKitAPI) UpdateMemory(ctx context.Context, request UpdateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
func (*AgentKitAPI) UpdateMemoryStore ¶
func (a *AgentKitAPI) UpdateMemoryStore(ctx context.Context, request UpdateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
func (*AgentKitAPI) UpdateSession ¶
func (a *AgentKitAPI) UpdateSession(ctx context.Context, request UpdateSessionRequest) (*Session, error)
func (*AgentKitAPI) UpdateSessionStore ¶
func (a *AgentKitAPI) UpdateSessionStore(ctx context.Context, request UpdateSessionStoreRequest) (*SessionStore, error)
type AgentKitInterface ¶
type AgentKitInterface interface {
// Appends items to a session.
AppendSessionItems(ctx context.Context, request AppendSessionItemsRequest) (*AppendSessionItemsResponse, error)
// Clears all items from a session.
ClearSessionItems(ctx context.Context, request ClearSessionItemsRequest) (*ClearSessionItemsResponse, error)
// Creates a managed memory entry using exclusive-create semantics. Callers may
// choose the entry ID; the service generates one when it is omitted. Returns
// `ALREADY_EXISTS` when an entry with the same actor, session, and path already
// exists. Omitted `session_id` is its own uniqueness key: two omitted-session
// entries with the same actor and path conflict, but an omitted-session entry
// does not conflict with a session-scoped entry at the same actor and path.
CreateMemory(ctx context.Context, request CreateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
// Creates a managed memory store in the caller's workspace.
CreateMemoryStore(ctx context.Context, request CreateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
// Creates a session within a session store.
CreateSession(ctx context.Context, request CreateSessionRequest) (*Session, error)
// Creates a session store.
CreateSessionStore(ctx context.Context, request CreateSessionStoreRequest) (*SessionStore, error)
// Deletes a managed memory entry by resource name. Returns `NOT_FOUND` when the
// entry does not exist in the caller's workspace.
DeleteMemory(ctx context.Context, request DeleteManagedMemoryEntryRequest) error
// Deletes a managed memory store by resource name. Returns `NOT_FOUND` when the
// store does not exist in the caller's workspace.
DeleteMemoryStore(ctx context.Context, request DeleteManagedMemoryStoreRequest) error
// Deletes a session, its items, and any descendant sessions recursively.
// Independently retained memory is not deleted.
DeleteSession(ctx context.Context, request DeleteSessionRequest) error
// Deletes a session store, its sessions and items, and its service-managed
// storage. Memory entries retained by a separate Memory Store are not deleted.
DeleteSessionStore(ctx context.Context, request DeleteSessionStoreRequest) error
// Synchronously extracts memories from a single session into the given memory
// store, returning the entries that were written.
ExtractMemories(ctx context.Context, request ExtractMemoriesRequest) (*ExtractMemoriesResponse, error)
// Forks a session into an independent top-level copy.
ForkSession(ctx context.Context, request ForkSessionRequest) (*ForkSessionResponse, error)
// Retrieves a managed memory entry, including its content, by resource name.
// Returns `NOT_FOUND` when the entry does not exist in the caller's workspace.
GetMemory(ctx context.Context, request GetManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
// Retrieves a managed memory store by resource name. Returns `NOT_FOUND` when
// the store does not exist in the caller's workspace.
GetMemoryStore(ctx context.Context, request GetManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
// Gets a session by resource name.
GetSession(ctx context.Context, request GetSessionRequest) (*Session, error)
// Gets a session store by resource name.
GetSessionStore(ctx context.Context, request GetSessionStoreRequest) (*SessionStore, error)
// Lists managed memory entries for one actor. An exact `path` filters entries
// across sessions, ignoring session metadata. Otherwise, `session_id` and
// `path_prefix` restrict the actor partition. `read_mask` selects fields in
// each returned entry.
//
// This method is generated by Databricks SDK Code Generator.
ListMemories(ctx context.Context, request ListManagedMemoryEntriesRequest) listing.Iterator[ManagedMemoryEntry]
// Lists managed memory entries for one actor. An exact `path` filters entries
// across sessions, ignoring session metadata. Otherwise, `session_id` and
// `path_prefix` restrict the actor partition. `read_mask` selects fields in
// each returned entry.
//
// This method is generated by Databricks SDK Code Generator.
ListMemoriesAll(ctx context.Context, request ListManagedMemoryEntriesRequest) ([]ManagedMemoryEntry, error)
// Lists managed memory stores in the caller's workspace.
//
// This method is generated by Databricks SDK Code Generator.
ListMemoryStores(ctx context.Context, request ListManagedMemoryStoresRequest) listing.Iterator[ManagedMemoryStore]
// Lists managed memory stores in the caller's workspace.
//
// This method is generated by Databricks SDK Code Generator.
ListMemoryStoresAll(ctx context.Context, request ListManagedMemoryStoresRequest) ([]ManagedMemoryStore, error)
// Lists items in a session.
//
// This method is generated by Databricks SDK Code Generator.
ListSessionItems(ctx context.Context, request ListSessionItemsRequest) listing.Iterator[SessionItem]
// Lists items in a session.
//
// This method is generated by Databricks SDK Code Generator.
ListSessionItemsAll(ctx context.Context, request ListSessionItemsRequest) ([]SessionItem, error)
// Lists session stores.
//
// This method is generated by Databricks SDK Code Generator.
ListSessionStores(ctx context.Context, request ListSessionStoresRequest) listing.Iterator[SessionStore]
// Lists session stores.
//
// This method is generated by Databricks SDK Code Generator.
ListSessionStoresAll(ctx context.Context, request ListSessionStoresRequest) ([]SessionStore, error)
// Lists sessions within a session store.
//
// This method is generated by Databricks SDK Code Generator.
ListSessions(ctx context.Context, request ListSessionsRequest) listing.Iterator[Session]
// Lists sessions within a session store.
//
// This method is generated by Databricks SDK Code Generator.
ListSessionsAll(ctx context.Context, request ListSessionsRequest) ([]Session, error)
// Pops the newest item from a session.
PopSessionItem(ctx context.Context, request PopSessionItemRequest) (*PopSessionItemResponse, error)
// Searches managed memory entries by text query for one actor. Returns matching
// entries and scores ranked by relevance; `read_mask` selects fields in each
// returned entry.
//
// This method is generated by Databricks SDK Code Generator.
SearchMemories(ctx context.Context, request SearchManagedMemoryEntriesRequest) listing.Iterator[ManagedMemoryEntrySearchResult]
// Searches managed memory entries by text query for one actor. Returns matching
// entries and scores ranked by relevance; `read_mask` selects fields in each
// returned entry.
//
// This method is generated by Databricks SDK Code Generator.
SearchMemoriesAll(ctx context.Context, request SearchManagedMemoryEntriesRequest) ([]ManagedMemoryEntrySearchResult, error)
// Updates selected mutable fields on a managed memory entry. Identity fields
// are immutable.
UpdateMemory(ctx context.Context, request UpdateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
// Updates a managed memory store's description.
UpdateMemoryStore(ctx context.Context, request UpdateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
// Updates a session's mutable fields.
UpdateSession(ctx context.Context, request UpdateSessionRequest) (*Session, error)
// Updates a session store's description and metadata.
UpdateSessionStore(ctx context.Context, request UpdateSessionStoreRequest) (*SessionStore, error)
}
type AgentKitService
deprecated
type AgentKitService interface {
// Appends items to a session.
AppendSessionItems(ctx context.Context, request AppendSessionItemsRequest) (*AppendSessionItemsResponse, error)
// Clears all items from a session.
ClearSessionItems(ctx context.Context, request ClearSessionItemsRequest) (*ClearSessionItemsResponse, error)
// Creates a managed memory entry using exclusive-create semantics. Callers
// may choose the entry ID; the service generates one when it is omitted.
// Returns `ALREADY_EXISTS` when an entry with the same actor, session, and
// path already exists. Omitted `session_id` is its own uniqueness key: two
// omitted-session entries with the same actor and path conflict, but an
// omitted-session entry does not conflict with a session-scoped entry at
// the same actor and path.
CreateMemory(ctx context.Context, request CreateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
// Creates a managed memory store in the caller's workspace.
CreateMemoryStore(ctx context.Context, request CreateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
// Creates a session within a session store.
CreateSession(ctx context.Context, request CreateSessionRequest) (*Session, error)
// Creates a session store.
CreateSessionStore(ctx context.Context, request CreateSessionStoreRequest) (*SessionStore, error)
// Deletes a managed memory entry by resource name. Returns `NOT_FOUND` when
// the entry does not exist in the caller's workspace.
DeleteMemory(ctx context.Context, request DeleteManagedMemoryEntryRequest) error
// Deletes a managed memory store by resource name. Returns `NOT_FOUND` when
// the store does not exist in the caller's workspace.
DeleteMemoryStore(ctx context.Context, request DeleteManagedMemoryStoreRequest) error
// Deletes a session, its items, and any descendant sessions recursively.
// Independently retained memory is not deleted.
DeleteSession(ctx context.Context, request DeleteSessionRequest) error
// Deletes a session store, its sessions and items, and its service-managed
// storage. Memory entries retained by a separate Memory Store are not
// deleted.
DeleteSessionStore(ctx context.Context, request DeleteSessionStoreRequest) error
// Synchronously extracts memories from a single session into the given
// memory store, returning the entries that were written.
ExtractMemories(ctx context.Context, request ExtractMemoriesRequest) (*ExtractMemoriesResponse, error)
// Forks a session into an independent top-level copy.
ForkSession(ctx context.Context, request ForkSessionRequest) (*ForkSessionResponse, error)
// Retrieves a managed memory entry, including its content, by resource
// name. Returns `NOT_FOUND` when the entry does not exist in the caller's
// workspace.
GetMemory(ctx context.Context, request GetManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
// Retrieves a managed memory store by resource name. Returns `NOT_FOUND`
// when the store does not exist in the caller's workspace.
GetMemoryStore(ctx context.Context, request GetManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
// Gets a session by resource name.
GetSession(ctx context.Context, request GetSessionRequest) (*Session, error)
// Gets a session store by resource name.
GetSessionStore(ctx context.Context, request GetSessionStoreRequest) (*SessionStore, error)
// Lists managed memory entries for one actor. An exact `path` filters
// entries across sessions, ignoring session metadata. Otherwise,
// `session_id` and `path_prefix` restrict the actor partition. `read_mask`
// selects fields in each returned entry.
ListMemories(ctx context.Context, request ListManagedMemoryEntriesRequest) (*ListManagedMemoryEntriesResponse, error)
// Lists managed memory stores in the caller's workspace.
ListMemoryStores(ctx context.Context, request ListManagedMemoryStoresRequest) (*ListManagedMemoryStoresResponse, error)
// Lists items in a session.
ListSessionItems(ctx context.Context, request ListSessionItemsRequest) (*ListSessionItemsResponse, error)
// Lists session stores.
ListSessionStores(ctx context.Context, request ListSessionStoresRequest) (*ListSessionStoresResponse, error)
// Lists sessions within a session store.
ListSessions(ctx context.Context, request ListSessionsRequest) (*ListSessionsResponse, error)
// Pops the newest item from a session.
PopSessionItem(ctx context.Context, request PopSessionItemRequest) (*PopSessionItemResponse, error)
// Searches managed memory entries by text query for one actor. Returns
// matching entries and scores ranked by relevance; `read_mask` selects
// fields in each returned entry.
SearchMemories(ctx context.Context, request SearchManagedMemoryEntriesRequest) (*SearchManagedMemoryEntriesResponse, error)
// Updates selected mutable fields on a managed memory entry. Identity
// fields are immutable.
UpdateMemory(ctx context.Context, request UpdateManagedMemoryEntryRequest) (*ManagedMemoryEntry, error)
// Updates a managed memory store's description.
UpdateMemoryStore(ctx context.Context, request UpdateManagedMemoryStoreRequest) (*ManagedMemoryStore, error)
// Updates a session's mutable fields.
UpdateSession(ctx context.Context, request UpdateSessionRequest) (*Session, error)
// Updates a session store's description and metadata.
UpdateSessionStore(ctx context.Context, request UpdateSessionStoreRequest) (*SessionStore, error)
}
APIs for managing agent memory and durable session state. This interface is under active development and may change.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type AppendSessionItemsRequest ¶
type AppendSessionItemsRequest struct {
// Items to append atomically in request order. Concurrent append requests
// are serialized into one committed order without exposing a numeric
// sequence in the public contract.
Items []SessionItem `json:"items"`
// Resource name of the containing session, in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Parent string `json:"-" url:"-"`
}
Request to append items to a session.
func (*AppendSessionItemsRequest) UnmarshalJSON ¶
func (s *AppendSessionItemsRequest) UnmarshalJSON(b []byte) error
type AppendSessionItemsResponse ¶
type AppendSessionItemsResponse struct {
// Persisted session items with service-assigned fields.
SessionItems []SessionItem `json:"session_items,omitempty"`
}
Response containing appended items.
func (*AppendSessionItemsResponse) UnmarshalJSON ¶
func (s *AppendSessionItemsResponse) UnmarshalJSON(b []byte) error
type ClearSessionItemsRequest ¶
type ClearSessionItemsRequest struct {
// Resource name of the containing session, in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Parent string `json:"-" url:"-"`
}
Request to clear all items from a session.
func (*ClearSessionItemsRequest) UnmarshalJSON ¶
func (s *ClearSessionItemsRequest) UnmarshalJSON(b []byte) error
type ClearSessionItemsResponse ¶
type ClearSessionItemsResponse struct {
}
Response from clearing items from a session.
func (*ClearSessionItemsResponse) UnmarshalJSON ¶
func (s *ClearSessionItemsResponse) UnmarshalJSON(b []byte) error
type CreateManagedMemoryEntryRequest ¶
type CreateManagedMemoryEntryRequest struct {
// The managed memory entry to create.
ManagedMemoryEntry ManagedMemoryEntry `json:"managed_memory_entry"`
// Optional caller-selected managed memory entry ID. The service generates
// an ID when omitted.
ManagedMemoryEntryId string `json:"-" url:"managed_memory_entry_id,omitempty"`
// Managed memory store that will contain the entry, in the form
// `memory-stores/{managed_memory_store_id}`.
Parent string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateManagedMemoryEntryRequest) MarshalJSON ¶
func (s CreateManagedMemoryEntryRequest) MarshalJSON() ([]byte, error)
func (*CreateManagedMemoryEntryRequest) UnmarshalJSON ¶
func (s *CreateManagedMemoryEntryRequest) UnmarshalJSON(b []byte) error
type CreateManagedMemoryStoreRequest ¶
type CreateManagedMemoryStoreRequest struct {
// The managed memory store to create.
ManagedMemoryStore ManagedMemoryStore `json:"managed_memory_store"`
// Caller-provided, workspace-unique managed memory store ID. It must be
// 3-56 characters, begin with a lowercase letter, contain only lowercase
// letters, digits, and hyphens, and end with a letter or digit.
ManagedMemoryStoreId string `json:"-" url:"managed_memory_store_id"`
}
func (*CreateManagedMemoryStoreRequest) UnmarshalJSON ¶
func (s *CreateManagedMemoryStoreRequest) UnmarshalJSON(b []byte) error
type CreateSessionRequest ¶
type CreateSessionRequest struct {
// Resource name of the containing session store, in the form
// `session-stores/{session_store_id}`.
Parent string `json:"-" url:"-"`
// The session to create. `actor_id` is required. A session with
// `parent_session_id` is a child and must use its parent's `actor_id`.
// Independent forks are created only through `ForkSession`.
Session Session `json:"session"`
// Optional caller-selected session ID. The service generates a UUID when
// this field is omitted. The ID must be unique; a collision returns
// `ALREADY_EXISTS`.
SessionId string `json:"-" url:"session_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateSessionRequest) MarshalJSON ¶
func (s CreateSessionRequest) MarshalJSON() ([]byte, error)
func (*CreateSessionRequest) UnmarshalJSON ¶
func (s *CreateSessionRequest) UnmarshalJSON(b []byte) error
type CreateSessionStoreRequest ¶
type CreateSessionStoreRequest struct {
// The session store to create.
SessionStore SessionStore `json:"session_store"`
// Caller-provided, workspace-unique session store ID. It must be 3-55
// characters, begin with a lowercase letter, and contain only lowercase
// letters, digits, and hyphens.
SessionStoreId string `json:"-" url:"session_store_id"`
}
func (*CreateSessionStoreRequest) UnmarshalJSON ¶
func (s *CreateSessionStoreRequest) UnmarshalJSON(b []byte) error
type DeleteManagedMemoryEntryRequest ¶
type DeleteManagedMemoryEntryRequest struct {
// Resource name in the form
// `memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}`.
Name string `json:"-" url:"-"`
}
func (*DeleteManagedMemoryEntryRequest) UnmarshalJSON ¶
func (s *DeleteManagedMemoryEntryRequest) UnmarshalJSON(b []byte) error
type DeleteManagedMemoryStoreRequest ¶
type DeleteManagedMemoryStoreRequest struct {
// Resource name in the form `memory-stores/{managed_memory_store_id}`.
Name string `json:"-" url:"-"`
}
func (*DeleteManagedMemoryStoreRequest) UnmarshalJSON ¶
func (s *DeleteManagedMemoryStoreRequest) UnmarshalJSON(b []byte) error
type DeleteSessionRequest ¶
type DeleteSessionRequest struct {
// Resource name in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Name string `json:"-" url:"-"`
}
func (*DeleteSessionRequest) UnmarshalJSON ¶
func (s *DeleteSessionRequest) UnmarshalJSON(b []byte) error
type DeleteSessionStoreRequest ¶
type DeleteSessionStoreRequest struct {
// Resource name in the form `session-stores/{session_store_id}`.
Name string `json:"-" url:"-"`
}
func (*DeleteSessionStoreRequest) UnmarshalJSON ¶
func (s *DeleteSessionStoreRequest) UnmarshalJSON(b []byte) error
type ExtractMemoriesRequest ¶
type ExtractMemoriesRequest struct {
// When true, extract and return the entries without writing them to the
// memory store. Defaults to false, which persists the extracted entries and
// returns them.
DryRun bool `json:"dry_run,omitempty"`
// Instructions steering what is extracted from the session.
Instructions string `json:"instructions,omitempty"`
// Managed memory store the extracted entries are written to, in the form
// `memory-stores/{managed_memory_store_id}`.
MemoryStore string `json:"memory_store"`
// Identifier of the session whose transcript is distilled into memories.
SessionId string `json:"-" url:"-"`
// Session store containing the session, in the form
// `session-stores/{session_store_id}`.
SessionStore string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
Request to synchronously extract memories from a single session.
func (ExtractMemoriesRequest) MarshalJSON ¶
func (s ExtractMemoriesRequest) MarshalJSON() ([]byte, error)
func (*ExtractMemoriesRequest) UnmarshalJSON ¶
func (s *ExtractMemoriesRequest) UnmarshalJSON(b []byte) error
type ExtractMemoriesResponse ¶
type ExtractMemoriesResponse struct {
// The memory entries written by this extraction.
Entries []ManagedMemoryEntry `json:"entries,omitempty"`
// Correlation identifier for this extraction, for logging and tracing. Not
// a fetchable resource.
Name string `json:"name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Result of a single-session memory extraction.
func (ExtractMemoriesResponse) MarshalJSON ¶
func (s ExtractMemoriesResponse) MarshalJSON() ([]byte, error)
func (*ExtractMemoriesResponse) UnmarshalJSON ¶
func (s *ExtractMemoriesResponse) UnmarshalJSON(b []byte) error
type ForkSessionRequest ¶
type ForkSessionRequest struct {
// Opaque caller-provided identifier for the application actor associated
// with the forked session.
ActorId string `json:"actor_id"`
// Optional metadata for the fork.
Metadata map[string]string `json:"metadata,omitempty"`
// Resource name of the containing session store, in the form
// `session-stores/{session_store_id}`.
Parent string `json:"-" url:"-"`
// Optional unique ID for the forked session. A collision returns
// `ALREADY_EXISTS`.
SessionId string `json:"session_id,omitempty"`
// ID of the session to copy.
SourceSessionId string `json:"source_session_id"`
// Optional last item ID to copy through, inclusively. When omitted, the
// fork atomically copies all items committed before the fork operation
// begins.
UpToItemId string `json:"up_to_item_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Request to fork a session.
func (ForkSessionRequest) MarshalJSON ¶
func (s ForkSessionRequest) MarshalJSON() ([]byte, error)
func (*ForkSessionRequest) UnmarshalJSON ¶
func (s *ForkSessionRequest) UnmarshalJSON(b []byte) error
type ForkSessionResponse ¶
type ForkSessionResponse struct {
// The newly-created independent top-level session.
Session *Session `json:"session,omitempty"`
}
Response from forking a session.
func (*ForkSessionResponse) UnmarshalJSON ¶
func (s *ForkSessionResponse) UnmarshalJSON(b []byte) error
type GetManagedMemoryEntryRequest ¶
type GetManagedMemoryEntryRequest struct {
// Resource name in the form
// `memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}`.
Name string `json:"-" url:"-"`
// Fields to return, using proto field names such as `content` (not
// `contents`). An omitted or empty mask returns the full entry, including
// `content`; a non-empty mask returns only the requested fields.
ReadMask *fieldmask.FieldMask `json:"-" url:"read_mask,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (GetManagedMemoryEntryRequest) MarshalJSON ¶
func (s GetManagedMemoryEntryRequest) MarshalJSON() ([]byte, error)
func (*GetManagedMemoryEntryRequest) UnmarshalJSON ¶
func (s *GetManagedMemoryEntryRequest) UnmarshalJSON(b []byte) error
type GetManagedMemoryStoreRequest ¶
type GetManagedMemoryStoreRequest struct {
// Resource name in the form `memory-stores/{managed_memory_store_id}`.
Name string `json:"-" url:"-"`
}
func (*GetManagedMemoryStoreRequest) UnmarshalJSON ¶
func (s *GetManagedMemoryStoreRequest) UnmarshalJSON(b []byte) error
type GetSessionRequest ¶
type GetSessionRequest struct {
// Resource name in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Name string `json:"-" url:"-"`
}
func (*GetSessionRequest) UnmarshalJSON ¶
func (s *GetSessionRequest) UnmarshalJSON(b []byte) error
type GetSessionStoreRequest ¶
type GetSessionStoreRequest struct {
// Resource name in the form `session-stores/{session_store_id}`.
Name string `json:"-" url:"-"`
}
func (*GetSessionStoreRequest) UnmarshalJSON ¶
func (s *GetSessionStoreRequest) UnmarshalJSON(b []byte) error
type ListManagedMemoryEntriesRequest ¶
type ListManagedMemoryEntriesRequest struct {
// Customer-provided identifier for the actor whose entries are listed.
ActorId string `json:"-" url:"actor_id"`
// Maximum number of entries to return. The service may return fewer entries
// than requested. Defaults to 10; must be between 1 and 100.
PageSize int `json:"-" url:"page_size,omitempty"`
// Opaque pagination token from a previous ListManagedMemoryEntries
// response.
PageToken string `json:"-" url:"page_token,omitempty"`
// Managed memory store whose entries are listed, in the form
// `memory-stores/{managed_memory_store_id}`.
Parent string `json:"-" url:"-"`
// Optional path prefix used to restrict entries within the actor partition.
PathPrefix string `json:"-" url:"path_prefix,omitempty"`
// Fields to return in each entry, using proto field names such as `content`
// (not `contents`). An omitted or empty mask returns each full entry,
// including `content`; a non-empty mask returns only the requested fields.
ReadMask *fieldmask.FieldMask `json:"-" url:"read_mask,omitempty"`
// Optional session identifier. When set, only entries with this exact
// `session_id` are returned. Omitted-session (cross-session) entries are
// not included. Ignored when path is set.
SessionId string `json:"-" url:"session_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListManagedMemoryEntriesRequest) MarshalJSON ¶
func (s ListManagedMemoryEntriesRequest) MarshalJSON() ([]byte, error)
func (*ListManagedMemoryEntriesRequest) UnmarshalJSON ¶
func (s *ListManagedMemoryEntriesRequest) UnmarshalJSON(b []byte) error
type ListManagedMemoryEntriesResponse ¶
type ListManagedMemoryEntriesResponse struct {
// Managed memory entries matching the request and its read mask.
ManagedMemoryEntries []ManagedMemoryEntry `json:"managed_memory_entries,omitempty"`
// Opaque pagination token. This field is omitted when there are no more
// results.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response containing managed memory entries.
func (ListManagedMemoryEntriesResponse) MarshalJSON ¶
func (s ListManagedMemoryEntriesResponse) MarshalJSON() ([]byte, error)
func (*ListManagedMemoryEntriesResponse) UnmarshalJSON ¶
func (s *ListManagedMemoryEntriesResponse) UnmarshalJSON(b []byte) error
type ListManagedMemoryStoresRequest ¶
type ListManagedMemoryStoresRequest struct {
// Maximum number of stores to return. The service may return fewer stores
// than requested. Defaults to 10; must be between 1 and 100.
PageSize int `json:"-" url:"page_size,omitempty"`
// Opaque pagination token from a previous ListManagedMemoryStores response.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListManagedMemoryStoresRequest) MarshalJSON ¶
func (s ListManagedMemoryStoresRequest) MarshalJSON() ([]byte, error)
func (*ListManagedMemoryStoresRequest) UnmarshalJSON ¶
func (s *ListManagedMemoryStoresRequest) UnmarshalJSON(b []byte) error
type ListManagedMemoryStoresResponse ¶
type ListManagedMemoryStoresResponse struct {
// Managed memory stores in the caller's workspace.
ManagedMemoryStores []ManagedMemoryStore `json:"managed_memory_stores,omitempty"`
// Opaque pagination token. This field is omitted when there are no more
// results.
NextPageToken string `json:"next_page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response containing managed memory stores in the caller's workspace.
func (ListManagedMemoryStoresResponse) MarshalJSON ¶
func (s ListManagedMemoryStoresResponse) MarshalJSON() ([]byte, error)
func (*ListManagedMemoryStoresResponse) UnmarshalJSON ¶
func (s *ListManagedMemoryStoresResponse) UnmarshalJSON(b []byte) error
type ListSessionItemsRequest ¶
type ListSessionItemsRequest struct {
// Sort order. Supported values are `create_time asc` and `create_time
// desc`. The default is `create_time desc`, which returns the most recently
// appended items first. Equal timestamps are resolved by committed append
// order in the requested direction.
OrderBy string `json:"-" url:"order_by,omitempty"`
// Maximum number of items to return. Defaults to 10; must be between 1 and
// 100.
PageSize int `json:"-" url:"page_size,omitempty"`
// Token returned by a previous list request.
PageToken string `json:"-" url:"page_token,omitempty"`
// Resource name of the containing session, in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Parent string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSessionItemsRequest) MarshalJSON ¶
func (s ListSessionItemsRequest) MarshalJSON() ([]byte, error)
func (*ListSessionItemsRequest) UnmarshalJSON ¶
func (s *ListSessionItemsRequest) UnmarshalJSON(b []byte) error
type ListSessionItemsResponse ¶
type ListSessionItemsResponse struct {
// Token to retrieve the next page.
NextPageToken string `json:"next_page_token,omitempty"`
// Session items in the requested page.
SessionItems []SessionItem `json:"session_items,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response containing a page of session items.
func (ListSessionItemsResponse) MarshalJSON ¶
func (s ListSessionItemsResponse) MarshalJSON() ([]byte, error)
func (*ListSessionItemsResponse) UnmarshalJSON ¶
func (s *ListSessionItemsResponse) UnmarshalJSON(b []byte) error
type ListSessionStoresRequest ¶
type ListSessionStoresRequest struct {
// Maximum number of session stores to return. Defaults to 10; must be
// between 1 and 100.
PageSize int `json:"-" url:"page_size,omitempty"`
// Token returned by a previous list request.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSessionStoresRequest) MarshalJSON ¶
func (s ListSessionStoresRequest) MarshalJSON() ([]byte, error)
func (*ListSessionStoresRequest) UnmarshalJSON ¶
func (s *ListSessionStoresRequest) UnmarshalJSON(b []byte) error
type ListSessionStoresResponse ¶
type ListSessionStoresResponse struct {
// Token to retrieve the next page.
NextPageToken string `json:"next_page_token,omitempty"`
// Session stores in the requested page.
SessionStores []SessionStore `json:"session_stores,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response containing a page of session stores.
func (ListSessionStoresResponse) MarshalJSON ¶
func (s ListSessionStoresResponse) MarshalJSON() ([]byte, error)
func (*ListSessionStoresResponse) UnmarshalJSON ¶
func (s *ListSessionStoresResponse) UnmarshalJSON(b []byte) error
type ListSessionsRequest ¶
type ListSessionsRequest struct {
// Filter expression. Supported fields include `actor_id` and `metadata`;
// for example, `actor_id = "support-customer-123"`.
Filter string `json:"-" url:"filter,omitempty"`
// Sort order. Defaults to `last_activity_time desc`. Page-token
// continuation is exactly-once when ordering by `create_time` (immutable);
// ordering by `last_activity_time` is best-effort, because that value
// changes as a session gains activity, so a session updated between page
// requests may be repeated or skipped. To enumerate every session exactly
// once, order by `create_time`.
OrderBy string `json:"-" url:"order_by,omitempty"`
// Maximum number of sessions to return. Defaults to 10; must be between 1
// and 100.
PageSize int `json:"-" url:"page_size,omitempty"`
// Token returned by a previous list request.
PageToken string `json:"-" url:"page_token,omitempty"`
// Resource name of the containing session store, in the form
// `session-stores/{session_store_id}`.
Parent string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListSessionsRequest) MarshalJSON ¶
func (s ListSessionsRequest) MarshalJSON() ([]byte, error)
func (*ListSessionsRequest) UnmarshalJSON ¶
func (s *ListSessionsRequest) UnmarshalJSON(b []byte) error
type ListSessionsResponse ¶
type ListSessionsResponse struct {
// Token to retrieve the next page.
NextPageToken string `json:"next_page_token,omitempty"`
// Sessions in the requested page.
Sessions []Session `json:"sessions,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response containing a page of sessions.
func (ListSessionsResponse) MarshalJSON ¶
func (s ListSessionsResponse) MarshalJSON() ([]byte, error)
func (*ListSessionsResponse) UnmarshalJSON ¶
func (s *ListSessionsResponse) UnmarshalJSON(b []byte) error
type ManagedMemoryEntry ¶
type ManagedMemoryEntry struct {
// Customer-provided identifier for the actor whose memory this entry
// represents.
ActorId string `json:"actor_id"`
// Optional free-form memory content.
Content string `json:"content,omitempty"`
// Time when the entry was created.
CreateTime *time.Time `json:"create_time,omitempty"`
// Human-readable description of the memory entry.
Description string `json:"description,omitempty"`
// Resource name in the form
// `memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}`.
Name string `json:"name,omitempty"`
// Absolute, case-sensitive path identifying the entry within its actor and
// optional session. Paths must begin with `/` and must not contain empty,
// `.` or `..` segments.
Path string `json:"path"`
// Optional identifier for the session associated with this memory entry.
// When omitted, the entry applies across the actor's sessions.
SessionId string `json:"session_id,omitempty"`
// Which writer created this entry. Caller sets this on Create; immutable
// after creation.
SourceType ManagedMemoryEntrySourceType `json:"source_type,omitempty"`
// Time when the entry was last updated.
UpdateTime *time.Time `json:"update_time,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A workspace-scoped entry in a managed memory store.
func (ManagedMemoryEntry) MarshalJSON ¶
func (s ManagedMemoryEntry) MarshalJSON() ([]byte, error)
func (*ManagedMemoryEntry) UnmarshalJSON ¶
func (s *ManagedMemoryEntry) UnmarshalJSON(b []byte) error
type ManagedMemoryEntrySearchResult ¶
type ManagedMemoryEntrySearchResult struct {
// Managed memory entry matching the query.
ManagedMemoryEntry *ManagedMemoryEntry `json:"managed_memory_entry,omitempty"`
// Relevance score for the result. Higher scores are more relevant.
Score float64 `json:"score,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
One relevance-ranked managed memory search result.
func (ManagedMemoryEntrySearchResult) MarshalJSON ¶
func (s ManagedMemoryEntrySearchResult) MarshalJSON() ([]byte, error)
func (*ManagedMemoryEntrySearchResult) UnmarshalJSON ¶
func (s *ManagedMemoryEntrySearchResult) UnmarshalJSON(b []byte) error
type ManagedMemoryEntrySourceType ¶
type ManagedMemoryEntrySourceType string
Identifies the source that created a managed memory entry.
const ManagedMemoryEntrySourceTypeManagedMemoryEntrySourceTypeAgent ManagedMemoryEntrySourceType = `MANAGED_MEMORY_ENTRY_SOURCE_TYPE_AGENT`
const ManagedMemoryEntrySourceTypeManagedMemoryEntrySourceTypeDreamer ManagedMemoryEntrySourceType = `MANAGED_MEMORY_ENTRY_SOURCE_TYPE_DREAMER`
func (*ManagedMemoryEntrySourceType) Set ¶
func (f *ManagedMemoryEntrySourceType) Set(v string) error
Set raw string value and validate it against allowed values
func (*ManagedMemoryEntrySourceType) String ¶
func (f *ManagedMemoryEntrySourceType) String() string
String representation for fmt.Print
func (*ManagedMemoryEntrySourceType) Type ¶
func (f *ManagedMemoryEntrySourceType) Type() string
Type always returns ManagedMemoryEntrySourceType to satisfy [pflag.Value] interface
func (*ManagedMemoryEntrySourceType) Values ¶
func (f *ManagedMemoryEntrySourceType) Values() []ManagedMemoryEntrySourceType
Values returns all possible values for ManagedMemoryEntrySourceType.
There is no guarantee on the order of the values in the slice.
type ManagedMemoryStore ¶
type ManagedMemoryStore struct {
// Time when the store was created.
CreateTime *time.Time `json:"create_time,omitempty"`
// Workspace-local user ID of the authenticated principal that created the
// store. This is immutable server-set attribution and does not grant
// access; authorization is evaluated from the authenticated request
// context.
CreatorUserId string `json:"creator_user_id,omitempty"`
// Human-readable description of the memory store.
Description string `json:"description,omitempty"`
// Deprecated compatibility alias for the caller-provided managed memory
// store ID. Canonical clients provide the ID through
// `CreateMemoryStoreRequest.managed_memory_store_id` and use `name` as the
// resource identifier.
DisplayName string `json:"display_name,omitempty"`
// Resource name in the form `memory-stores/{managed_memory_store_id}`.
Name string `json:"name,omitempty"`
// Deprecated alias for `creator_user_id`. This identifies the original
// creator, not a transferable owner. Use `creator_user_id` instead.
OwnerUserId string `json:"owner_user_id,omitempty"`
// Service-managed storage backing this memory store.
StorageBackend *StorageBackend `json:"storage_backend,omitempty"`
// Time when the store was last updated.
UpdateTime *time.Time `json:"update_time,omitempty"`
// Workspace that owns the memory store.
WorkspaceId int64 `json:"workspace_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A workspace-scoped managed memory store backed by service-managed storage.
func (ManagedMemoryStore) MarshalJSON ¶
func (s ManagedMemoryStore) MarshalJSON() ([]byte, error)
func (*ManagedMemoryStore) UnmarshalJSON ¶
func (s *ManagedMemoryStore) UnmarshalJSON(b []byte) error
type PopSessionItemRequest ¶
type PopSessionItemRequest struct {
// Resource name of the containing session, in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Parent string `json:"-" url:"-"`
}
Request to pop an item from a session.
func (*PopSessionItemRequest) UnmarshalJSON ¶
func (s *PopSessionItemRequest) UnmarshalJSON(b []byte) error
type PopSessionItemResponse ¶
type PopSessionItemResponse struct {
// Removed item, if any.
Item *SessionItem `json:"item,omitempty"`
}
Response containing the popped item.
func (*PopSessionItemResponse) UnmarshalJSON ¶
func (s *PopSessionItemResponse) UnmarshalJSON(b []byte) error
type SearchManagedMemoryEntriesRequest ¶
type SearchManagedMemoryEntriesRequest struct {
// Customer-provided identifier for the actor whose entries are searched.
ActorId string `json:"actor_id"`
// Deprecated alias for `page_size`. When both fields are set, their values
// must match.
Limit int `json:"limit,omitempty"`
// Maximum number of relevance-ranked entries to return. Defaults to 10 and
// must be between 1 and 100.
PageSize int `json:"page_size,omitempty"`
// Reserved for pagination compatibility. The server currently ignores this
// field because Search returns a ranked top-N result set.
PageToken string `json:"page_token,omitempty"`
// Managed memory store whose entries are searched, in the form
// `memory-stores/{managed_memory_store_id}`.
Parent string `json:"-" url:"-"`
// Optional absolute, case-sensitive path prefix used to restrict searched
// entries within the actor partition. The prefix must begin with `/` and
// must not contain empty, `.` or `..` segments.
PathPrefix string `json:"path_prefix,omitempty"`
// Free-form search query.
Query string `json:"query"`
// Fields to return in each matching entry, using proto field names such as
// `content` (not `contents`). An omitted or empty mask returns each full
// entry, including `content`; a non-empty mask returns only the requested
// fields. Search scores are always returned.
//
// The field mask must be a single string, with multiple fields separated by
// commas (no spaces). The field path is relative to the resource object,
// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
// Specification of elements in sequence or map fields is not allowed, as
// only the entire collection field can be specified. Field names must
// exactly match the resource field names.
ReadMask *fieldmask.FieldMask `json:"read_mask,omitempty"`
// Optional session identifier. When set, only entries with this exact
// `session_id` are searched. Omitted-session (cross-session) entries are
// not included.
SessionId string `json:"session_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Request to search managed memory entries by text query for one actor. Search returns a relevance-ranked top-N result set and does not currently paginate.
func (SearchManagedMemoryEntriesRequest) MarshalJSON ¶
func (s SearchManagedMemoryEntriesRequest) MarshalJSON() ([]byte, error)
func (*SearchManagedMemoryEntriesRequest) UnmarshalJSON ¶
func (s *SearchManagedMemoryEntriesRequest) UnmarshalJSON(b []byte) error
type SearchManagedMemoryEntriesResponse ¶
type SearchManagedMemoryEntriesResponse struct {
// Deprecated compatibility alias for clients migrating to `results`. This
// contains the same entries in the same order, but omits their relevance
// scores.
ManagedMemoryEntries []ManagedMemoryEntry `json:"managed_memory_entries,omitempty"`
// Opaque pagination token. Search currently returns an unpaginated ranked
// top-N result set, so the server does not populate this field.
NextPageToken string `json:"next_page_token,omitempty"`
// Canonical matching entries and relevance scores, ordered most relevant
// first.
Results []ManagedMemoryEntrySearchResult `json:"results,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response containing managed memory entries ranked by relevance.
func (SearchManagedMemoryEntriesResponse) MarshalJSON ¶
func (s SearchManagedMemoryEntriesResponse) MarshalJSON() ([]byte, error)
func (*SearchManagedMemoryEntriesResponse) UnmarshalJSON ¶
func (s *SearchManagedMemoryEntriesResponse) UnmarshalJSON(b []byte) error
type Session ¶
type Session struct {
// Opaque caller-provided identifier for the application actor associated
// with the session.
//
// This is application data and has no Databricks authentication or
// authorization semantics. Use the same value as the Managed Memory Entry
// `actor_id` when storing memories associated with this actor. Every
// session must set it. A child session must use the same value as its
// parent.
ActorId string `json:"actor_id"`
// Time when the session was created.
CreateTime *time.Time `json:"create_time,omitempty"`
// Time when the session's item history was last mutated.
LastActivityTime *time.Time `json:"last_activity_time,omitempty"`
// Mutable caller-defined string labels.
Metadata map[string]string `json:"metadata,omitempty"`
// Resource name in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Name string `json:"name,omitempty"`
// Immediate parent session ID. Set only at creation for child sessions,
// immutable thereafter, and restricted to the same store.
ParentSessionId string `json:"parent_session_id,omitempty"`
// Top-level session ID in the spawn tree. This equals `session_id` for a
// root or fork and is inherited transitively by child sessions.
RootSessionId string `json:"root_session_id,omitempty"`
// Unique session ID. The service generates a UUID unless the caller
// supplies `CreateSessionRequest.session_id`.
SessionId string `json:"session_id,omitempty"`
// Time when session resource fields last changed.
UpdateTime *time.Time `json:"update_time,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A durable logical interaction stored within a Session Store.
func (Session) MarshalJSON ¶
func (*Session) UnmarshalJSON ¶
type SessionItem ¶
type SessionItem struct {
// Server-assigned time when the append commits. Values are nondecreasing
// within a session. Item listing orders by this timestamp; equal timestamps
// are resolved by committed append order.
CreateTime *time.Time `json:"create_time,omitempty"`
// Complete SDK-native, JSON-compatible item. The service stores and returns
// this value without interpreting provider-specific fields such as `type`,
// `role`, or `content`.
Data json.RawMessage `json:"data"`
// Stable service-generated item ID.
ItemId string `json:"item_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A transcript entry in a session's history.
func (SessionItem) MarshalJSON ¶
func (s SessionItem) MarshalJSON() ([]byte, error)
func (*SessionItem) UnmarshalJSON ¶
func (s *SessionItem) UnmarshalJSON(b []byte) error
type SessionStore ¶
type SessionStore struct {
// Time when the store was created.
CreateTime *time.Time `json:"create_time,omitempty"`
// Workspace-local user ID of the authenticated principal that created the
// store. This is immutable server-set attribution and does not grant
// access; authorization is evaluated from the authenticated request
// context.
CreatorUserId string `json:"creator_user_id,omitempty"`
// Human-readable description of the session store.
Description string `json:"description,omitempty"`
// Mutable caller-defined string labels.
Metadata map[string]string `json:"metadata,omitempty"`
// Resource name in the form `session-stores/{session_store_id}`.
Name string `json:"name,omitempty"`
// Time when the store was last updated.
UpdateTime *time.Time `json:"update_time,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
A workspace-scoped session store.
func (SessionStore) MarshalJSON ¶
func (s SessionStore) MarshalJSON() ([]byte, error)
func (*SessionStore) UnmarshalJSON ¶
func (s *SessionStore) UnmarshalJSON(b []byte) error
type StorageBackend ¶
type StorageBackend struct {
// Backend-specific identifier. For Lakebase, this is the project ID.
BackendId string `json:"backend_id,omitempty"`
// Type of the storage backend.
BackendType StorageBackendType `json:"backend_type,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Service-managed storage backing a managed memory store.
func (StorageBackend) MarshalJSON ¶
func (s StorageBackend) MarshalJSON() ([]byte, error)
func (*StorageBackend) UnmarshalJSON ¶
func (s *StorageBackend) UnmarshalJSON(b []byte) error
type StorageBackendType ¶
type StorageBackendType string
Type of service-managed storage backing a managed memory store.
const StorageBackendTypeStorageBackendTypeLakebase StorageBackendType = `STORAGE_BACKEND_TYPE_LAKEBASE`
func (*StorageBackendType) Set ¶
func (f *StorageBackendType) Set(v string) error
Set raw string value and validate it against allowed values
func (*StorageBackendType) String ¶
func (f *StorageBackendType) String() string
String representation for fmt.Print
func (*StorageBackendType) Type ¶
func (f *StorageBackendType) Type() string
Type always returns StorageBackendType to satisfy [pflag.Value] interface
func (*StorageBackendType) Values ¶
func (f *StorageBackendType) Values() []StorageBackendType
Values returns all possible values for StorageBackendType.
There is no guarantee on the order of the values in the slice.
type UpdateManagedMemoryEntryRequest ¶
type UpdateManagedMemoryEntryRequest struct {
// The managed memory entry to update.
ManagedMemoryEntry ManagedMemoryEntry `json:"managed_memory_entry"`
// Resource name in the form
// `memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}`.
Name string `json:"-" url:"-"`
// Fields to update. Only `content` and `description` may be updated.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}
func (*UpdateManagedMemoryEntryRequest) UnmarshalJSON ¶
func (s *UpdateManagedMemoryEntryRequest) UnmarshalJSON(b []byte) error
type UpdateManagedMemoryStoreRequest ¶
type UpdateManagedMemoryStoreRequest struct {
// The managed memory store to update. `name` is taken from the URL.
ManagedMemoryStore ManagedMemoryStore `json:"managed_memory_store"`
// Resource name in the form `memory-stores/{managed_memory_store_id}`.
Name string `json:"-" url:"-"`
// Only `description` may be updated.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}
func (*UpdateManagedMemoryStoreRequest) UnmarshalJSON ¶
func (s *UpdateManagedMemoryStoreRequest) UnmarshalJSON(b []byte) error
type UpdateSessionRequest ¶
type UpdateSessionRequest struct {
// Resource name in the form
// `session-stores/{session_store_id}/sessions/{session_id}`.
Name string `json:"-" url:"-"`
// Session to update.
Session Session `json:"session"`
// Fields to update. Only `metadata` is mutable; any other path returns
// `INVALID_PARAMETER_VALUE`.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}
func (*UpdateSessionRequest) UnmarshalJSON ¶
func (s *UpdateSessionRequest) UnmarshalJSON(b []byte) error
type UpdateSessionStoreRequest ¶
type UpdateSessionStoreRequest struct {
// Resource name in the form `session-stores/{session_store_id}`.
Name string `json:"-" url:"-"`
// Session store to update.
SessionStore SessionStore `json:"session_store"`
// Fields to update. Only `description` and `metadata` are mutable; any
// other path returns `INVALID_PARAMETER_VALUE`.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}
func (*UpdateSessionStoreRequest) UnmarshalJSON ¶
func (s *UpdateSessionStoreRequest) UnmarshalJSON(b []byte) error