Skip to main content

MSS-Agent: 世界上第一个内置'意义场自检'的开源 Agent 框架

Project description

PyPI version

MSS-Agent

The first open-source Agent framework with built-in "meaning-field self-audit".

pip install mss-agent

📖 Jupyter Tutorial | 🎥 Demo | 📊 Glass Box | 中文

🎯 Learning Goals

After completing this tutorial, you will be able to:

  • ✅ Add heat-tax budgeting to any Agent (reject meaningless work)
  • ✅ Detect when an Agent is stuck in repetition (Δ decay → molt)
  • ✅ Resolve multi-Agent conflicts through dimension elevation (not voting)
  • ✅ Judge when NOT to use MSS-Agent

🏗️ Three-Layer Defense

Heat-Tax Budget (Axiom A3)

Heat Tax Pyramid

Every task is assessed across three layers of "heat tax":

  • L2 Meaning Tax (fake data, concept theft, busywork) → weight 1000x
  • L1 Logic Tax (redundant calls, cache pollution) → weight 1x
  • L0 Physical Tax (GPU time, token cost) → weight 0.001x

If L2 heat tax exceeds threshold → Agent refuses to execute and explains why.

Δ Protocol (Axiom A6)

Delta Decay Curve

Agents don't repeat the same failure patterns:

  • Δ value per task cycle (novelty + diversity)
  • 2 consecutive Δ drops → trigger molting → forget old patterns
  • "Molting is not failure. It's growth."

Elevation Protocol (Axiom A6)

When multiple Agents conflict, don't vote (K3 pattern). Instead: find the trapped dimension → add one dimension → conflict dissolves.

Onion Architecture

Onion Architecture

⚡ Quick Start

from mss_agent import MSSAgent, HeatTaxLevel

# Configure your LLM
def my_llm(prompt: str) -> str:
    import ollama
    return ollama.chat("qwen3", prompt)["message"]["content"]

# Create an Agent
agent = MSSAgent(name="Helper", llm=my_llm)

# Run — heat-tax budget auto-blocks meaningless tasks
result = agent.run("Rewrite this: 'Hello'")
if result.aborted:
    print(f"Agent refused: {result.reason}")
    # → Agent refused: Short busywork: no meaningful intent

result = agent.run("Design an error handling strategy for a REST API")
print(result.output)

# Health report
print(agent.health_report())
# → {'heat_tax': {...}, 'delta': {...}, 'memory': {'active': 5, 'closed': 2}}

🚫 When NOT to Use MSS-Agent

MSS-Agent is not a silver bullet. Skip it when:

Scenario Why
Simple if-else workflows No LLM needed, no meaning-field needed
100% deterministic tasks No heat tax to detect (σ=0)
Your Agent never errs or repeats Δ detection has nothing to work with
Single-Agent single-task Elevation protocol is overkill
You just need LangChain tool-use MSS is not a replacement

🔧 Installation & Troubleshooting

pip install mss-agent

"pip can't find the package?" → Verify Python ≥ 3.10: python --version

"Installed but nothing happens?" → Check: python -c "import mss_agent; print(mss_agent.__version__)"

Windows users: Run in PowerShell. If encoding errors appear, add -Encoding UTF8.

📂 Project Structure

mss_agent/
  core/           # Agent base + HeatTax + Delta + Memory
  protocols/      # Quorum-Fast + Elevation
  examples/       # WriterAgent + MAF Integration Demo
  tutorials/      # Jupyter Notebook tutorials
  docs/images/    # Architecture diagrams

🌐 Community

Business Model

  • ✅ MIT Open Source — core features free forever
  • ✅ Community-driven — DAU first, no paywalls
  • ✅ Optional enterprise services — deployment consulting, custom integration, training

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

mss_agent-0.2.1-py3-none-any.whl (61.2 kB view details)

Uploaded Python 3

File details

Details for the file mss_agent-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mss_agent-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 61.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for mss_agent-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d21dbec4d95cdd1ff50fd75e61bfb13d1e82f43832ab8e3cea936437fee2f3ce
MD5 59386563682f0f7f64dad1eddf7c202b
BLAKE2b-256 41ca1b3cd0a4bdc3411c14d7d3e6d128badfda3d5f0d01fa41795df3dde85961

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