MnemonIntegration (__init__.py)

Mnemon · ai, auto-instrumentation, framework-detection, runtime-patching, agent-scanning, automation

mnemon.moth ----------- Auto-instrumentation engine. On mnemon.init(), the moth wakes up, scans the environment for installed agent frameworks, and patches each one at the right execution boundary — without the user writing a single line of integration code. Frameworks patched au

"""
mnemon.moth
-----------
Auto-instrumentation engine.

On mnemon.init(), the moth wakes up, scans the environment for installed
agent frameworks, and patches each one at the right execution boundary —
without the user writing a single line of integration code.

Frameworks patched automatically:
  anthropic     → messages.create (memory inject + System 1 cache + bus)
  openai        → chat.completions.create (same)
  langchain     → per-step RunnableSequence.invoke (System 2 EME + memory)
  langgraph     → CompiledGraph.invoke (per-node EME + memory + bus)
  autogen       → generate_reply (memory inject + EME + bus)
  crewai        → event bus (AgentExecutionStarted/Completed) + Task cache

Each integration is fail-safe: if patching fails for any reason, the
original framework behavior i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key