🛡️ 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.
Metadata
Release files for ethosguard 7.0.0
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 | Actions |
|---|---|---|---|---|
| ethosguard-7.0.0.tar.gz | 8.1 kB | Without provenance | Details for ethosguard-7.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ethosguard-7.0.0-py3-none-any.whl | Python 3 | none | any | Details for ethosguard-7.0.0-py3-none-any.whl |
Total release size: 16.0 kB
Release files / ethosguard-7.0.0.tar.gz
| Download URL | ethosguard-7.0.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2547de9f61ead01f5417415dbf8dbd0e16a7253a0a7a0db7514cf344cf579d15
|
|
BLAKE2b-256 checksum How to use checksums |
d512539dab52d728750bc695cabbd848e43b8c6050c5666f6f81529fbf5fd02b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / ethosguard-7.0.0-py3-none-any.whl
| Download URL | ethosguard-7.0.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab61a5f478b82f8ebbe3bd014a77dc727b3cc586440f786400eeb85968ea2d60
|
|
BLAKE2b-256 checksum How to use checksums |
608d872d5f7fdf72207183f7759402a5be8249b044c85099cf683a8dcf4c925d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for ethosguard 7.0.0
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.