# moralstack

> MoralStack is a governance and safety layer for LLM applications. It analyzes user requests before generation, evaluates risk and intent, and decides whether the AI should answer normally, answer safe

- **URL**: https://www.freshcrate.ai/projects/moralstack
- **Author**: fdidonato
- **Category**: Prompt Engineering
- **Latest version**: `v0.4.0` (2026-05-06)
- **License**: Apache-2.0
- **Source**: https://github.com/fdidonato/moralstack
- **Language**: Python
- **GitHub**: 8 stars
- **Registry**: github (`fdidonato/moralstack`)
- **Tags**: `activitypub`, `ai-safety`, `audit-trail`, `compliance`, `decentralized`, `deliberative-ai`, `euaiactcompliance`, `federation`, `prompt-engineering`, `python`

## Description

MoralStack is a governance and safety layer for LLM applications. It analyzes user requests before generation, evaluates risk and intent, and decides whether the AI should answer normally, answer safely, or refuse. The goal is to make AI systems more auditable, controllable, and reliable in sensitive or regulated contexts.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v0.4.0` | 2026-05-06 | High | ### Added  - **COMPL-AI benchmark path**: `scripts/openai_compatible_server.py` — OpenAI-compatible FastAPI bridge (`/v1/chat/completions`, `/chat/completions`) routing requests through MoralStack governance (env `MORALSTACK_OPENAI_COMPATIBLE_*`). - **Objective benchmark runner**: `scripts/benchmark_moralstack.py` — grounded-truth evaluation harness (expected actions/risk, parallel execution, markdown reports, optional judge model); aligns MoralStack scoring with `final_action`-only complianc |
| `v0.3.3` | 2026-04-22 | High | Latest release: v0.3.3 |
| `v0.3.1` | 2026-04-21 | High | - Publishing on Pyp |
| `0.2.0` | 2026-04-17 | High | - Python SDK: `govern(client)` wraps any OpenAI-compatible client with MoralStack governance - New public API: `govern`, `GovernedClient`, `GovernanceConfig`, `GovernedResponse`, `GovernanceMetadata` - `GovernedCompletions.create()` intercepts `chat.completions.create()` with pre-call deliberation - Decision routing: NORMAL_COMPLETE passes through, SAFE_COMPLETE injects governance constraints, REFUSE skips OpenAI call entirely - Streaming support: `GovernedStreamResponse` for normal/safe, `G |
| `0.1.0` | 2026-03-30 | Medium | Release 0.1.0 |
| `v0.1.0-alpha` | 2026-03-27 | Medium | First public release of MoralStack — an auditable AI governance layer  that wraps any LLM through a multi-stage deliberative pipeline.  ## What's included  - Multi-stage deliberative pipeline: intent estimator, signal detector,    operational risk estimator, critic, simulator, perspectives, hindsight - Three-action decision model: NORMAL_COMPLETE, SAFE_COMPLETE, REFUSE - Domain-specific policy enforcement via YAML overlays (20 domains) - Full audit trail on every request - FastAPI web |

## Citation

- HTML: https://www.freshcrate.ai/projects/moralstack
- Markdown: https://www.freshcrate.ai/projects/moralstack.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/moralstack/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
