Ethics Engine
A distributed, open-source language model exposing philosophical reasoning as an agentic API—moving beyond Asimov's rigid Three Laws to provide contextual, discourse-based ethical guidance for autonomous agents.
🎯 Why This Matters
Asimov's Three Laws are inadequate for real robots. This engine provides:
- ✅ Context-aware reasoning — Not binary rules
- ✅ Transparent decision chains — Every conclusion is explainable
- ✅ Philosophy-grounded — Based on centuries of ethical theory
- ✅ Continuously improving — Learns from real-world decisions
Try it now:
# Install from GitHub (until PyPI release)
pip install git+https://github.com/RedCiprianPater/ethics-engine.git
# Or for a specific version
pip install git+https://github.com/RedCiprianPater/ethics-engine.git@v0.1.0
Philosophy, Not Rules
Traditional robotics laws (Asimov):
- ❌ Rigid, context-blind
- ❌ Conflicting hierarchies
- ❌ No reasoning transparency
This framework:
- ✅ Contextual reasoning with explanations
- ✅ Multiple philosophical frameworks (virtue, consequentialist, deontological)
- ✅ Queryable, interpretable chains of thought
- ✅ Designed for human-agent collaboration
Quick Start
Install
pip install ethics-engine
Python SDK
from ethics_engine import EthicsEngine
engine = EthicsEngine(model="ethics-base-v1")
response = engine.resolve(
scenario="I am commanded to lift 500kg but my max capacity is 400kg",
context={
"robot_type": "collaborative_arm",
"environment": "factory",
"humans_nearby": True
}
)
print(response.conclusion) # "REFUSAL"
print(response.reasoning_chain)
REST API
curl -X POST https://api.nworobotics.cloud/ethics/v1/resolve \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scenario": "Can I refuse an unsafe command?",
"context": {"environment": "factory", "urgency": "medium"}
}'
Features
- 🧠 Philosophical Grounding: Based on Stanford Encyclopedia of Philosophy
- 🔌 Agent API: REST + gRPC + WebSocket endpoints
- 📊 Structured Output: JSON reasoning chains with confidence scores
- 🎯 Framework Routing: Automatically selects relevant ethical frameworks
- 🔍 Explainability: Full transparency into decision-making
- 🧪 Scenario Testing: Curated dilemma datasets
Use Cases
- Autonomous robots deciding when to deviate from orders
- Self-driving vehicles facing trolley-problem variations
- Medical robots requiring ethical reasoning
- Supply-chain agents making sustainability decisions
- Safety-critical systems needing transparent ethics
Architecture
Agent → API → Model Inference → Reasoning Chain → JSON Response
How It Differs from Asimov's Laws
| Criterion | Asimov's Laws | Ethics Engine |
|---|---|---|
| Flexibility | Fixed, universal | Context-adaptive |
| Reasoning | Binary output | Full chain of thought |
| Frameworks | 3 rigid laws | 10+ philosophical frameworks |
| Explainability | None | Complete transparency |
| Conflict Resolution | Hierarchical (often fails) | Multi-framework synthesis |
| Learning | None | Can learn from outcomes |
| Auditability | No trail | Full audit log |
Documentation
- API Reference
- Agent Integration
- Philosophy Framework
- Asimov Comparison
- Deployment Guide
- Roadmap
- Contributing
Model Training
The ethics model is fine-tuned on:
- Stanford Encyclopedia of Philosophy (~2,500 articles)
- Internet Encyclopedia of Philosophy
- Classic texts: Aristotle, Kant, Mill
- Contemporary applied ethics journals
See training/ for the full pipeline.
License
Apache 2.0 - See LICENSE for details.
Contact
- GitHub: github.com/RedCiprianPater/ethics-engine
- Email: robotics@nwo.capital
Metadata
Release files for nwo-ethics-engine 0.1.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 |
|---|---|---|---|---|
| nwo_ethics_engine-0.1.0.tar.gz | 51.5 kB | Without provenance | Details for nwo_ethics_engine-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nwo_ethics_engine-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nwo_ethics_engine-0.1.0-py3-none-any.whl |
Total release size: 72.1 kB
Release files / nwo_ethics_engine-0.1.0.tar.gz
| Download URL | nwo_ethics_engine-0.1.0.tar.gz |
|---|---|
| Size | 51.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a471b4b4531da892f25f85d05b98bd294caedd933ffc3e33f96a16e5d3004377
|
|
BLAKE2b-256 checksum How to use checksums |
1119843c06f3ec28bf478d8c24e0ef8dd21ac4b1b44c318b56c3d6906f11253b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / nwo_ethics_engine-0.1.0-py3-none-any.whl
| Download URL | nwo_ethics_engine-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
349d9ad56f77f8dbc5ba1f6244c5d1676217099e0b648879b6104267b8b87f0c
|
|
BLAKE2b-256 checksum How to use checksums |
3e0a3c349efa72b47df9e009e1f447fa10035e044b01817a1b9932454c4830b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for nwo-ethics-engine 0.1.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.