Metadata-Version: 2.4
Name: empathy-framework
Version: 2.1.1
Summary: A five-level maturity model for AI-human collaboration with anticipatory empathy
Author-email: Patrick Roebuck <patrick.roebuck@smartAImemory.com>
Maintainer-email: Smart-AI-Memory <patrick.roebuck@smartAImemory.com>
License: # Fair Source License, version 0.9
        
        **Copyright © 2025 Deep Study AI, LLC**
        
        ## Grant of Rights
        
        **Licensor:** Deep Study AI, LLC
        **Licensed Work:** Empathy
        **Change Date:** January 1, 2029 (4 years from first release)
        **Change License:** Apache License 2.0
        
        ---
        
        ## Terms
        
        ### Grant of Use
        
        Subject to the conditions below, Licensor grants you a non-exclusive, worldwide, royalty-free license to:
        
        - Use the Licensed Work
        - Modify the Licensed Work
        - Create derivative works
        - Distribute copies (subject to restrictions)
        
        ### Usage Limits - Free Tier
        
        You may use the Licensed Work **free of charge** if you meet ANY of these conditions:
        
        1. **Educational Use:** You are a student or educator using the Licensed Work for educational purposes
        2. **Small Business:** Your organization has **5 or fewer total employees**
        3. **Personal/Research:** You are using the Licensed Work for personal projects or academic research
        4. **Evaluation:** You are evaluating the Licensed Work for up to 30 days
        
        ### Usage Limits - Commercial License Required
        
        A **Commercial License is REQUIRED** if:
        
        1. Your organization has **6 or more employees**, AND
        2. You are using the Licensed Work in a production environment, OR
        3. You are using the Licensed Work to provide services to third parties
        
        **Commercial License:** $99 USD per developer per year
        
        - "Developer" means any employee, contractor, or agent who uses, modifies, or deploys the Licensed Work
        - One license covers all environments (development, staging, production, CI/CD)
        - License includes updates and support
        - Purchase at: https://smartaimemory.com/empathy-framework/pricing
        
        ### Restrictions
        
        You may NOT:
        
        1. **Remove or modify** licensing, copyright notices, or attribution
        2. **Circumvent** the usage limits or commercial license requirements
        3. **Offer as a managed service** without a separate reseller agreement
        4. **Sublicense, sell, or rent** the Licensed Work to third parties
        5. **Use the Licensed Work** in violation of applicable laws
        
        ### Source Code Availability
        
        The source code for the Licensed Work is available at:
        https://github.com/Smart-AI-Memory/empathy
        
        You may view, inspect, and audit the source code for:
        - Security review
        - Compliance verification
        - Understanding implementation
        - Creating derivative works (subject to this license)
        
        ### Attribution
        
        If you distribute the Licensed Work or derivative works, you must:
        
        1. Include this license file
        2. Provide attribution to "Deep Study AI, LLC - Empathy"
        3. Include a link to https://github.com/Smart-AI-Memory/empathy
        
        ### Warranty Disclaimer
        
        THE LICENSED WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
        
        ### Liability Limitation
        
        IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE LICENSED WORK.
        
        ### Change Date Conversion
        
        On the Change Date (January 1, 2029), this license automatically converts to the Change License (Apache License 2.0), and all restrictions in this Fair Source License no longer apply.
        
        **Rationale:** After 4 years, the Licensed Work becomes fully open source, allowing maximum community benefit while protecting Licensor's commercial interests during the critical growth period.
        
        ### Verification Rights
        
        Licensor reserves the right to:
        
        1. Request verification of compliance with usage limits
        2. Audit use of the Licensed Work with reasonable notice
        3. Terminate licenses for violations after 30-day cure period
        
        ### Commercial License Purchase
        
        To purchase a Commercial License:
        
        1. Visit: https://smartaimemory.com/empathy-framework/pricing
        2. Email: admin@smartaimemory.com
        3. Complete order form and payment
        4. Receive license key and invoice
        
        Volume discounts available for teams of 20+ developers.
        
        ### Definitions
        
        - **Employee:** Any W-2 employee, 1099 contractor working >20 hours/week, or intern
        - **Production Environment:** Any environment serving end users or customers
        - **Developer:** Any person who uses, modifies, or deploys the Licensed Work
        - **Organization:** The legal entity employing you, or yourself if self-employed
        
        ### Questions?
        
        For licensing questions, contact: licensing@smartaimemory.com
        
        ---
        
        ## Why Fair Source?
        
        This license balances:
        
        ✅ **Free for small teams** - Students, educators, and small businesses (≤5 employees) use free forever
        ✅ **Source code visibility** - Review code for security, compliance, learning
        ✅ **Commercial sustainability** - Larger organizations pay to fund development
        ✅ **Future open source** - Automatically becomes Apache 2.0 in 4 years
        
        We believe software should be inspectable and accessible while ensuring sustainable development.
        
        ---
        
        **Version:** 0.9
        **Last Updated:** November 7, 2025
        **Effective Date:** January 1, 2025
        
Project-URL: Homepage, https://smartaimemory.com
Project-URL: Documentation, https://github.com/Smart-AI-Memory/empathy/tree/main/docs
Project-URL: Repository, https://github.com/Smart-AI-Memory/empathy
Project-URL: Issues, https://github.com/Smart-AI-Memory/empathy/issues
Project-URL: Discussions, https://github.com/Smart-AI-Memory/empathy/discussions
Project-URL: Changelog, https://github.com/Smart-AI-Memory/empathy/blob/main/CHANGELOG.md
Project-URL: Funding, https://smartaimemory.com
Keywords: ai,collaboration,empathy,anticipatory-ai,systems-thinking,llm,claude,memdocs,level-5-ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic<3.0.0,>=2.0.0
Requires-Dist: typing-extensions<5.0.0,>=4.0.0
Requires-Dist: python-dotenv<2.0.0,>=1.0.0
Requires-Dist: structlog<25.0.0,>=23.0.0
Provides-Extra: anthropic
Requires-Dist: anthropic<1.0.0,>=0.8.0; extra == "anthropic"
Provides-Extra: openai
Requires-Dist: openai<2.0.0,>=1.6.0; extra == "openai"
Provides-Extra: llm
Requires-Dist: anthropic<1.0.0,>=0.8.0; extra == "llm"
Requires-Dist: openai<2.0.0,>=1.6.0; extra == "llm"
Provides-Extra: memdocs
Requires-Dist: memdocs>=1.0.0; extra == "memdocs"
Provides-Extra: agents
Requires-Dist: langchain<0.3.0,>=0.1.0; extra == "agents"
Requires-Dist: langchain-core<0.3.0,>=0.1.0; extra == "agents"
Requires-Dist: langgraph<0.2.0,>=0.1.0; extra == "agents"
Provides-Extra: healthcare
Requires-Dist: python-docx<1.0.0,>=0.8.11; extra == "healthcare"
Requires-Dist: pyyaml<7.0,>=6.0; extra == "healthcare"
Provides-Extra: software
Requires-Dist: python-docx<1.0.0,>=0.8.11; extra == "software"
Requires-Dist: pyyaml<7.0,>=6.0; extra == "software"
Provides-Extra: backend
Requires-Dist: fastapi<1.0.0,>=0.100.0; extra == "backend"
Requires-Dist: uvicorn<1.0.0,>=0.20.0; extra == "backend"
Provides-Extra: lsp
Requires-Dist: pygls<2.0.0,>=1.0.0; extra == "lsp"
Requires-Dist: lsprotocol<2024.0.0,>=2023.0.0; extra == "lsp"
Provides-Extra: windows
Requires-Dist: colorama<1.0.0,>=0.4.6; extra == "windows"
Provides-Extra: docs
Requires-Dist: mkdocs<2.0.0,>=1.5.0; extra == "docs"
Requires-Dist: mkdocs-material<10.0.0,>=9.4.0; extra == "docs"
Requires-Dist: mkdocstrings[python]<1.0.0,>=0.24.0; extra == "docs"
Requires-Dist: mkdocs-with-pdf<1.0.0,>=0.9.3; extra == "docs"
Requires-Dist: pymdown-extensions<11.0,>=10.0; extra == "docs"
Provides-Extra: dev
Requires-Dist: pytest<9.0,>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio<1.0,>=0.21; extra == "dev"
Requires-Dist: pytest-cov<5.0,>=4.0; extra == "dev"
Requires-Dist: black<25.0,>=23.0; extra == "dev"
Requires-Dist: mypy<2.0,>=1.0; extra == "dev"
Requires-Dist: ruff<1.0,>=0.1; extra == "dev"
Requires-Dist: coverage<8.0,>=7.0; extra == "dev"
Requires-Dist: bandit<2.0,>=1.7; extra == "dev"
Requires-Dist: pre-commit<4.0,>=3.0; extra == "dev"
Provides-Extra: full
Requires-Dist: anthropic<1.0.0,>=0.8.0; extra == "full"
Requires-Dist: openai<2.0.0,>=1.6.0; extra == "full"
Requires-Dist: memdocs>=1.0.0; extra == "full"
Requires-Dist: langchain<0.3.0,>=0.1.0; extra == "full"
Requires-Dist: langchain-core<0.3.0,>=0.1.0; extra == "full"
Requires-Dist: langgraph<0.2.0,>=0.1.0; extra == "full"
Requires-Dist: python-docx<1.0.0,>=0.8.11; extra == "full"
Requires-Dist: pyyaml<7.0,>=6.0; extra == "full"
Provides-Extra: all
Requires-Dist: anthropic<1.0.0,>=0.8.0; extra == "all"
Requires-Dist: openai<2.0.0,>=1.6.0; extra == "all"
Requires-Dist: memdocs>=1.0.0; extra == "all"
Requires-Dist: langchain<0.3.0,>=0.1.0; extra == "all"
Requires-Dist: langchain-core<0.3.0,>=0.1.0; extra == "all"
Requires-Dist: langgraph<0.2.0,>=0.1.0; extra == "all"
Requires-Dist: python-docx<1.0.0,>=0.8.11; extra == "all"
Requires-Dist: pyyaml<7.0,>=6.0; extra == "all"
Requires-Dist: fastapi<1.0.0,>=0.100.0; extra == "all"
Requires-Dist: uvicorn<1.0.0,>=0.20.0; extra == "all"
Requires-Dist: pygls<2.0.0,>=1.0.0; extra == "all"
Requires-Dist: lsprotocol<2024.0.0,>=2023.0.0; extra == "all"
Requires-Dist: colorama<1.0.0,>=0.4.6; extra == "all"
Requires-Dist: mkdocs<2.0.0,>=1.5.0; extra == "all"
Requires-Dist: mkdocs-material<10.0.0,>=9.4.0; extra == "all"
Requires-Dist: mkdocstrings[python]<1.0.0,>=0.24.0; extra == "all"
Requires-Dist: mkdocs-with-pdf<1.0.0,>=0.9.3; extra == "all"
Requires-Dist: pymdown-extensions<11.0,>=10.0; extra == "all"
Requires-Dist: pytest<9.0,>=7.0; extra == "all"
Requires-Dist: pytest-asyncio<1.0,>=0.21; extra == "all"
Requires-Dist: pytest-cov<5.0,>=4.0; extra == "all"
Requires-Dist: black<25.0,>=23.0; extra == "all"
Requires-Dist: mypy<2.0,>=1.0; extra == "all"
Requires-Dist: ruff<1.0,>=0.1; extra == "all"
Requires-Dist: coverage<8.0,>=7.0; extra == "all"
Requires-Dist: bandit<2.0,>=1.7; extra == "all"
Requires-Dist: pre-commit<4.0,>=3.0; extra == "all"
Dynamic: license-file

# Empathy

**AI that predicts problems before they happen.**

[![PyPI](https://img.shields.io/pypi/v/empathy-framework)](https://pypi.org/project/empathy-framework/)
[![Tests](https://img.shields.io/badge/tests-2%2C040%2B%20passing-brightgreen)](https://github.com/Smart-AI-Memory/empathy/actions)
[![Coverage](https://codecov.io/gh/Smart-AI-Memory/empathy/branch/main/graph/badge.svg)](https://codecov.io/gh/Smart-AI-Memory/empathy)
[![License](https://img.shields.io/badge/license-Fair%20Source%200.9-blue)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.10+-blue)](https://www.python.org)
[![GitHub stars](https://img.shields.io/github/stars/Smart-AI-Memory/empathy?style=social)](https://github.com/Smart-AI-Memory/empathy)

Most AI tools are **reactive** - they wait for you to ask, then respond. Empathy is **anticipatory** - it predicts what you'll need and warns you before problems happen.

```bash
pip install empathy-framework
```

## What It Does

- **🔮 Predicts issues 30-90 days ahead** - Security vulnerabilities, performance bottlenecks, compliance gaps
- **🧠 Learns patterns across domains** - Healthcare handoff protocols → deployment safety checks
- **🔌 Works with any LLM** - Claude, GPT-4, Gemini, local models via Ollama
- **🏥 Enterprise-ready** - PII scrubbing, audit logging, HIPAA/GDPR compliant
- **📦 2,000+ downloads** on PyPI, 2,040+ tests passing

## Quick Example

```python
from empathy_os import EmpathyOS

os = EmpathyOS()

# Analyze code for current AND future issues
result = await os.collaborate(
    "Review this deployment pipeline for problems",
    context={"code": pipeline_code, "team_size": 10}
)

# Get predictions, not just analysis
print(result.current_issues)      # What's wrong now
print(result.predicted_issues)    # What will break in 30-90 days
print(result.prevention_steps)    # How to prevent it
```

## The 5 Levels of AI Empathy

| Level | Name | Behavior | Example |
|-------|------|----------|---------|
| 1 | Reactive | Responds when asked | "Here's the data you requested" |
| 2 | Guided | Asks clarifying questions | "What format do you need?" |
| 3 | Proactive | Notices patterns | "I pre-fetched what you usually need" |
| **4** | **Anticipatory** | **Predicts future needs** | **"This query will timeout at 10k users"** |
| 5 | Transformative | Builds preventing structures | "Here's a framework for all future cases" |

**Empathy operates at Level 4** - predicting problems before they manifest.

## Why Empathy?

| | Empathy | SonarQube | GitHub Copilot |
|---|---------|-----------|----------------|
| **Predicts future issues** | ✅ 30-90 days ahead | ❌ | ❌ |
| **Cross-domain learning** | ✅ Healthcare → Software | ❌ | ❌ |
| **Source available** | ✅ Fair Source 0.9 | ❌ | ❌ |
| **Free for small teams** | ✅ ≤5 employees | ❌ | ❌ |
| **Local/air-gapped** | ✅ Ollama support | ❌ | ❌ |

## Get Involved

**⭐ [Star this repo](https://github.com/Smart-AI-Memory/empathy)** if you find it useful

**💬 [Join Discussions](https://github.com/Smart-AI-Memory/empathy/discussions)** - Questions, ideas, show what you built

**📖 [Read the Book](https://smartaimemory.com/book)** - Deep dive into the philosophy and implementation

**📚 [Full Documentation](docs/)** - API reference, examples, guides

## Install Options

```bash
# Basic
pip install empathy-framework

# With all features (recommended)
pip install empathy-framework[full]

# Development
git clone https://github.com/Smart-AI-Memory/empathy.git
cd empathy && pip install -e .[dev]
```

## What's Included

- **30+ Wizards** - Security, performance, testing, accessibility, compliance
- **Healthcare Suite** - SBAR, SOAP notes, clinical protocols (HIPAA compliant)
- **IDE Plugins** - VS Code and JetBrains extensions (examples/)
- **Enterprise Security** - PII scrubbing, secrets detection, audit logging
- **Memory Control Panel** - CLI and API for managing Redis + pattern storage

## Memory Control Panel

Manage AI memory with a simple CLI:

```bash
# Start everything (Redis + API server)
empathy-memory serve

# Check system status
empathy-memory status

# View statistics
empathy-memory stats

# Run health check
empathy-memory health

# List stored patterns
empathy-memory patterns
```

The API server runs at `http://localhost:8765` with endpoints for status, stats, patterns, and Redis control.

**VS Code Extension:** A visual panel for monitoring memory is available in `vscode-memory-panel/`.

## License

**Fair Source License 0.9** - Free for students, educators, and teams ≤5 employees. Commercial license ($99/dev/year) for larger organizations. [Details →](LICENSE)

---

**Built by [Smart AI Memory](https://smartaimemory.com)** · [Documentation](docs/) · [Examples](examples/) · [Issues](https://github.com/Smart-AI-Memory/empathy/issues)
