meridianos 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. meridianos-0.2.1/CHANGELOG.md +150 -0
  2. meridianos-0.2.1/LICENSE +21 -0
  3. meridianos-0.2.1/PKG-INFO +177 -0
  4. meridianos-0.2.1/README.md +113 -0
  5. meridianos-0.2.1/demo/README.md +50 -0
  6. meridianos-0.2.1/docs/integrations/README.md +121 -0
  7. meridianos-0.2.1/meridianos/__init__.py +61 -0
  8. meridianos-0.2.1/meridianos/adapters/in_memory.py +267 -0
  9. meridianos-0.2.1/meridianos/adapters/local_storage.py +53 -0
  10. meridianos-0.2.1/meridianos/adapters/sqlite_ledger.py +676 -0
  11. meridianos-0.2.1/meridianos/cli/__init__.py +3 -0
  12. meridianos-0.2.1/meridianos/cli/_state.py +67 -0
  13. meridianos-0.2.1/meridianos/cli/cmd_agent.py +154 -0
  14. meridianos-0.2.1/meridianos/cli/cmd_branch.py +113 -0
  15. meridianos-0.2.1/meridianos/cli/cmd_connect.py +239 -0
  16. meridianos-0.2.1/meridianos/cli/cmd_coordinate.py +127 -0
  17. meridianos-0.2.1/meridianos/cli/cmd_events.py +61 -0
  18. meridianos-0.2.1/meridianos/cli/cmd_init.py +21 -0
  19. meridianos-0.2.1/meridianos/cli/cmd_logs.py +58 -0
  20. meridianos-0.2.1/meridianos/cli/cmd_mcp.py +34 -0
  21. meridianos-0.2.1/meridianos/cli/cmd_memory.py +125 -0
  22. meridianos-0.2.1/meridianos/cli/cmd_replay.py +82 -0
  23. meridianos-0.2.1/meridianos/cli/cmd_run.py +126 -0
  24. meridianos-0.2.1/meridianos/cli/cmd_search.py +35 -0
  25. meridianos-0.2.1/meridianos/cli/cmd_workspace.py +48 -0
  26. meridianos-0.2.1/meridianos/cli/main.py +176 -0
  27. meridianos-0.2.1/meridianos/client.py +144 -0
  28. meridianos-0.2.1/meridianos/config.py +56 -0
  29. meridianos-0.2.1/meridianos/core/crypto.py +65 -0
  30. meridianos-0.2.1/meridianos/core/models/__init__.py +18 -0
  31. meridianos-0.2.1/meridianos/core/models/agent_identity.py +188 -0
  32. meridianos-0.2.1/meridianos/core/models/coordination.py +50 -0
  33. meridianos-0.2.1/meridianos/core/models/events.py +106 -0
  34. meridianos-0.2.1/meridianos/core/models/identity.py +38 -0
  35. meridianos-0.2.1/meridianos/core/models/memory.py +83 -0
  36. meridianos-0.2.1/meridianos/core/models/orchestration.py +46 -0
  37. meridianos-0.2.1/meridianos/core/models/run_result.py +20 -0
  38. meridianos-0.2.1/meridianos/core/models/session.py +78 -0
  39. meridianos-0.2.1/meridianos/core/models/storage.py +28 -0
  40. meridianos-0.2.1/meridianos/core/models/task.py +27 -0
  41. meridianos-0.2.1/meridianos/core/projections/engine.py +94 -0
  42. meridianos-0.2.1/meridianos/engine/context.py +250 -0
  43. meridianos-0.2.1/meridianos/engine/event_store.py +200 -0
  44. meridianos-0.2.1/meridianos/engine/interfaces.py +87 -0
  45. meridianos-0.2.1/meridianos/engine/memory.py +481 -0
  46. meridianos-0.2.1/meridianos/engine/ranking.py +101 -0
  47. meridianos-0.2.1/meridianos/engine/replay.py +197 -0
  48. meridianos-0.2.1/meridianos/engine/search.py +205 -0
  49. meridianos-0.2.1/meridianos/engine/summarizer.py +80 -0
  50. meridianos-0.2.1/meridianos/engine/time_travel.py +156 -0
  51. meridianos-0.2.1/meridianos/engine/token_budget.py +31 -0
  52. meridianos-0.2.1/meridianos/integrations/__init__.py +59 -0
  53. meridianos-0.2.1/meridianos/integrations/autogen.py +123 -0
  54. meridianos-0.2.1/meridianos/integrations/connect.py +120 -0
  55. meridianos-0.2.1/meridianos/integrations/crewai.py +103 -0
  56. meridianos-0.2.1/meridianos/integrations/langgraph.py +201 -0
  57. meridianos-0.2.1/meridianos/integrations/llamaindex.py +187 -0
  58. meridianos-0.2.1/meridianos/integrations/openai.py +157 -0
  59. meridianos-0.2.1/meridianos/integrations/pydantic_ai.py +101 -0
  60. meridianos-0.2.1/meridianos/mcp/__init__.py +3 -0
  61. meridianos-0.2.1/meridianos/mcp/config.py +36 -0
  62. meridianos-0.2.1/meridianos/mcp/server.py +525 -0
  63. meridianos-0.2.1/meridianos/py.typed +2 -0
  64. meridianos-0.2.1/meridianos/runtime/autonomous.py +181 -0
  65. meridianos-0.2.1/meridianos/runtime/collaboration.py +160 -0
  66. meridianos-0.2.1/meridianos/runtime/coordinator.py +351 -0
  67. meridianos-0.2.1/meridianos/runtime/event_bus.py +248 -0
  68. meridianos-0.2.1/meridianos/runtime/llm.py +160 -0
  69. meridianos-0.2.1/meridianos/runtime/presence.py +141 -0
  70. meridianos-0.2.1/meridianos/runtime/registry.py +72 -0
  71. meridianos-0.2.1/meridianos/sdk/__init__.py +5 -0
  72. meridianos-0.2.1/meridianos/sdk/_sync.py +15 -0
  73. meridianos-0.2.1/meridianos/sdk/agent.py +912 -0
  74. meridianos-0.2.1/meridianos/sdk/exceptions.py +111 -0
  75. meridianos-0.2.1/meridianos/sdk/stream.py +483 -0
  76. meridianos-0.2.1/meridianos/sdk/task.py +76 -0
  77. meridianos-0.2.1/meridianos/sdk/workspace.py +541 -0
  78. meridianos-0.2.1/meridianos/types.py +48 -0
  79. meridianos-0.2.1/pyproject.toml +123 -0
  80. meridianos-0.2.1/tests/__init__.py +0 -0
  81. meridianos-0.2.1/tests/conftest.py +34 -0
  82. meridianos-0.2.1/tests/integration/__init__.py +0 -0
  83. meridianos-0.2.1/tests/integration/test_agent_identity.py +138 -0
  84. meridianos-0.2.1/tests/integration/test_crypto_verification.py +70 -0
  85. meridianos-0.2.1/tests/integration/test_replay_engine.py +99 -0
  86. meridianos-0.2.1/tests/integration/test_time_travel.py +121 -0
  87. meridianos-0.2.1/tests/integrations/__init__.py +0 -0
  88. meridianos-0.2.1/tests/integrations/test_integrations.py +67 -0
  89. meridianos-0.2.1/tests/test_adapters.py +217 -0
  90. meridianos-0.2.1/tests/test_agent_registry.py +198 -0
  91. meridianos-0.2.1/tests/test_autonomous_runtime.py +191 -0
  92. meridianos-0.2.1/tests/test_bridge_session_routes.py +281 -0
  93. meridianos-0.2.1/tests/test_cli.py +72 -0
  94. meridianos-0.2.1/tests/test_cli_regressions.py +73 -0
  95. meridianos-0.2.1/tests/test_client.py +30 -0
  96. meridianos-0.2.1/tests/test_context_builder.py +299 -0
  97. meridianos-0.2.1/tests/test_coordination.py +469 -0
  98. meridianos-0.2.1/tests/test_cross_vendor.py +305 -0
  99. meridianos-0.2.1/tests/test_domain_models.py +44 -0
  100. meridianos-0.2.1/tests/test_event_mesh.py +168 -0
  101. meridianos-0.2.1/tests/test_full_workflow.py +283 -0
  102. meridianos-0.2.1/tests/test_integrations.py +222 -0
  103. meridianos-0.2.1/tests/test_llm_providers.py +182 -0
  104. meridianos-0.2.1/tests/test_mcp_real_agent.py +248 -0
  105. meridianos-0.2.1/tests/test_mcp_server.py +75 -0
  106. meridianos-0.2.1/tests/test_memory_engine.py +303 -0
  107. meridianos-0.2.1/tests/test_memory_intelligence.py +85 -0
  108. meridianos-0.2.1/tests/test_multiagent_runtime.py +174 -0
  109. meridianos-0.2.1/tests/test_sdk.py +298 -0
  110. meridianos-0.2.1/tests/test_security.py +518 -0
  111. meridianos-0.2.1/tests/test_session_protocol.py +238 -0
  112. meridianos-0.2.1/tests/unit/__init__.py +0 -0
  113. meridianos-0.2.1/tests/unit/test_trust_graph.py +53 -0
@@ -0,0 +1,150 @@
1
+ # Changelog
2
+
3
+ All notable changes to MeridianOS will be documented in this file.
4
+ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
+
6
+ ---
7
+
8
+ ## [0.2.1] — 2026-11-29
9
+
10
+ ### Fixed
11
+ - Release workflow: build with `uv build` (the v0.2.0 release build failed, so 0.2.0 was never published).
12
+
13
+ ## [0.2.0] — 2026-11-29
14
+
15
+ ### Removed
16
+ - Walrus blob storage and Sui on-chain anchoring, including the Move contracts, `SuiLedgerAdapter`,
17
+ `meridianAdapter`, the key store, `sdk.live`, and the `login`, `recover`, `artifacts` and
18
+ `permissions` CLI commands. Their dashboard pages and bridge endpoints are gone too.
19
+ - `workspace.sync()` and the `workspace_sync` MCP tool (it was a stub).
20
+
21
+ ### Fixed
22
+ - `ReplayEngine` with `verify_crypto=True` (and `meridianos replay --verify`) no longer drops every
23
+ genuine signed event: `blob_hash` is now the hash of the canonical payload, as the replay check expects.
24
+ - Memory events get real per-stream epochs (1, 2, 3, …) and parent links instead of epoch 0 / "genesis".
25
+ - `agent.export_identity()` and `repr(agent)` work (`to_dict`/`__repr__` had ended up on `SessionContext`).
26
+ - CLI: `replay`, `search`, `memory list`, `memory show`, `agent list`, `agent publish`, `branch fork`,
27
+ `branch merge` and `branch diff` no longer crash or print placeholder output.
28
+ `meridianos connect claude-code` works (it previously needed `connect connect`).
29
+ - The search index only contains text you wrote, not internal IDs and keys.
30
+
31
+ ### Changed
32
+ - Memory is stored locally by default: SQLite at `~/.meridianos/local.db` plus blob files in
33
+ `~/.meridianos/blobs/`. No network, wallet or account needed. Entries are still Ed25519-signed.
34
+ - The search index is rebuilt from SQLite at startup, so search works after a restart.
35
+ - Agent registration failures now raise a clear `MeridianOSError` instead of failing later with
36
+ `'NoneType' object has no attribute 'status'`.
37
+ - `mcp>=1.2,<2` and `python-dateutil` are now declared dependencies.
38
+
39
+ ## [0.1.0] — 2024-06-17
40
+
41
+ ### 🎉 Initial Public Release
42
+
43
+ This is the inaugural release of MeridianOS — the decentralized AI memory infrastructure library.
44
+
45
+ ### Added
46
+
47
+ #### Core Domain Layer
48
+ - `User`, `Workspace`, `Agent` identity models (Pydantic v2 + SQLModel)
49
+ - `MemoryStream`, `MemoryEvent`, `Checkpoint` memory models
50
+ - `Artifact`, `Capability`, `Permission`, `Subscription` models
51
+ - Full validation with Pydantic v2 validators and discriminated unions
52
+
53
+ #### Memory Engine
54
+ - Append-only DAG with parent-pointer lineage tracking
55
+ - `create_stream()`, `append()`, `read()`, `timeline()`, `replay()`
56
+ - `checkpoint()`, `fork()`, `merge()`, `snapshot()`, `resume()`
57
+ - `summarize()` for long-context compression
58
+ - `semantic_search()` via pluggable vector adapter
59
+ - Clean dependency inversion: engine knows nothing about Meridian or Sui
60
+
61
+ #### Meridian Storage Adapter
62
+ - AES-256-GCM encryption before upload
63
+ - zstd compression (up to 10x size reduction)
64
+ - Automatic chunking for blobs > 4MB
65
+ - tenacity retry with exponential backoff
66
+ - `upload_blob()`, `download_blob()`, `metadata()`, `version()`, `delete()`, `shred_key()`
67
+
68
+ #### Sui Identity Adapter
69
+ - Lazy pysui import with graceful fallback
70
+ - `SuiIdentityAdapter` for wallet login and workspace creation
71
+ - `SuiLedgerAdapter` implementing `LedgerAdapter` interface
72
+ - Move smart contracts: `meridianos::identity`, `meridianos::capability`
73
+ - Python PTB (Programmable Transaction Block) bindings
74
+
75
+ #### Public SDK (Firebase-like API)
76
+ - `MeridianOS(use_mocks=True)` for zero-config local development
77
+ - `runtime.workspace(name)` → `WorkspaceClient`
78
+ - `workspace.agent(name)` → `AgentClient`
79
+ - `workspace.stream(name)` → `StreamClient`
80
+ - `agent.publish(stream, payload)` → `MemoryEvent`
81
+ - `agent.subscribe(stream, callback)` → background `asyncio.Task`
82
+ - `stream.timeline()`, `stream.merge()`, `stream.fork()`
83
+
84
+ #### Framework Integrations
85
+ - **LangGraph**: `AsyncMeridianSaver` replacing `MemorySaver`
86
+ - **CrewAI**: `MeridianMemory` replacing `InMemory`
87
+ - **OpenAI Agents**: `MeridianConversationStore`
88
+ - **AutoGen**: `MeridianMessageStore`
89
+ - **LlamaIndex**: `MeridianChatStore` and `MeridianDocumentStore`
90
+
91
+ #### Dashboard
92
+ - Next.js 14 (App Router) with dark Tailwind theme
93
+ - 7 pages: Workspace Explorer, Agent Graph, Memory Timeline, Artifacts, Search, Permissions, Live Events
94
+ - React Flow interactive DAG visualizer
95
+ - WebSocket live event feed
96
+ - FastAPI bridge server (`dashboard/meridianos_bridge.py`)
97
+
98
+ #### CLI
99
+ - 11 commands: `init`, `login`, `status`, `workspace`, `agent`, `memory`, `replay`, `search`, `artifacts`, `permissions`, `events`, `logs`
100
+ - Rich terminal output with color-coded agents and streams
101
+ - Shell completion for Bash, Zsh, Fish, PowerShell
102
+ - `meridianos --install-completion`
103
+
104
+ #### Examples
105
+ - `01_research_team/` — Multi-agent shared memory
106
+ - `02_software_engineering/` — Fork/merge DAG
107
+ - `03_trading_team/` — Real-time pub/sub
108
+ - `04_customer_support/` — Semantic search
109
+ - `05_scientific_research/` — Checkpoint & crash recovery
110
+
111
+ #### Infrastructure
112
+ - `pyproject.toml` with `hatchling` build backend
113
+ - `ruff` linting + formatting (line-length: 100)
114
+ - `mypy` strict type checking
115
+ - `pytest-asyncio` with auto mode
116
+ - `pre-commit` hooks
117
+ - GitHub Actions CI: lint → type-check → test → coverage
118
+ - GitHub Actions Release: tag → build → publish to PyPI
119
+
120
+ ### Performance (in-memory adapters, AMD Ryzen 7 5800X)
121
+
122
+ | Benchmark | Result |
123
+ |---|---|
124
+ | Memory append throughput | ~45,000 ops/sec |
125
+ | Cold startup time | < 120ms |
126
+ | Semantic search (1K events) | < 8ms p99 |
127
+ | Stream timeline (1K events) | < 2ms |
128
+
129
+ ### Security
130
+
131
+ - AES-256-GCM encryption on all blobs before upload
132
+ - Sui Move capability contracts enforce per-stream access control
133
+ - `shred_key()` method for cryptographic "delete" (key destruction)
134
+ - No private keys ever transmitted or logged
135
+
136
+ ---
137
+
138
+ ## Roadmap
139
+
140
+ ### Planned for v0.2.0
141
+ - MemoryStream encryption key rotation
142
+ - TypeScript SDK
143
+ - Multi-region replication
144
+ - OpenTelemetry tracing
145
+
146
+ ---
147
+
148
+ [0.2.1]: https://github.com/kapish505/agent-context-memory/releases/tag/v0.2.1
149
+ [0.2.0]: https://github.com/kapish505/agent-context-memory/releases/tag/v0.2.0
150
+ [0.1.0]: https://github.com/kapish505/agent-context-memory/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MeridianOS Core Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,177 @@
1
+ Metadata-Version: 2.5
2
+ Name: meridianos
3
+ Version: 0.2.1
4
+ Summary: Git for AI memory: persistent, signed, replayable memory for AI agents.
5
+ Project-URL: Homepage, https://github.com/kapish505/agent-context-memory
6
+ Project-URL: Documentation, https://github.com/kapish505/agent-context-memory/tree/main/docs
7
+ Project-URL: Repository, https://github.com/kapish505/agent-context-memory
8
+ Project-URL: Issues, https://github.com/kapish505/agent-context-memory/issues
9
+ Project-URL: Changelog, https://github.com/kapish505/agent-context-memory/blob/main/CHANGELOG.md
10
+ Author: kapish505
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: agents,ai,crewai,langgraph,llm,mcp,memory,storage
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: cryptography>=42.0.5
26
+ Requires-Dist: httpx>=0.27.0
27
+ Requires-Dist: mcp<2,>=1.2
28
+ Requires-Dist: pydantic>=2.6.0
29
+ Requires-Dist: pydantic[email]>=2.6.0
30
+ Requires-Dist: python-dateutil>=2.8.2
31
+ Requires-Dist: rich>=13.7.0
32
+ Requires-Dist: sqlmodel>=0.0.14
33
+ Requires-Dist: tenacity>=8.2.3
34
+ Requires-Dist: typer>=0.9.0
35
+ Requires-Dist: zstandard>=0.22.0
36
+ Provides-Extra: all
37
+ Requires-Dist: crewai>=0.20.0; extra == 'all'
38
+ Requires-Dist: fastapi>=0.110.0; extra == 'all'
39
+ Requires-Dist: langgraph>=0.0.30; extra == 'all'
40
+ Requires-Dist: llama-index-core>=0.10.0; extra == 'all'
41
+ Requires-Dist: openai>=1.14.0; extra == 'all'
42
+ Requires-Dist: pyautogen>=0.2.20; extra == 'all'
43
+ Requires-Dist: uvicorn[standard]>=0.29.0; extra == 'all'
44
+ Requires-Dist: websockets>=12.0; extra == 'all'
45
+ Provides-Extra: dashboard
46
+ Requires-Dist: fastapi>=0.110.0; extra == 'dashboard'
47
+ Requires-Dist: uvicorn[standard]>=0.29.0; extra == 'dashboard'
48
+ Requires-Dist: websockets>=12.0; extra == 'dashboard'
49
+ Provides-Extra: dev
50
+ Requires-Dist: mypy>=1.9.0; extra == 'dev'
51
+ Requires-Dist: pip-audit>=2.7.0; extra == 'dev'
52
+ Requires-Dist: pre-commit>=3.6.0; extra == 'dev'
53
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
54
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
55
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
56
+ Requires-Dist: ruff>=0.3.0; extra == 'dev'
57
+ Provides-Extra: integrations
58
+ Requires-Dist: crewai>=0.20.0; extra == 'integrations'
59
+ Requires-Dist: langgraph>=0.0.30; extra == 'integrations'
60
+ Requires-Dist: llama-index-core>=0.10.0; extra == 'integrations'
61
+ Requires-Dist: openai>=1.14.0; extra == 'integrations'
62
+ Requires-Dist: pyautogen>=0.2.20; extra == 'integrations'
63
+ Description-Content-Type: text/markdown
64
+
65
+ <div align="center">
66
+
67
+ # MeridianOS 🦭
68
+
69
+ **Persistent, verifiable memory for AI agents.**
70
+
71
+ [![PyPI](https://img.shields.io/pypi/v/meridianos.svg)](https://pypi.org/project/meridianos/)
72
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
73
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
74
+ [![Coverage](https://img.shields.io/badge/coverage-94%25-brightgreen.svg)]()
75
+
76
+ [Docs](docs/) · [Quick Start](docs/quickstart.md) · [Examples](examples/) · [Discord](https://discord.gg/meridianos)
77
+
78
+ </div>
79
+
80
+ ---
81
+
82
+ Your agents forget everything when they restart. MeridianOS fixes that.
83
+
84
+ MeridianOS is a Python library that gives your LangGraph, CrewAI, AutoGen, or custom agents **durable, append-only memory** that survives crashes and restarts, and can be replayed, branched, and recovered — exactly like Git.
85
+
86
+ ```python
87
+ pip install meridianos
88
+ ```
89
+
90
+ ```python
91
+ from meridianos import MeridianOS
92
+
93
+ runtime = MeridianOS(use_mocks=True) # → MeridianOS() for production
94
+ workspace = runtime.workspace("research")
95
+ agent = workspace.agent("Researcher")
96
+ stream = agent.stream("findings")
97
+
98
+ await stream.append({"insight": "Transformers outperform RNNs on long contexts."})
99
+
100
+ timeline = await stream.timeline() # every event, forever
101
+ ```
102
+
103
+ **It takes five minutes to get started. [→ Quick Start](docs/quickstart.md)**
104
+
105
+ ---
106
+
107
+ ## Why MeridianOS?
108
+
109
+ | Problem | MeridianOS |
110
+ |---------|----------|
111
+ | Agent memory disappears on restart | Append-only stream persisted locally (SQLite + blob files) |
112
+ | No audit trail for agent decisions | Every event is immutable, timestamped, and signed |
113
+ | Agents overwrite each other's state | Fork/merge semantics, one stream per agent |
114
+ | Hard to debug what an agent did | `stream.replay()` — deterministic event replay |
115
+ | Locked into one framework | Integrations for LangGraph, CrewAI, AutoGen, and more |
116
+
117
+ ---
118
+
119
+ ## Documentation
120
+
121
+ | | |
122
+ |--|--|
123
+ | [**Quick Start**](docs/quickstart.md) | Install, run your first agent in 5 minutes |
124
+ | [**Concepts**](docs/concepts.md) | Memory, Agents, Streams, Trust — how it works |
125
+ | [**Framework Integrations**](docs/integrations.md) | LangGraph, CrewAI, AutoGen, OpenAI, LlamaIndex, PydanticAI |
126
+ | [**API Reference**](docs/api-reference.md) | Complete Python SDK reference |
127
+ | [**Recovery & Replay**](docs/recovery.md) | Time travel, branching, crash recovery |
128
+ | [**Architecture**](docs/architecture.md) | How everything fits together |
129
+ | [**FAQ**](docs/faq.md) | Common questions |
130
+ | [**Migration Guide**](docs/migration.md) | Upgrading from older versions |
131
+
132
+ ---
133
+
134
+ ## Framework Integrations
135
+
136
+ ### LangGraph — 3 lines
137
+
138
+ ```python
139
+ from meridianos.integrations.langgraph import AsyncMeridianSaver
140
+ from meridianos import MeridianOS
141
+
142
+ memory = AsyncMeridianSaver(MeridianOS().workspace("app").stream("checkpoints"))
143
+ graph = builder.compile(checkpointer=memory)
144
+ ```
145
+
146
+ ### CrewAI — 2 lines
147
+
148
+ ```python
149
+ from meridianos.integrations.crewai import MeridianMemory
150
+ memory = MeridianMemory(MeridianOS().workspace("crew").stream("episodes"))
151
+ ```
152
+
153
+ ### OpenAI Agents SDK — 2 lines
154
+
155
+ ```python
156
+ from meridianos.integrations.openai import MeridianConversationStore
157
+ store = MeridianConversationStore(MeridianOS().workspace("app").stream("convos"))
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Performance
163
+
164
+ Measured with `benchmarks/run_benchmarks.py` (SQLite + local blob files) on an Apple Silicon laptop:
165
+
166
+ | Operation | Result |
167
+ |-----------|--------|
168
+ | Memory append (persisted) | ~1,700–1,900 ops/sec (~0.55 ms each) |
169
+ | Replay | ~75,000–130,000 events/sec |
170
+ | Search, 1K / 10K events | ~1.6 ms / ~17 ms |
171
+ | Reopen + rebuild index, 1K / 10K events | ~0.04 s / ~0.4 s |
172
+
173
+ ---
174
+
175
+ ## License
176
+
177
+ MIT © 2024 MeridianOS Core Team
@@ -0,0 +1,113 @@
1
+ <div align="center">
2
+
3
+ # MeridianOS 🦭
4
+
5
+ **Persistent, verifiable memory for AI agents.**
6
+
7
+ [![PyPI](https://img.shields.io/pypi/v/meridianos.svg)](https://pypi.org/project/meridianos/)
8
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+ [![Coverage](https://img.shields.io/badge/coverage-94%25-brightgreen.svg)]()
11
+
12
+ [Docs](docs/) · [Quick Start](docs/quickstart.md) · [Examples](examples/) · [Discord](https://discord.gg/meridianos)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ Your agents forget everything when they restart. MeridianOS fixes that.
19
+
20
+ MeridianOS is a Python library that gives your LangGraph, CrewAI, AutoGen, or custom agents **durable, append-only memory** that survives crashes and restarts, and can be replayed, branched, and recovered — exactly like Git.
21
+
22
+ ```python
23
+ pip install meridianos
24
+ ```
25
+
26
+ ```python
27
+ from meridianos import MeridianOS
28
+
29
+ runtime = MeridianOS(use_mocks=True) # → MeridianOS() for production
30
+ workspace = runtime.workspace("research")
31
+ agent = workspace.agent("Researcher")
32
+ stream = agent.stream("findings")
33
+
34
+ await stream.append({"insight": "Transformers outperform RNNs on long contexts."})
35
+
36
+ timeline = await stream.timeline() # every event, forever
37
+ ```
38
+
39
+ **It takes five minutes to get started. [→ Quick Start](docs/quickstart.md)**
40
+
41
+ ---
42
+
43
+ ## Why MeridianOS?
44
+
45
+ | Problem | MeridianOS |
46
+ |---------|----------|
47
+ | Agent memory disappears on restart | Append-only stream persisted locally (SQLite + blob files) |
48
+ | No audit trail for agent decisions | Every event is immutable, timestamped, and signed |
49
+ | Agents overwrite each other's state | Fork/merge semantics, one stream per agent |
50
+ | Hard to debug what an agent did | `stream.replay()` — deterministic event replay |
51
+ | Locked into one framework | Integrations for LangGraph, CrewAI, AutoGen, and more |
52
+
53
+ ---
54
+
55
+ ## Documentation
56
+
57
+ | | |
58
+ |--|--|
59
+ | [**Quick Start**](docs/quickstart.md) | Install, run your first agent in 5 minutes |
60
+ | [**Concepts**](docs/concepts.md) | Memory, Agents, Streams, Trust — how it works |
61
+ | [**Framework Integrations**](docs/integrations.md) | LangGraph, CrewAI, AutoGen, OpenAI, LlamaIndex, PydanticAI |
62
+ | [**API Reference**](docs/api-reference.md) | Complete Python SDK reference |
63
+ | [**Recovery & Replay**](docs/recovery.md) | Time travel, branching, crash recovery |
64
+ | [**Architecture**](docs/architecture.md) | How everything fits together |
65
+ | [**FAQ**](docs/faq.md) | Common questions |
66
+ | [**Migration Guide**](docs/migration.md) | Upgrading from older versions |
67
+
68
+ ---
69
+
70
+ ## Framework Integrations
71
+
72
+ ### LangGraph — 3 lines
73
+
74
+ ```python
75
+ from meridianos.integrations.langgraph import AsyncMeridianSaver
76
+ from meridianos import MeridianOS
77
+
78
+ memory = AsyncMeridianSaver(MeridianOS().workspace("app").stream("checkpoints"))
79
+ graph = builder.compile(checkpointer=memory)
80
+ ```
81
+
82
+ ### CrewAI — 2 lines
83
+
84
+ ```python
85
+ from meridianos.integrations.crewai import MeridianMemory
86
+ memory = MeridianMemory(MeridianOS().workspace("crew").stream("episodes"))
87
+ ```
88
+
89
+ ### OpenAI Agents SDK — 2 lines
90
+
91
+ ```python
92
+ from meridianos.integrations.openai import MeridianConversationStore
93
+ store = MeridianConversationStore(MeridianOS().workspace("app").stream("convos"))
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Performance
99
+
100
+ Measured with `benchmarks/run_benchmarks.py` (SQLite + local blob files) on an Apple Silicon laptop:
101
+
102
+ | Operation | Result |
103
+ |-----------|--------|
104
+ | Memory append (persisted) | ~1,700–1,900 ops/sec (~0.55 ms each) |
105
+ | Replay | ~75,000–130,000 events/sec |
106
+ | Search, 1K / 10K events | ~1.6 ms / ~17 ms |
107
+ | Reopen + rebuild index, 1K / 10K events | ~0.04 s / ~0.4 s |
108
+
109
+ ---
110
+
111
+ ## License
112
+
113
+ MIT © 2024 MeridianOS Core Team
@@ -0,0 +1,50 @@
1
+ # MeridianOS Official Demonstration
2
+
3
+ Welcome to the definitive showcase of **MeridianOS**—the decentralized operating system for Agentic AI.
4
+
5
+ This demonstration runs entirely locally using the mock in-memory adapter, allowing you to experience the core features of MeridianOS without configuring Meridian Storage or Sui RPC nodes.
6
+
7
+ ## The Storyline
8
+
9
+ In this demo, three independent AI agents are collaborating on a complex report:
10
+ 1. **ResearchAgent**: Gathers initial findings.
11
+ 2. **ReviewerAgent**: Reviews and approves the findings.
12
+ 3. **WriterAgent**: Drafts the final report.
13
+
14
+ The demonstration walks through five cinematic scenes showcasing the power of MeridianOS:
15
+
16
+ ### Scene 1: Persistent Identity
17
+ The ResearchAgent initializes the system and appends its findings to a shared `collaboration` memory stream.
18
+
19
+ ### Scene 2: Sui Capabilities
20
+ The ReviewerAgent attempts to append a review but is **rejected** because it lacks the required cryptographic `AppendCapability`. An admin grants the capability on the simulated Sui ledger, allowing the agent to finally append the review.
21
+
22
+ ### Scene 3: Branching & The Trust Graph
23
+ The WriterAgent forks the `collaboration` stream to explore a "Creative Draft." As events are appended, cryptographic `TrustRoots` are calculated, forming the basis of the agent Trust Graph.
24
+
25
+ ![Agent Collaboration](screenshots/agent_collaboration.png)
26
+ ![Trust Graph](screenshots/trust_graph.png)
27
+
28
+ ### Scene 4: Cryptographic Verification
29
+ A malicious actor corrupts the local SQLite database by modifying the WriterAgent's draft. When the system attempts to read the timeline, a `CryptographicVerificationError` is thrown, catching the tampered signature immediately.
30
+
31
+ ### Scene 5: Catastrophic Disaster Recovery
32
+ The ultimate test of MeridianOS. The entire local configuration, SQLite database, and indices (`~/.meridianos/`) are physically deleted.
33
+
34
+ A fresh instance of MeridianOS is booted, and it natively reconstructs the exact timeline, cryptographic signatures, and capabilities directly from the (simulated) Meridian Decentralized Storage Network.
35
+
36
+ ![Disaster Recovery](screenshots/disaster_recovery.png)
37
+
38
+ ---
39
+
40
+ ## How to Run
41
+
42
+ Execute the demo script using Python (requires `meridianos` to be installed or in your `PYTHONPATH`):
43
+
44
+ ```bash
45
+ python demo/run.py
46
+ ```
47
+
48
+ ## Additional Assets
49
+ - [Video Script](video_script.md)
50
+ - [Architecture Diagram](architecture.mmd)
@@ -0,0 +1,121 @@
1
+ # Connecting Real AI Agents to MeridianOS
2
+
3
+ MeridianOS works with any AI tool that supports MCP.
4
+ Install once, connect anywhere.
5
+
6
+ ## Quick Setup (any MCP-compatible tool)
7
+
8
+ ```bash
9
+ pip install meridianos
10
+ ```
11
+
12
+ Add to your tool's MCP config:
13
+ ```json
14
+ {
15
+ "mcpServers": {
16
+ "meridianos": {
17
+ "command": "meridianos",
18
+ "args": ["mcp", "start"]
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ That's it. Your AI tool now has:
25
+ - Persistent, signed local memory
26
+ - Real-time collaboration with other agents
27
+ - Task coordination via shared queue
28
+
29
+ ## Claude Code / Claude Desktop
30
+
31
+ Config location:
32
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
33
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
34
+ - Linux: `~/.config/claude/claude_desktop_config.json`
35
+
36
+ Add:
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "meridianos": {
41
+ "command": "meridianos",
42
+ "args": ["mcp", "start"],
43
+ "env": {}
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ Available tools:
50
+ - `memory_search` — search past decisions, implementations
51
+ - `memory_append` — save findings and decisions
52
+ - `memory_latest` — see recent activity
53
+ - `memory_context` — get formatted context for prompts
54
+ - `agent_status` — see who's online
55
+ - `agent_discover` — find agents by capability
56
+ - `task_claim` — pick up work from the queue
57
+ - `task_complete` — mark work done
58
+
59
+ ## Cursor
60
+
61
+ Config: `.cursor/mcp.json` in project root
62
+
63
+ ```json
64
+ {
65
+ "mcpServers": {
66
+ "meridianos": {
67
+ "command": "meridianos",
68
+ "args": ["mcp", "start"]
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ ## Windsurf
75
+
76
+ Same MCP config pattern as Cursor.
77
+
78
+ ## Antigravity
79
+
80
+ Same MCP config pattern. Antigravity supports MCP servers natively.
81
+
82
+ ## Gemini CLI
83
+
84
+ Gemini CLI supports MCP via `--mcp` flag.
85
+
86
+ ## Programmatic Connection (Python SDK)
87
+
88
+ ```python
89
+ from meridianos import MeridianOS
90
+ from meridianos.integrations.connect import connect_claude_code
91
+
92
+ os_instance = MeridianOS()
93
+ workspace = os_instance.workspace("my-project")
94
+
95
+ claude = await connect_claude_code(workspace)
96
+ # Claude is now online with code_generation, review, debugging capabilities
97
+
98
+ # Other agents can discover Claude:
99
+ reviewers = await workspace.discover(capability="code_review")
100
+ # Returns: [{"agent_name": "Claude Code", "framework": "claude-code", ...}]
101
+ ```
102
+
103
+ ## Running Multiple Agents Simultaneously
104
+
105
+ ```
106
+ Terminal 1: Claude Code with MeridianOS MCP
107
+ Terminal 2: Cursor with MeridianOS MCP
108
+ Terminal 3: python scripts/demo_mesh.py (custom agents)
109
+ ```
110
+
111
+ All three share the same workspace, same memory, same task queue.
112
+ Open `http://localhost:3000` to watch them collaborate live.
113
+
114
+ ## Auto-generate configs
115
+
116
+ ```bash
117
+ meridianos connect claude-code # print + optionally write Claude Desktop config
118
+ meridianos connect cursor # print + optionally write .cursor/mcp.json
119
+ meridianos connect --list # list all supported frameworks
120
+ meridianos connect --verify # verify MCP server + all 10 tools respond
121
+ ```
@@ -0,0 +1,61 @@
1
+ """
2
+ MERIDIAN OS — Git for AI Memory.
3
+ The sovereign decentralized operating layer for autonomous AI agents.
4
+
5
+ Quickstart::
6
+
7
+ from meridianos import MeridianOS
8
+
9
+ runtime = MeridianOS(use_mocks=True) # zero-config local development
10
+ stream = runtime.workspace("deep-research").agent("Alice").stream("memory")
11
+
12
+ event = await stream.append({"thought": "Hello MERIDIAN OS!"})
13
+
14
+ for event, payload in await stream.timeline():
15
+ print(payload["thought"])
16
+
17
+ Set ``MERIDIANOS_USE_MOCKS=1`` (or ``meridianOS_USE_MOCKS=1``) to default runtimes
18
+ to mock mode during testing.
19
+ """
20
+ from meridianos.client import MeridianOS, MeridianOS as meridianOS
21
+ from meridianos.types import MemoryType, MT
22
+ from meridianos.sdk.exceptions import (
23
+ MeridianOSError,
24
+ MeridianOSError as meridianOSError,
25
+ AgentNotFoundError,
26
+ StreamNotFoundError,
27
+ CryptographicVerificationError,
28
+ CapabilityRevokedError,
29
+ CapabilityDeniedError,
30
+ WorkspaceNotFoundError,
31
+ MeridianConnectionError,
32
+ MeridianConnectionError as MeridianConnectionError,
33
+ MeridianKeyDestroyedError,
34
+ MeridianKeyDestroyedError as MeridianKeyDestroyedError,
35
+ )
36
+
37
+ __version__ = "0.2.1"
38
+
39
+ __all__ = [
40
+ # Core runtime
41
+ "MeridianOS",
42
+ "meridianOS",
43
+
44
+ # Types
45
+ "MemoryType",
46
+ "MT",
47
+
48
+ # Exceptions
49
+ "MeridianOSError",
50
+ "meridianOSError",
51
+ "AgentNotFoundError",
52
+ "StreamNotFoundError",
53
+ "CryptographicVerificationError",
54
+ "CapabilityRevokedError",
55
+ "CapabilityDeniedError",
56
+ "WorkspaceNotFoundError",
57
+ "MeridianConnectionError",
58
+ "MeridianConnectionError",
59
+ "MeridianKeyDestroyedError",
60
+ "MeridianKeyDestroyedError",
61
+ ]