Skip to main content

Constitutional AI Governance Framework - Grounded in Socratic Philosophy

Project description

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

pip install socratic-morality
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

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 for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socratic_morality-0.0.4.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socratic_morality-0.0.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file socratic_morality-0.0.4.tar.gz.

File metadata

  • Download URL: socratic_morality-0.0.4.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for socratic_morality-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4538f8d0e97c03cfdb19bdb16ef6e8286db9ed0b178c09bff27902720950b3c1
MD5 75918a79431ccf6e55fe15e3f0e25fdd
BLAKE2b-256 ce4037bfce62c46a1b9cc4613d05efe38f6e52a2dd92bf941313626f18cc71a0

See more details on using hashes here.

File details

Details for the file socratic_morality-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for socratic_morality-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d04509c77368b42b0eace26bfb0f29e2dfefeeb7e9ffc3aaa3cb08af905e0889
MD5 e5b957b82f3d906c206b4857ae51632b
BLAKE2b-256 9297c85b79a61244dc87c863096bef6e86456f5dcf0715c6ea52c39dd44f14ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page