Metadata-Version: 2.4
Name: socratic-morality
Version: 0.0.4
Summary: Constitutional AI Governance Framework - Grounded in Socratic Philosophy
Author-email: Anthropic <support@anthropic.com>
License: MIT
Project-URL: Homepage, https://github.com/Nireus79/Socratic-morality
Project-URL: Documentation, https://socratic-morality.readthedocs.io
Project-URL: Repository, https://github.com/Nireus79/Socratic-morality.git
Project-URL: Issues, https://github.com/Nireus79/Socratic-morality/issues
Keywords: constitutional-ai,governance,socratic-philosophy,ethical-ai,multi-agent,llm-safety
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: typing-extensions>=4.0
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.40; extra == "anthropic"
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == "openai"
Provides-Extra: storage-sqlite
Requires-Dist: aiosqlite>=0.19; extra == "storage-sqlite"
Provides-Extra: storage-postgres
Requires-Dist: psycopg2>=2.9; extra == "storage-postgres"
Provides-Extra: semantics
Requires-Dist: sentence-transformers>=3.0; extra == "semantics"
Provides-Extra: langchain
Requires-Dist: langchain>=0.1; extra == "langchain"
Provides-Extra: autogen
Requires-Dist: pyautogen>=0.2; extra == "autogen"
Provides-Extra: crewai
Requires-Dist: crewai>=0.1; extra == "crewai"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: pre-commit>=3.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=5.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=1.0; extra == "docs"
Dynamic: license-file

# Socratic Morality

**Constitutional AI Governance Framework** - Building trustworthy, accountable multi-agent systems grounded in Socratic philosophy.

> "It is better to suffer injustice than to commit it." — Plato's Gorgias

## Quick Start

```bash
pip install socratic-morality
```

```python
from socratic_morality import Governor

governor = Governor(constitution="constitution.yaml", llm_provider="anthropic")
decision = await governor.evaluate(
    action="Access user's private data",
    purpose="Personalization",
    actor="recommendation_agent",
    context={"user_id": "user_123"}
)
```

## Documentation

- [API Reference](docs/)
- [Philosophy Guide](docs/)
- [Examples](examples/)

## Features

### Phase 1 - Foundation
- **Governor** - Core decision-making engine for constitutional AI checks
- **Constitution Framework** - YAML-based principles and rules
- **CapabilityToken System** - Fine-grained capability management
- **Storage Backends** - SQLite and PostgreSQL support

### Phase 2 - Ethical Reasoning
- **Multi-Framework Ethical Analysis**
  - Kantian deontological analysis
  - Utilitarian consequentialist analysis
  - Virtue ethics analysis
  - Rights-based analysis
  - LLM integration with fallback keyword analysis
- **Moral Precedent Engine** - Case-based decision tracking
- **Semantic Embeddings** - Similarity search with caching
- **Explanation Generation** - Transparent reasoning output

## Status

**Phase 1 & 2**: Complete ✅ (v0.0.3)
- Published to PyPI: `pip install socratic-morality==0.0.3`
- Used by: socratic-agents (governance integration)

## License

MIT License - See [LICENSE](LICENSE) for details
