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:
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 datafinished
: Boolean indicating whether the operation completed successfullyerror
: Error message (if any)status_code
: HTTP status code
class StorageResponse(Response):
response_class: str = "storage"
response_message: Optional[str] = None
finished: bool = False
error: Optional[str] = None
status_code: int = 200
Last updated