# sto\_retrieve

```python
def sto_retrieve(collection_name: str, query_text: str, k: str = 3, keywords: str = None) -> list
```

[Source code](https://github.com/agiresearch/AIOS/blob/main/aios/storage/filesystem/lsfs.py)

Descriptions: Retrieve relevant files based on either the query\_text or keywords

Parameters:

* collection\_name (str): Name of the collection/agent
* query\_text (str): Text to search for
* k (int): Number of results to return (default: 3)
* keywords (str): Additional keywords for filtering (optional)

Returns:

* Successful retrieval (List): Matched Documents
* Failed retrieval: Empty List


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aios.foundation/aios-docs/aios-kernel/storage/sto_retrieve.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
