anthropic-omega
Anthropic Claude Integration with OmegaEngine Governance
Documentation • Playground • Issues
✨ Features
- 🤖 Drop-in Replacement — Same API as official Anthropic SDK
- 🛡️ Pre-flight Checks — Validate prompts before sending to Claude
- 📊 Response Governance — Filter outputs against policies
- 📈 Full Audit Trail — Log every Claude interaction
- ⚡ Streaming Support — Governed streaming responses
- 🔄 Constitutional AI — Add policy constraints to any Claude call
📦 Installation
Python
pip install anthropic-omega
🚀 Quick Start (Python)
from anthropic_omega import Anthropic
# Drop-in replacement for Anthropic client
client = Anthropic(
anthropic_api_key="your-anthropic-key",
omega_api_key="your-omega-key",
policy_id="claude_policy",
)
# Same API, but governed
message = client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
messages=[
{"role": "user", "content": "Help me write a marketing email"}
]
)
print(message.content[0].text)
# Access governance metadata
print(message.omega_decision) # "APPROVE"
print(message.omega_audit_id) # "aud_abc123"
🛡️ Pre-flight Validation
Block unsafe prompts before they reach Claude:
client = Anthropic(
anthropic_api_key="...",
omega_api_key="...",
preflight_check=True, # Validate prompts first
block_on_deny=True, # Don't send if denied
)
try:
# This will be blocked if policy denies
message = client.messages.create(
model="claude-3-5-sonnet-20241022",
messages=[{"role": "user", "content": "...potentially unsafe..."}]
)
except OmegaBlockedError as e:
print(f"Blocked: {e.reason}")
print(f"Policy tags: {e.policy_tags}")
📡 Governed Streaming
with client.messages.stream(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
messages=[{"role": "user", "content": "Write a story"}]
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
# Final response is still validated
print(f"\nDecision: {stream.omega_decision}")
🎯 Use Cases
| Use Case | How It Helps |
|---|---|
| Customer Support Bots | Ensure Claude doesn't share internal policies |
| Content Generation | Block harmful or off-brand content |
| Code Assistants | Prevent generation of malicious code |
| Healthcare Apps | Enforce HIPAA compliance |
| Finance Apps | Ensure FINRA compliance |
📊 What Gets Logged
Every Claude call logs:
- ✅ Input messages
- ✅ Output response
- ✅ Token usage
- ✅ Model used
- ✅ Latency
- ✅ Policy evaluation
- ✅ Risk assessment
- ✅ Audit trail ID
📄 License
Licensed under the Apache License 2.0.
Built with ❤️ by the OmegaEngine team
Metadata
Release files for anthropic-omega 0.3.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 |
|---|---|---|---|---|
| anthropic_omega-0.3.0.tar.gz | 564.0 kB | Without provenance | Details for anthropic_omega-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anthropic_omega-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for anthropic_omega-0.3.0-py3-none-any.whl |
Total release size: 577.7 kB
Release files / anthropic_omega-0.3.0.tar.gz
| Download URL | anthropic_omega-0.3.0.tar.gz |
|---|---|
| Size | 564.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0be4d42a14f052adb3a3e3b01ba57967fac2b68564cdbb4b0022df6bc0b04c69
|
|
BLAKE2b-256 checksum How to use checksums |
5a6e3b2cb2a13b3649462e6b579c377b3f7db65815640be74274214d83a3546e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / anthropic_omega-0.3.0-py3-none-any.whl
| Download URL | anthropic_omega-0.3.0-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cafa2ed4ff8dd84211e872bd55c75b08f370c8a60f12a69991151c7dc37c08f6
|
|
BLAKE2b-256 checksum How to use checksums |
53ecc349082b9684d485356d966a8b257be425e1f9dd06d77c6f93eda0a7e433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for anthropic-omega 0.3.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.