Search
This page presents the developer-facing scoping helpers together with the concrete Oracle search result type.
Scopes
class oracleagentmemory.apis.scope.Scope
Bases: object
Represents a scope for information insertion or searches.
- Parameters:
- user_id
str | None - agent_id
str | None - thread_id
str | None
- user_id
user_id
End-user ID.
NOT_SET_MARKER means the field was omitted and should be resolved
by the operation-specific default. Explicit None is preserved and
interpreted by the operation-specific rules.
Higher-level client APIs such as OracleAgentMemory.search() may
require the user scope to be explicit. In those APIs, None may be
used to target unscoped records only.
- Type: str | None
agent_id
Agent ID.
NOT_SET_MARKER means the field was omitted and should be resolved
by the operation-specific default. Explicit None is preserved and
interpreted by the operation-specific rules.
- Type: str | None
thread_id
Thread ID.
NOT_SET_MARKER means the field was omitted and should be resolved
by the operation-specific default. Explicit None is preserved and
interpreted by the operation-specific rules.
- Type: str | None
class oracleagentmemory.apis.searchscope.SearchScope
Bases: Scope
Represents the scope for a search query and therefore constrains what can be returned.
- Parameters:
- user_id
str | None - agent_id
str | None - thread_id
str | None - exact_user_match
bool - exact_agent_match
bool - exact_thread_match
bool
- user_id
user_id
End-user ID.
When the resolved exact_user_match value is True, this ID is
matched exactly, including None. When it is False, the user
dimension is unconstrained. NOT_SET_MARKER is replaced by an
operation-specific default.
Higher-level client APIs such as OracleAgentMemory.search() may
require the user scope to be explicit. In those APIs, None targets
only unscoped records when exact_user_match resolves to True.
- Type: str | None
agent_id
Agent ID.
When the resolved exact_agent_match value is True, this ID is
matched exactly, including None. When it is False, the agent
dimension is unconstrained. NOT_SET_MARKER is replaced by a
default value depending on the operation using the scope.
- Type: str | None
thread_id
Thread ID.
When the resolved exact_thread_match value is True, this ID is
matched exactly, including None. When it is False, the thread
dimension is unconstrained. NOT_SET_MARKER is replaced by a
default value depending on the operation using the scope.
- Type: str | None
exact_user_match
Whether to match the resolved user_id exactly. True matches
exactly, including None. False leaves the user dimension
unconstrained. NOT_SET_MARKER is replaced by a default depending
on the operation. Higher-level client APIs such as
OracleAgentMemory.search() may require this to remain True.
- Type: bool
exact_agent_match
Whether to match the resolved agent_id exactly. True matches
exactly, including None. False leaves the agent dimension
unconstrained. NOT_SET_MARKER is replaced by a default depending
on the operation.
- Type: bool
exact_thread_match
Whether to match the resolved thread_id exactly. True matches
exactly, including None. False leaves the thread dimension
unconstrained. NOT_SET_MARKER is replaced by a default depending
on the operation.
- Type: bool
Results
class oracleagentmemory.core.OracleSearchResult
Bases: SearchResult
Search result returned by an Oracle thread.
- Parameters:
- distance
float– Distance from the query vector (smaller is better). - record
Record– A record object containing the metadata information about the persisted entry. - id
str | None– Optional identifier associated with the stored record.
- distance
property content
- Return Type: str
- Description: Return the primary textual content for the matched record.
property formatted_content
- Return Type: str
- Description: Return the default XML-safe rendering used in prompts.
property id
-
Return Type: str None - Description: Return the stable identifier of the matched record, when available.
property metadata
-
Return Type: dict[str, Any] None - Description: Return record metadata, if available.
property record
- Return Type: Record
- Description: Return the matched record.
method render_formatted_content
Return a structured, XML-safe representation of the result content.
- Parameters:
- show_thread_id
bool - show_distance
bool - show_timestamp
bool - show_role
bool - show_user_id
bool - show_agent_id
bool
- show_thread_id
- Return type: str
property timestamp
-
Return Type: str None - Description: Return the record timestamp, if available.