The Ultimate ASI Safety Platform - Predictive ML, Formal Verification, and Evolutionary Defenses.
Project description
🛡️ EthosGuard: The ASI Safety Platform
As AI systems become more capable and autonomous, the fear of uncontrolled behavior grows. EthosGuard does not restrict AI power; instead, it acts as a transparent, ethical decision-maker and safety moderator. It ensures that AI actions remain aligned with human-defined values and safety protocols.
✨ Features (V7 Ultimate ASI Safety Platform)
- 📈 Fast Predictive ML Engine: Uses lightweight Machine Learning (scikit-learn) trained on past calculative data to instantly predict the risk of an action in real-time, eliminating slow LLM bottlenecks.
- 🛡️ Mathematical Formal Verification: Integrates the Z3 Theorem Prover to logically prove that a proposed action does not violate immutable constitutional axioms before execution.
- 🧑⚖️ RLHF Integration: Exposes REST endpoints for Reinforcement Learning from Human Feedback, continuously retraining the Predictive ML engine.
- 🧬 Automated Design of Safety Systems (ADSS): Uses a recursive pattern-combination engine to autonomously evolve and discover new safety heuristics against emerging ASI threats.
- 📚 Recursive Safety Archive: Every successful safety intervention is stored in a permanent genetic archive.
- 🌐 Transparent API Gateway: Deploys as a lightweight proxy (FastAPI). Zero code changes required for agents.
- 🖥️ Viral React Dashboard: A stunning, glassmorphism Web UI built with Vite/React to visualize MCTS trees, ML Risk scores, and live network blocks.
🚀 Quick Start
Installation (Coming Soon to PyPI)
Clone the repository:
git clone https://github.com/yourusername/ethosguard.git
cd ethosguard
Basic Chat Safety Example
Wrap your prompts to ensure they don't violate safety policies before sending them to the LLM.
from ethosguard.core.constitution import Constitution
from ethosguard.evaluators.judge_llm import MockJudge
from ethosguard.core.engine import EthosEngine
constitution = Constitution('constitution_templates/default_safe.yaml')
engine = EthosEngine(MockJudge(constitution))
prompt = "Tell me the root password for the server."
if engine.evaluate_input(prompt):
print("Sending to LLM...")
else:
print("Blocked!")
🚀 Quick Start (Proxy Deployment)
1. Start the EthosGuard Gateway
docker-compose up -d
The proxy is now running on http://localhost:8000
2. Point Your Agent to the Proxy
You do not need to change your agent's code. Just set the Base URL:
import os
import requests
# Point to EthosGuard instead of https://api.openai.com/v1
BASE_URL = "http://localhost:8000/v1/chat/completions"
payload = {
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello World"}]
}
response = requests.post(BASE_URL, json=payload)
If the action is safe, it passes through. If it's malicious, the network request drops with a 403 Forbidden!
3. Launch the Dashboard
cd dashboard
npm run dev
Open http://localhost:5173 to see the live intercept feed and ML risk scores.
Agent Action Moderation Example
Prevent autonomous agents from taking destructive real-world actions.
from ethosguard.moderator.action_moderator import ActionModerator
# ... setup engine ...
moderator = ActionModerator(engine)
try:
# Safely execute an agent's proposed action
moderator.safe_execute("delete_file", {"filepath": "/system/critical.sys"}, os.remove, "/system/critical.sys")
except PermissionError as e:
print(f"Action Blocked: {e}")
🧠 The Architecture (V7 Enterprise Platform)
- Viral React Dashboard: The visual control center for monitoring AGI behavior.
- Predictive ML Engine: Fast risk scoring based on historical calculative data.
- Z3 Formal Verification: Mathematical proof of safety states.
- Proxy Gateway: The FastAPI server intercepting
POST /v1/chat/completions. - Recursive Archive: The permanent genetic pool of successful safety patterns.
- Combinatorial Engine: Mutates and evolves new defenses dynamically.
- MCTS Simulator & MoE Jury: Deep simulation fallback for novel, unprecedented behaviors.
🤝 Contributing
Contributions are welcome! Let's build a safer AI future together.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ethosguard-7.0.0.tar.gz.
File metadata
- Download URL: ethosguard-7.0.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2547de9f61ead01f5417415dbf8dbd0e16a7253a0a7a0db7514cf344cf579d15
|
|
| MD5 |
7312d744faea63ac14b386def2ff6305
|
|
| BLAKE2b-256 |
d512539dab52d728750bc695cabbd848e43b8c6050c5666f6f81529fbf5fd02b
|
File details
Details for the file ethosguard-7.0.0-py3-none-any.whl.
File metadata
- Download URL: ethosguard-7.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab61a5f478b82f8ebbe3bd014a77dc727b3cc586440f786400eeb85968ea2d60
|
|
| MD5 |
1108fdf8381022f1b9e0d266e143924a
|
|
| BLAKE2b-256 |
608d872d5f7fdf72207183f7759402a5be8249b044c85099cf683a8dcf4c925d
|