Metadata-Version: 2.4
Name: edp-mep
Version: 4.1.0
Summary: Environment Design Pattern + Model Environment Protocol — Causal, contextual, situated AI
Author-email: OneOrigine <research@imperialschool.dev>
License: I.S. License — Attributed Open Architecture
Project-URL: Homepage, https://github.com/ImperialSchool/edp-mep
Project-URL: Repository, https://github.com/ImperialSchool/edp-mep
Keywords: environment,design-pattern,protocol,AI,LLM,causal,contextual,MEP,EDP
Classifier: Development Status :: 4 - Beta
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 :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: ollama
Requires-Dist: ollama>=0.2; extra == "ollama"
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == "openai"
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.25; extra == "anthropic"
Provides-Extra: all
Requires-Dist: ollama>=0.2; extra == "all"
Requires-Dist: openai>=1.0; extra == "all"
Requires-Dist: anthropic>=0.25; extra == "all"

# edp-mep

**Environment Design Pattern (EDP) + Model Environment Protocol (MEP)**

*OneOrigine / ImperialSchool Research — I.S. License*

> "A perfect balance between rationality and probability is necessary to fully leverage the logic of artificial intelligence." — Seikatsu-One

## Install

```bash
pip install edp-mep
# With provider support:
pip install edp-mep[ollama]     # local Ollama
pip install edp-mep[openai]     # OpenAI API
pip install edp-mep[anthropic]  # Anthropic API
pip install edp-mep[all]        # all providers
```

## Mathematical Foundation

Central Equation: `E_{t+1} = 𝔘( E_t, 𝔯( x_t, c_t, Σ_t, 𝔄(x_t,c_t,Σ_t,Γ_t, Ψ(D_t,c_t,Σ_t)) ) )`

Harmony Function: `H = α·cos(A,C) + β·cos(A,S) + γ·cos(R̂,R) − δ·D`

## Quick Start

```python
from edp import Environment, Context, Action, Circumstance, SenseVector, EnvironmentKind
from mep import MepGateway

# Build environment
env = Environment("MyEnv", EnvironmentKind.REACTIVE)
ctx = env.create_context("Main",
    basis=SenseVector.normative("operations", 0.9))

# Run agents via MEP
gateway = MepGateway(env)
session = gateway.connect("my-agent")
envelope = gateway.build_envelope(session, actor, ctx)
reaction = await gateway.dispatch(session, actor, "action.type", payload, ctx)
```

## Usage (agent demo)

```bash
python mep_ollama_agent_v4.py --demo
python mep_ollama_agent_v4.py --model gemma3:12b --inject-memory
python mep_ollama_agent_v4.py --provider openai --model gpt-4o-mini
python mep_ollama_agent_v4.py --provider anthropic --model claude-3-haiku-20240307
```
