A distributed, open-source language model exposing philosophical reasoning as an agentic API
Project description
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
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 nwo_ethics_engine-0.1.0.tar.gz.
File metadata
- Download URL: nwo_ethics_engine-0.1.0.tar.gz
- Upload date:
- Size: 51.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a471b4b4531da892f25f85d05b98bd294caedd933ffc3e33f96a16e5d3004377
|
|
| MD5 |
5241c97feaed03bcef738faa11b6a951
|
|
| BLAKE2b-256 |
1119843c06f3ec28bf478d8c24e0ef8dd21ac4b1b44c318b56c3d6906f11253b
|
File details
Details for the file nwo_ethics_engine-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nwo_ethics_engine-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
349d9ad56f77f8dbc5ba1f6244c5d1676217099e0b648879b6104267b8b87f0c
|
|
| MD5 |
2a7bf1a787660b80c699a03c677ec7bc
|
|
| BLAKE2b-256 |
3e0a3c349efa72b47df9e009e1f447fa10035e044b01817a1b9932454c4830b7
|