| search_memoryB | Search the personal knowledge base for passages relevant to query. Returns a ranked list of matching text passages with file paths,
relevance scores, and short previews. When ``search.parent_window_chars``
is configured, each hit also includes an ``extended_preview`` with wider
context around the matched chunk.
Args:
query: Natural-language question or phrase.
top_k: Number of results (clamped to 1-50).
mode: ``hybrid`` | ``dense`` | ``sparse``.
source: Optional source name filter.
modality: ``all`` | ``text`` | ``image``.
|
| list_sourcesA | List all configured source directories with indexing statistics. Returns a summary for each source: file counts by status, total chunk
count, and aggregate disk size.
|
| get_documentA | Read and return the contents of an indexed file. The file must currently exist on disk and must have been indexed by
MemoryMesh (i.e. its path must be present in the metadata store).
Args:
path: Absolute file path.
max_bytes: Content is truncated to this many bytes when the file
is large (``truncated: true`` is set in the response).
|
| index_nowA | Trigger an immediate (re-)index of a file, directory, or all sources. Args:
path: Target path. When ``None``, all :attr:`AppContext.config.sources`
are scanned.
force: Skip hash comparison and always re-index.
|
| ask_memoryA | Search the knowledge base and generate an answer using a local LLM. Retrieves the top-k most relevant passages via hybrid search, builds a
RAG prompt, and calls the local Ollama LLM to generate an answer.
When Ollama is unavailable the ``answer`` field is ``null`` and a
``hint`` field explains how to install Ollama and pull a model.
Args:
question: The question to answer.
top_k: How many passages to retrieve (clamped to 1-20).
model: Optional model override.
Returns:
Dict with keys ``answer``, ``sources``, ``model``, ``ollama_available``.
|
| pin_memoryA | Pin a specific chunk to the hot memory tier. Pinned chunks are never demoted during maintenance runs and always
receive full relevance scores (no decay) regardless of how long ago
they were last accessed.
Args:
chunk_id: Stable chunk identifier ``<path>:<chunk_index>``.
Returns:
Confirmation dict with ``chunk_id``, ``tier``, and ``pinned`` fields.
|
| unpin_memoryA | Remove the manual pin from a chunk, allowing normal tiering. The chunk stays in the hot tier until the next maintenance run, after
which it will be promoted or demoted based on its access history.
Args:
chunk_id: Stable chunk identifier ``<path>:<chunk_index>``.
Returns:
Confirmation dict with ``chunk_id`` and ``pinned`` fields.
|
| forget_memoryA | Forget a chunk from memory using either instant suppression or gradual decay. Two modes are available:
- **suppress** (default): chunk is added to the suppression list and
immediately hidden from all search results. Use when you never want
to see this chunk again.
- **cold**: chunk is demoted to the cold memory tier so its relevance
score decays over time. The chunk stays visible but becomes less
prominent on each query. Use when you prefer gradual fading.
Use ``pin_memory`` to reverse a cold demotion and restore full relevance.
A suppressed chunk can only be unsuppressed by direct database access
(intentionally — suppression is permanent).
Args:
chunk_id: Stable chunk identifier ``<path>:<chunk_index>``.
mode: ``"suppress"`` or ``"cold"``. Defaults to ``"suppress"``.
Returns:
Confirmation dict with ``chunk_id``, ``mode``, and result fields.
|
| query_timelineA | Query the episodic memory timeline for recent activity. Returns a chronological log of retrieval and indexing events, allowing
an agent to reconstruct what the user was working on during a given
period.
Args:
since_days: How many days back to look.
event_type: Optional category filter.
limit: Maximum results.
Returns:
Dict with ``events`` list (each event has ``event_id``, ``timestamp``,
``event_type``, ``source``, ``chunk_ids``, ``client_id``,
``metadata``), ``total`` count, and ``since_ts`` / ``until_ts`` bounds.
|
| record_eventA | Record a custom episodic event in the memory timeline. Useful for agents to annotate significant moments (e.g. "user reviewed
this document", "agent summarised this file") without triggering a
search.
Args:
event_type: Category string for the event.
source: Associated file path or source name.
note: Free-text annotation stored in ``metadata.note``.
chunk_ids: Chunk identifiers involved.
Returns:
The persisted event dict with its generated ``event_id``.
|
| sync_sourceB | Fetch documents from one or all configured external connectors. Runs the enabled connectors defined in ``config.yaml`` and indexes
each fetched document into the search index.
Args:
source_type: Connector type key to run, or ``null`` for all.
dry_run: Fetch without indexing.
|
| get_entityA | Retrieve a named entity and its associated document chunks. Returns the entity's name, type, and the IDs of all chunks that
mention it. Requires entity extraction to have been enabled when
the documents were indexed (``indexing.entity_extraction.enabled``).
Args:
name: Entity name (case-insensitive).
entity_type: Optional type constraint.
|
| related_documentsA | Find documents semantically related to a given file or connector document. Retrieves the first chunk of the target document, embeds it, and
performs a vector similarity search to find the most related content.
Args:
path: Absolute file path or synthetic connector URI.
top_k: Number of similar documents to return.
exclude_self: Whether to exclude the source document from results.
|
| search_by_dateB | List indexed documents within a date range. Returns file records matching the given date window. Useful for
discovering recently indexed content or auditing what was indexed in
a specific period.
Args:
after: Only include documents indexed/modified after this date.
before: Only include documents indexed/modified before this date.
source: Restrict to this source name.
file_type: Restrict to this file type (e.g. ``".pdf"``).
limit: Maximum records to return.
|
| forget_sourceA | Remove all indexed content from a named source. Deletes every document belonging to *source* from the vector store,
BM25 index, and SQLite metadata. This is irreversible unless the
source is re-synced.
Args:
source: Source name as it appears in the index (e.g. ``"jira"``).
dry_run: Preview without deleting.
|
| summarize_sourceB | Return indexing statistics for one or all named sources. Reports the number of indexed documents, total chunks, file type
breakdown, and most recent indexed-at timestamp for each source.
Args:
source: Source name, or ``null`` for all sources.
|
| graph_memoryA | Return the entity co-occurrence knowledge graph. Nodes are named entities extracted from the indexed corpus. An edge
between two entities means they were mentioned in the same document
chunk; the edge weight is the number of shared chunks.
Args:
min_mentions: Minimum mention count for a node to appear.
entity_type: Optional entity type filter (e.g. ``"PERSON"``).
Returns:
Dict with ``"nodes"`` (id, label, type, mentions) and ``"edges"``
(source, target, weight, shared_chunks) lists.
|