AIOS Docs
  • Welcome
  • Getting Started
    • Installation
    • Quickstart
      • Use Terminal
      • Use WebUI
    • Environment Variables Configuration
  • AIOS Kernel
    • Overview
    • LLM Core(s)
      • LiteLLM Compatible Backend
      • vLLM Backend
      • Hugging Face Backend
      • LLM Routing
    • Scheduler
      • FIFOScheduler
      • RRScheduler
    • Context
    • Memory
      • Base Layer
      • Agentic Memory Operations
    • Storage
      • sto_mount
      • sto_create_file
      • sto_create_directory
      • sto_write
      • sto_retrieve
      • sto_rollback
      • sto_share
    • Tools
    • Access
    • Syscalls
    • Terminal
  • AIOS Agent
    • How to Use Agent
    • How to Develop Agents
      • Develop with Native SDK
      • Develop with AutoGen
      • Develop with Open-Interpreter
      • Develop with MetaGPT
    • How to Publish Agents
  • AIOS-Agent SDK
    • Overview
    • LLM Core API
      • llm_chat
      • llm_chat_with_json_output
      • llm_chat_with_tool_call_output
      • llm_call_tool
      • llm_operate_file
    • Memory API
      • create_memory
      • get_memory
      • update_memory
      • delete_memory
      • search_memories
      • create_agentic_memory
    • Storage API
      • mount
      • create_file
      • create_dir
      • write_file
      • retrieve_file
      • rollback_file
      • share_file
    • Tool API
      • How to Develop Tools
    • Access API
    • Post API
    • Agent API
  • Community
    • How to Contribute
Powered by GitBook
On this page
  1. AIOS-Agent SDK

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 data

  • finished: Boolean indicating whether the operation completed successfully

  • error: 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
Previouscreate_agentic_memoryNextmount

Last updated 1 month ago