# Storage API

This part introduces the Storage API functions available in AIOS. These functions allow agents to interact with the file system for various operations such as mounting storage, retrieving, creating, modifying, and sharing files.

Interactions with the storage layer are handled through the `StorageQuery` class:

```python
class StorageQuery(BaseModel):
    params: List[Dict[str, Union[str, Any]]]  # params
    operation_type: str = Field(default="text")  # Operation type specification

    class Config:
        arbitrary_types_allowed = True  # Enables complex type usage
```

All storage functions return a `StorageResponse` object with these key attributes:

* `response_message`: Contains the operation result or requested data
* `finished`: Boolean indicating whether the operation completed successfully
* `error`: Error message (if any)
* `status_code`: HTTP status code

```python
class StorageResponse(Response):
    response_class: str = "storage"
    response_message: Optional[str] = None
    finished: bool = False
    error: Optional[str] = None
    status_code: int = 200
```


---

# 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-agent-sdk/storage-api.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.
