Ossarth
AI-Powered Open-Source OS Customization Framework
An AI-driven framework for customizing Ossarth OS by dynamically creating and integrating custom tools & helper functions.
What is Ossarth?
Ossarth is an AI-powered customization framework designed exclusively for Ossarth OS. It allows users to extend their OS functionality dynamically by creating custom AI tools and general-purpose functions.
With Ossarth, users can:
✅ Modify and enhance their OS in real-time.
✅ Define and integrate LangChain-compatible AI tools.
✅ Create automation scripts and system utilities.
✅ Customize system monitoring and OS-level functionalities.
✅ Run a Flask-based AI-powered backend for managing custom tools.
Features
- AI-driven OS customization with dynamic tool creation.
- Create and integrate LangChain-compatible AI tools.
- Automate system tasks with helper functions.
- Predefined templates for structured function generation.
- Dynamic module generation for scalable OS enhancements.
- Designed specifically for Ossarth OS.
Installation
To install Ossarth, use PyPI:
pip install ossarth
Or install the latest version from GitHub:
pip install git+https://github.com/Siddharth-magesh/Ossarth.git
Quick Start
1. Import the Module
from ossarth.tool_manager import ToolManager
2. Initialize the Tool Manager
manager = ToolManager()
3. Create a Custom AI Tool
manager.create_custom_tool(
func_name="get_disk_usage",
description="Retrieves disk usage statistics.",
params="",
args_doc="None",
return_type="dict",
return_desc="A dictionary with total, used, and free disk space in GB.",
body="""
import shutil
path = "/"
total, used, free = shutil.disk_usage(path)
gb = 1024 * 1024 * 1024
return {
"total": f"{total / gb:.2f} GB",
"used": f"{used / gb:.2f} GB",
"free": f"{free / gb:.2f} GB"
}
""",
result_dir="custom_os_functions"
)
This will generate a Python file custom_os_functions/get_disk_usage.py, allowing Ossarth OS to retrieve disk usage dynamically.
Creating a Helper Function
manager.create_custom_function(
func_name="calculate_cpu_load",
description="Calculates the average CPU load over a given interval.",
params="interval: int",
args_doc="interval (int): The time interval for calculating CPU load.",
return_type="float",
return_desc="The average CPU load percentage.",
body="""
import psutil
return psutil.cpu_percent(interval=interval)
""",
result_dir="custom_helpers"
)
This will generate custom_helpers/calculate_cpu_load.py, a general Python function to monitor CPU load.
Folder Structure
After defining tools and functions, your directory structure will look like this:
Ossarth/
│── custom_os_functions/
│ ├── get_disk_usage.py # AI Tool for OS customization
│── custom_helpers/
│ ├── calculate_cpu_load.py # General function
│── ossarth/
│ ├── tool_manager.py # Core logic for tool management
│ ├── templates/
│ │ ├── general_template.py
│── README.md
│── setup.py
│── requirements.txt
Advanced Usage
Adding Multiple Functions in a Single File
To append new functions to an existing file instead of creating a new one:
manager.create_custom_tool(
func_name="get_memory_usage",
description="Retrieves system memory usage statistics.",
params="",
args_doc="None",
return_type="dict",
return_desc="A dictionary with total, used, and available memory in GB.",
body="""
import psutil
mem = psutil.virtual_memory()
gb = 1024 * 1024 * 1024
return {
"total": f"{mem.total / gb:.2f} GB",
"used": f"{mem.used / gb:.2f} GB",
"available": f"{mem.available / gb:.2f} GB"
}
""",
result_dir="custom_os_functions",
filename="system_monitoring.py"
)
This will add get_memory_usage to system_monitoring.py instead of creating a new file.
Testing the Ossarth Module
Use the following test cases to verify that Ossarth is correctly generating tools and functions:
from ossarth.tool_manager import CustomFunctionManager
manager = CustomFunctionManager(result_dir="tests")
# Test AI tool creation
manager.create_custom_tool(
func_name="test_tool",
description="A test tool function.",
params="param1: int, param2: str",
args_doc="param1 (int): An integer.\nparam2 (str): A string.",
return_type="str",
return_desc="A formatted string.",
body="return f'Test tool with {param1} and {param2}'",
filename="new"
)
# Test helper function creation
manager.create_custom_function(
func_name="test_function",
description="A test helper function.",
params="x: int, y: int",
args_doc="x (int): First number.\ny (int): Second number.",
return_type="int",
return_desc="Sum of x and y.",
body="return x + y",
filename="new"
)
These tests will ensure that Ossarth is correctly generating AI tools and helper functions for the OS.
License
Ossarth is licensed under the MIT License. You are free to modify and distribute it.
Contributing
We welcome contributions!
To contribute:
- Fork the repository.
- Make your changes in a new branch.
- Submit a pull request.
Contact & Support
For any questions or support:
📧 Email: siddharthmagesh007@gmail.com
🐙 GitHub: Siddharth-magesh
Metadata
Release files for Ossarth 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ossarth-0.1.1.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Ossarth-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / ossarth-0.1.1.tar.gz
| Download URL | ossarth-0.1.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2aa6facc67bd93ceaaba32f8e7ffd1b8959ece5bbe0d22e470ff81fc787aef08
|
|
BLAKE2b-256 checksum How to use checksums |
92c85e366b5e34024e45c31e0765dfcc60f04297ae6ff116e7be047b05719c02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Release files / Ossarth-0.1.1-py3-none-any.whl
| Download URL | Ossarth-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d88a6526b7af795e87c7ce56b034b73b21794bd48fdc221e17a6c4025b5a759b
|
|
BLAKE2b-256 checksum How to use checksums |
c957c0baee6c2a07704c2da1e2cc7654e2b781b3fad9d93ffdbe4abd94a1417f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Security for Ossarth 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.