Skip to main content

Environment Design Pattern + Model Environment Protocol — Causal, contextual, situated AI

Project description

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

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

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)

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

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

edp_mep-4.1.0.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

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

edp_mep-4.1.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file edp_mep-4.1.0.tar.gz.

File metadata

  • Download URL: edp_mep-4.1.0.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for edp_mep-4.1.0.tar.gz
Algorithm Hash digest
SHA256 fb8a4e95324405cebc32d305b028491540c67027da6487eb9876eb348000219f
MD5 be9a3d20cbf18bc7d4681dec9050b8ef
BLAKE2b-256 4a718f86c3246ae1e6073c8e908e60528e814e1c346edad433ca253a389724a4

See more details on using hashes here.

File details

Details for the file edp_mep-4.1.0-py3-none-any.whl.

File metadata

  • Download URL: edp_mep-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for edp_mep-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd8831ca1a5810ffc64cb91c492afbe1dfeb5a6e40860583cf33861a06168da0
MD5 92d13bd61066875acd15c303505b1e2b
BLAKE2b-256 eecdb9d627d0f104ef7391e1b608349a3c082ba65bf1201290be1062668e01d6

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