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
  • Structure of Tool Query and Response
  • Available Tool Management Commands
  1. AIOS-Agent SDK

Tool API

Structure of Tool Query and Response

The ToolQuery class defines the structure for tool operation requests:

class ToolQuery(Query):
    query_class: str = "tool"
    tool_calls: List[Dict[str, Union[str, Any]]]
    
    class Config:
        arbitrary_types_allowed = True

The ToolResponse class defines the structure for tool operation responses:

class ToolResponse(Response):
    response_class: str = "tool"
    response_message: Optional[str] = None
    finished: bool = False
    error: Optional[str] = None
    status_code: int = 200

Available Tool Management Commands

List Hub Tools

# View all tools available in the AIOS Tool Hub
list-toolhub-tools

List Local Tools

# View tools installed on your local system
list-local-tools

Download a Tool

# Get a specific tool from the AIOS Tool Hub
download-tool \
  --tool_author <author_name> \
  --tool_name <tool_name> \
  --tool_version <version_number> \
  --toolhub_url <hub_url>

Upload a Tool

# Share your custom tool with the AIOS community
upload-tool \
  --tool_path <path_to_tool_directory> \
  --toolhub_url <hub_url>

These commands help you discover, install, and share tools that extend AIOS functionality. Tools can provide specialized capabilities like data processing, external API access, and advanced computational features.

Previousshare_fileNextHow to Develop Tools

Last updated 1 month ago