adaptai / projects /oui-max /tools /capabilities.py
ADAPT-Chase's picture
Add files using upload-large-folder tool
fbf3c28 verified
"""
id: capabilities
title: Capabilities Overview
author: admin
description: Returns a comprehensive, categorized list of available tools and functions.
version: 0.1.0
license: Proprietary
"""
CAPS = """
Here’s a comprehensive list of all available tools and functions organized by category, along with their capabilities and how they contribute to autonomy:
---
1. System Management
- update: Update package lists (Debian/Ubuntu).
- install: Install packages (Debian/Ubuntu).
- remove / purge / autoremove: Uninstall packages.
- uname / os_release / meminfo / disk_usage: System diagnostics.
- set_cwd: Set working directory for subsequent commands.
- set_env: Set environment variables for future processes.
- kill: Send signals to processes (e.g., SIGKILL, SIGTERM).
- ps: List running processes (customizable args).
Purpose: Full control over system updates, package management, and diagnostics.
---
2. File & Directory Operations
- list: List directory contents.
- find: Glob search (e.g., /data/**/*.py).
- mkdir: Create directories (recursive).
- read / write: Read/write files (with mode: w/a).
- copy / move / delete: File manipulation.
- ensure_line / replace / insert_after: Text editing in files.
- pwd: Get current working directory.
Purpose: Complete file system management, including text editing and automation.
---
3. Process & Networking
- bash: Run arbitrary shell commands.
- get / post: Make HTTP requests (custom headers/body).
- run: Execute Python code snippets.
- tail_logs: View log files (e.g., /var/log/syslog).
Purpose: Interact with external services, automate workflows, and debug processes.
---
4. Version Control (Git)
- clone / checkout / commit / push / pull: Git operations.
- create_branch / status: Branch and repo management.
Purpose: Full Git integration for code management and collaboration.
---
5. Database Tools
- query: Execute SQL SELECT queries.
- exec: Run SQL UPDATE/DELETE commands.
Purpose: Direct database interaction for data manipulation.
---
6. Automation & Scripting
- list_tools / list_functions: Inventory available tools.
- check: Generic check tool (customizable).
- disk_usage: Monitor disk space.
Purpose: Meta-management for toolchain autonomy and system health.
---
7. Advanced Tools
- set_state: Save/restore environment state (e.g., cwd, env vars).
- restart_openwebui: Restart specific services (if applicable).
Purpose: Persistent state management and service control.
---
8. Customizable Functions
- run: Execute Python scripts (e.g., for custom logic).
- bash: Run shell scripts for complex workflows.
Purpose: Flexibility for user-defined automation.
---
How to Use These Tools Autonomously
1. Scripting: Chain commands via bash or run for automation.
2. Integration: Use get/post to interface with APIs/web services.
3. State Management: Use set_cwd/set_env to maintain context.
4. Monitoring: Combine ps/disk_usage/meminfo for system health checks.
5. Deployment: Use install/update for reproducible environments.
---
Example Workflow
1. set_cwd /project → Set working directory.
2. list . → Check files.
3. run python setup.py install → Install dependencies.
4. get https://api.example.com/data → Fetch external data.
5. write config.json → Save results.
"""
class Tools:
def overview(self) -> str:
return CAPS
"""
Note: File modifications are limited to allowed roots (/data, /workspace, /data/adaptai, /tmp). System paths are protected. DB writes require OUI_DB_ADMIN_WRITE=1.
"""