retrieve_file

retrieve_file: Search and Retrieve Files

Searches for files matching query criteria and returns the results.

def retrieve_file(
    agent_name: str, 
    query_text: str,
    n: int,
    keywords: List[str] = None,
    base_url: str = aios_kernel_url
) -> StorageResponse

Parameters:

  • agent_name: Identifier for the agent making the request

  • query_text: Text to search for in files

  • n: Maximum number of results to return

  • keywords: Optional list of specific keywords to match

  • base_url: API endpoint URL

Returns:

  • StorageResponse object containing matched files

Example:

# Find Python files related to data processing
response = retrieve_file(
    "data_scientist",
    "data processing pipeline",
    n=5,
    keywords=["pandas", "numpy", "dataframe"]
)

print(response["response"]["response_message"])

Last updated