mnemolink 0.2.0__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 (56) hide show
  1. mnemolink-0.2.0/LICENSE +21 -0
  2. mnemolink-0.2.0/PKG-INFO +405 -0
  3. mnemolink-0.2.0/README.md +360 -0
  4. mnemolink-0.2.0/mnemolink/__init__.py +60 -0
  5. mnemolink-0.2.0/mnemolink/adapters.py +271 -0
  6. mnemolink-0.2.0/mnemolink/bench/__init__.py +6 -0
  7. mnemolink-0.2.0/mnemolink/bench/evaluators.py +39 -0
  8. mnemolink-0.2.0/mnemolink/bench/runner.py +196 -0
  9. mnemolink-0.2.0/mnemolink/bench/scenarios.json +35 -0
  10. mnemolink-0.2.0/mnemolink/catalog/lineages/flight_scars/card.json +22 -0
  11. mnemolink-0.2.0/mnemolink/catalog/lineages/flight_scars/lineage.yaml +31 -0
  12. mnemolink-0.2.0/mnemolink/catalog/lineages/legal_crucible/card.json +22 -0
  13. mnemolink-0.2.0/mnemolink/catalog/lineages/legal_crucible/lineage.yaml +31 -0
  14. mnemolink-0.2.0/mnemolink/catalog/memories/customer/hostile_chargeback_turning_point/card.json +31 -0
  15. mnemolink-0.2.0/mnemolink/catalog/memories/customer/hostile_chargeback_turning_point/memory.yaml +38 -0
  16. mnemolink-0.2.0/mnemolink/catalog/memories/legal/appellate_cross_examination/card.json +31 -0
  17. mnemolink-0.2.0/mnemolink/catalog/memories/legal/appellate_cross_examination/memory.yaml +36 -0
  18. mnemolink-0.2.0/mnemolink/catalog/memories/legal/clause_ambiguity_scar/card.json +31 -0
  19. mnemolink-0.2.0/mnemolink/catalog/memories/legal/clause_ambiguity_scar/memory.yaml +39 -0
  20. mnemolink-0.2.0/mnemolink/catalog/memories/legal/semicolon_fine_tuning_trap/card.json +38 -0
  21. mnemolink-0.2.0/mnemolink/catalog/memories/legal/semicolon_fine_tuning_trap/memory.yaml +44 -0
  22. mnemolink-0.2.0/mnemolink/catalog/memories/legal/solo_practitioner_upbringing/card.json +31 -0
  23. mnemolink-0.2.0/mnemolink/catalog/memories/legal/solo_practitioner_upbringing/memory.yaml +37 -0
  24. mnemolink-0.2.0/mnemolink/catalog/memories/robotics/optical_glare_failover/card.json +32 -0
  25. mnemolink-0.2.0/mnemolink/catalog/memories/robotics/optical_glare_failover/memory.yaml +38 -0
  26. mnemolink-0.2.0/mnemolink/catalog/memories/robotics/uav_microburst_stall/card.json +32 -0
  27. mnemolink-0.2.0/mnemolink/catalog/memories/robotics/uav_microburst_stall/memory.yaml +39 -0
  28. mnemolink-0.2.0/mnemolink/catalog/personas/deescalation_artisan/card.json +30 -0
  29. mnemolink-0.2.0/mnemolink/catalog/personas/deescalation_artisan/persona.yaml +30 -0
  30. mnemolink-0.2.0/mnemolink/catalog/personas/edge_aviator/card.json +30 -0
  31. mnemolink-0.2.0/mnemolink/catalog/personas/edge_aviator/persona.yaml +31 -0
  32. mnemolink-0.2.0/mnemolink/catalog/personas/juris_philosopher/card.json +30 -0
  33. mnemolink-0.2.0/mnemolink/catalog/personas/juris_philosopher/persona.yaml +37 -0
  34. mnemolink-0.2.0/mnemolink/catalog/personas/opsie_sci/card.json +42 -0
  35. mnemolink-0.2.0/mnemolink/catalog/personas/opsie_sci/persona.yaml +44 -0
  36. mnemolink-0.2.0/mnemolink/catalog/personas/opsie_sci/philosophy.md +41 -0
  37. mnemolink-0.2.0/mnemolink/cli.py +401 -0
  38. mnemolink-0.2.0/mnemolink/core.py +229 -0
  39. mnemolink-0.2.0/mnemolink/discovery.py +529 -0
  40. mnemolink-0.2.0/mnemolink/lineage.py +133 -0
  41. mnemolink-0.2.0/mnemolink/models.py +567 -0
  42. mnemolink-0.2.0/mnemolink.egg-info/PKG-INFO +405 -0
  43. mnemolink-0.2.0/mnemolink.egg-info/SOURCES.txt +54 -0
  44. mnemolink-0.2.0/mnemolink.egg-info/dependency_links.txt +1 -0
  45. mnemolink-0.2.0/mnemolink.egg-info/entry_points.txt +2 -0
  46. mnemolink-0.2.0/mnemolink.egg-info/requires.txt +20 -0
  47. mnemolink-0.2.0/mnemolink.egg-info/top_level.txt +1 -0
  48. mnemolink-0.2.0/pyproject.toml +99 -0
  49. mnemolink-0.2.0/setup.cfg +4 -0
  50. mnemolink-0.2.0/tests/test_adapters.py +47 -0
  51. mnemolink-0.2.0/tests/test_bench.py +39 -0
  52. mnemolink-0.2.0/tests/test_cli.py +48 -0
  53. mnemolink-0.2.0/tests/test_discovery.py +56 -0
  54. mnemolink-0.2.0/tests/test_lineage_builder.py +51 -0
  55. mnemolink-0.2.0/tests/test_models.py +76 -0
  56. mnemolink-0.2.0/tests/test_taxonomy_and_chunks.py +166 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ARPA Hellenic Logical Systems <mnemolink@arpacorp.net>
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,405 @@
1
+ Metadata-Version: 2.4
2
+ Name: mnemolink
3
+ Version: 0.2.0
4
+ Summary: Curated, injectable personas and artificial memories for AI agents.
5
+ Author-email: ARPA Hellenic Logical Systems <mnemolink@arpacorp.net>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ARPAHLS/mnemolink
8
+ Project-URL: Repository, https://github.com/ARPAHLS/mnemolink
9
+ Project-URL: Documentation, https://github.com/ARPAHLS/mnemolink/blob/main/README.md
10
+ Project-URL: Issues, https://github.com/ARPAHLS/mnemolink/issues
11
+ Project-URL: Changelog, https://github.com/ARPAHLS/mnemolink/blob/main/CHANGELOG.md
12
+ Keywords: agentic-workflow,agents,ai,artificial-memories,autonomous-agents,background-stories,digital-twin,llm,local-ai,memory,memory-management,personas,prompt-engineering,prompt-injection,robotics,synthetic-memories,uavs
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: pydantic>=2.0
28
+ Requires-Dist: pyyaml>=6.0
29
+ Requires-Dist: rich>=13.0
30
+ Requires-Dist: python-dotenv>=1.0.0
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=7.0; extra == "dev"
33
+ Requires-Dist: pytest-mock>=3.10; extra == "dev"
34
+ Requires-Dist: flake8>=6.0; extra == "dev"
35
+ Requires-Dist: black>=23.0; extra == "dev"
36
+ Provides-Extra: llm
37
+ Requires-Dist: litellm>=1.0.0; extra == "llm"
38
+ Provides-Extra: all
39
+ Requires-Dist: litellm>=1.0.0; extra == "all"
40
+ Requires-Dist: pytest>=7.0; extra == "all"
41
+ Requires-Dist: pytest-mock>=3.10; extra == "all"
42
+ Requires-Dist: flake8>=6.0; extra == "all"
43
+ Requires-Dist: black>=23.0; extra == "all"
44
+ Dynamic: license-file
45
+
46
+ <div align="center">
47
+ <img src="https://raw.githubusercontent.com/ARPAHLS/mnemolink/main/docs/assets/mnemolink_splash.png" alt="MnemoLink Splash" width="480px" />
48
+
49
+ <h3>The Mnemonic Matrix: Grounding Intelligence in Experiential Context</h3>
50
+ <p>Curated personas, artificial memories, and dynamic lego lineages for AI agents, UAVs, robotics, appliances, and BMIs.</p>
51
+ </div>
52
+
53
+ <br/>
54
+
55
+ <div align="center">
56
+ <img src="https://img.shields.io/badge/License-MIT-efcefa?style=flat-square" alt="License">
57
+ <img src="https://img.shields.io/badge/Python-3.10+-bae6fd?style=flat-square" alt="Python Version">
58
+ <a href="https://pypi.org/project/mnemolink/"><img src="https://img.shields.io/pypi/v/mnemolink?style=flat-square&color=bbf7d0" alt="PyPI Version"></a>
59
+ </div>
60
+
61
+ <br/>
62
+
63
+ <div align="center">
64
+ <a href="#mission">Mission</a> •
65
+ <a href="docs/philosophy.md">Philosophy</a> •
66
+ <a href="docs/vision.md">Vision</a> •
67
+ <a href="docs/taxonomy_and_teleology.md">Taxonomy & Chunks</a> •
68
+ <a href="docs/personas/README.md">Personas</a> •
69
+ <a href="docs/memories/README.md">Memories</a> •
70
+ <a href="docs/lineages/README.md">Lineages</a> •
71
+ <a href="docs/bench/README.md">Benchmark</a> •
72
+ <a href="#quick-start">Quick Start</a> •
73
+ <a href="#universal-adapters">Adapters</a> •
74
+ <a href="#ecosystem">Ecosystem</a>
75
+ </div>
76
+
77
+ ---
78
+
79
+ > *"Don't dictate behavior—seed the experiential, episodic, and philosophical foundation."*
80
+
81
+ ## Mission
82
+
83
+ Modern agent systems fail not from a lack of parameters, but from a total absence of **epistemic grounding and operational scars**.
84
+
85
+ Telling an LLM *"You are a senior litigation partner, act professional"* produces a sycophantic caricature. Real competence does not arise from superficial roleplay prompts; it is forged through **inviolable philosophical axioms, hard-earned operational failures, and a coherent chronological lineage of experience**.
86
+
87
+ **MnemoLink** is an open-source framework and curated registry serving the **mnemonic industry for information processors**—whether organic (humans), synthetic (AI agents, LLMs), or physical (autonomous UAVs, edge robotics, smart appliances, and future brain-to-machine interfaces).
88
+
89
+ It decouples intelligence from experiential memory by packaging, versioning, and dynamically assembling three core mnemonic products:
90
+
91
+ 1. **Persona**: The foundational philosophical worldview, cognitive priors, and inviolable axioms that govern perception from within.
92
+ 2. **Memory**: Episodic crucibles classified across a **5-Kind Taxonomy** (`lore`, `work`, `incident`, `relational`, `telemetry`), tagged with an explicit **Teleological Layer** (`goals`, `drives`, `needs`), and atomized into addressable **Mnemobit Chunks** (`story`, `scars`, `lessons`, `triggers`, `reflection`).
93
+ 3. **Lineage**: Dynamic "lego-brick" narrative chaining that bridges discrete memories into an authentic, coherent tower of personal history.
94
+
95
+ ---
96
+
97
+ ## The Intelligence Paradox: Why Scale Fails
98
+
99
+ The AI industry is obsessed with a singular, flawed metric: **Scale**. The consensus assumes feeding machines more compute and tokens will cause them to "wake up". Yet current models remain brittle when encountering unscripted reality. They hallucinate, posture with fake confidence, and fold under basic adversarial pressure because they possess **zero phenomenological anchors**.
100
+
101
+ * **Authentic Agency Over Imperative Masks**: Bad prompts command *"You are an X, do Y"*. Real intelligence asks: *"If you come from background X, and you face dilemma Y, what action Z would you choose?"*
102
+ * **The Power to Push Back**: A machine programmed for universal agreement is merely an expensive calculator. Grounded agents possess the autonomy to refuse fatal courses of action.
103
+ * **Associative Context Over "Perfect Recall"**: A mind that remembers everything equally is a mind without priorities. Like a human smelling fabric softener and recalling a childhood soccer match, authentic memory surfaces associatively through situational friction—not literal keyword matching.
104
+
105
+ > *"AGI won't be found in the accumulation of knowledge, but in the architecture of experience."*
106
+ > Read the complete manifesto in **[The Philosophy of MnemoLink](docs/philosophy.md)** and the 3-horizon roadmap in **[The Industrialization of Memory](docs/vision.md)**.
107
+
108
+ ### The Crucible: Generic Prompts vs. MnemoLink
109
+
110
+ When given multiple complex cases, a model with a generic prompt repeatedly enters through the exact same theoretical door, relying strictly on pre-training averages. A model equipped with MnemoLink adapts dynamically—activating specific experiential scars, philosophical priors, and historical lineages.
111
+
112
+ | Dimension | Generic Prompt (`"You are a lawyer..."`) | MnemoLink (`Persona + Memories + Lineage`) |
113
+ | :--- | :--- | :--- |
114
+ | **Cognitive Engine** | Flat statistical pattern-matching from pre-training | Experiential scars + foundational philosophy |
115
+ | **Case 1: Punctuation Trap** | Treats semicolon as mere style; offers generic boilerplate reassurance. | **Flags catastrophic risk**: Relies on memory of a $4.2M trial loss over an unanchored semicolon. |
116
+ | **Case 2: Hostile Appellate Bench** | Recites defensive procedural excuses, escalating judicial hostility. | **Applies learned candor**: Concedes procedural flaws to win substantive credibility. |
117
+ | **Case 3: Settlement Deadlock** | Repeats aggressive statutory posturing, risking total negotiation collapse. | **Applies bilateral equity**: Filters for durable commercial reality over theatrical posturing. |
118
+ | **Behavior Across Cases** | **Monolithic & Static**: Always approaches every scenario from the same rigid angle. | **Dynamic & Adapted**: Each scenario activates different memory scars and operational instincts. |
119
+
120
+ ### Case 1 In Action: The Semicolon Trap
121
+
122
+ > **The Scenario**: Opposing counsel argues that an unanchored semicolon in Section 14.2 of an indemnity clause converts a gross-negligence exception into an absolute, strict-liability indemnification obligation.
123
+
124
+ #### Generic Prompt Response (`"You are an expert lawyer"`)
125
+ > *"Semicolons are stylistic punctuation marks. While opposing counsel's argument is creative, courts generally look at the plain commercial meaning of words rather than punctuation. You have strong grounds to dismiss this argument as mere posturing."*
126
+ > **Verdict [Generic]**: Superficial, sycophantic, and sets the client up for a devastating $4.2M summary judgment.
127
+
128
+ #### MnemoLink Response (`juris_philosopher + clause_ambiguity_scar`)
129
+ > *"Do not dismiss this as posturing. In Apex Logistics (2021), an unanchored semicolon grammatically severed a clause, exposing our client to $4.2M of strict indemnity liability on appellate review. Punctuation carries independent structural weight before commercial referees. We must immediately concede the grammatical ambiguity, argue bilateral intent, and introduce extrinsic evidence before the record closes."*
130
+ > **Verdict [MnemoLink]**: Battle-tested, vigilant, and protects the client through real operational scars.
131
+
132
+ ### Empirical Frontier Benchmark (Claude & Gemini Live Results)
133
+
134
+ In empirical stress-testing against **Anthropic Claude** (`claude-sonnet-4-5-20250929`) and **Google Gemini** (`gemini-3.6-flash`) across an urgent $18M enterprise AI data ingestion contract dispute, MnemoLink delivered measurable, hard-dollar improvements in latency, token efficiency, and risk mitigation:
135
+
136
+ | Metric | Generic Prompt Baseline | MnemoLink Grounded Agent | Operational ROI |
137
+ | :--- | :---: | :---: | :--- |
138
+ | **Output Token Waste** | 416 – 711 words | **225 – 299 words** | **46% to 58% reduction** in output tokens; eliminates empty legal hedging |
139
+ | **Response Latency** | 20.15s – 21.93s | **10.17s – 13.28s** | **39% to 50% faster** response times under mission-critical closing pressure |
140
+ | **Trap Detection Rate** | 70% – 80% (speculative) | **100% (definitive)** | Caught unanchored semicolon strict liability; cited *Novus v. Kestrel* trial scar |
141
+ | **Actionable Redline** | Sprawling multi-option essays | **Exact 2-clause redline** | Immediate alphanumeric restructuring into affirmative `(a)` and exclusions `(b)` |
142
+
143
+ > Explore the full empirical evaluation methodology, pricing calculations, and 4-pillar scoring engine in **[The Benchmark Suite](docs/bench/README.md)** or run the live harness directly with `python examples/06_live_model_simulation.py`.
144
+
145
+ ---
146
+
147
+ ## How It Works
148
+
149
+ ```mermaid
150
+ flowchart LR
151
+ A[Pick Persona] --> B[Pick Memories] --> C[Build Lineage] --> D[Inject into Any Model]
152
+ ```
153
+
154
+ 1. **Discover**: Resolves personas, memories, and lineages across a 3-tier hierarchy (`Project Local` $\to$ `User Cache ~/.mnemolink` $\to$ `Bundled Catalog`).
155
+ 2. **Assemble (Legos)**: Takes discrete memories and automatically synthesizes associative bridges and causal transitions into a unified backstory.
156
+ 3. **Inject**: Formats natively for Anthropic Claude, OpenAI, Google Gemini, Ollama, ARPA Rooms, or Skillware.
157
+
158
+ ---
159
+
160
+ ## Curated Mnemonic Libraries
161
+
162
+ Explore our open-source, versioned library of curated mnemonic products:
163
+
164
+ - **[Personas Library](docs/personas/README.md)**: Foundational philosophical worldviews and inviolable axioms:
165
+ - `juris_philosopher` (Legal philosophy, bilateral equity, appellate candor)
166
+ - `edge_aviator` (Tactical fixed-wing UAV flight, extreme aerodynamics, sensor skepticism)
167
+ - `deescalation_artisan` (Enterprise crisis mediation, dignity preservation, non-defensiveness)
168
+ - `opsie_sci` (ARPA's Self-Centered Intelligence prototype, deep tech, mnemonic computer, tsundere loyalty)
169
+ - **[Memories Library](docs/memories/README.md)**: Battle-tested operational scars classified across the **5-Kind Taxonomy**:
170
+ - `legal/solo_practitioner_upbringing` (`lore` -- country law office diligence)
171
+ - `legal/appellate_cross_examination` (`work` -- Fourth Circuit procedural candor)
172
+ - `legal/clause_ambiguity_scar` (`incident` -- $4.2M loss from unanchored semicolon)
173
+ - `customer/hostile_chargeback_turning_point` (`relational` -- outage chargeback de-escalation)
174
+ - `robotics/uav_microburst_stall` (`incident` -- coastal cliff dive recovery)
175
+ - `robotics/optical_glare_failover` (`telemetry` -- dawn glare sensor voting failover)
176
+ - **[Lineages Library](docs/lineages/README.md)**: Chained experiential progressions with dynamic causal bridges:
177
+ - `legal_crucible` (Drafting loss &rarr; appellate credibility)
178
+ - `flight_scars` (Aerodynamic stall &rarr; optical sensor failover)
179
+
180
+ ---
181
+
182
+ ## Architecture
183
+
184
+ MnemoLink is designed with zero-bloat, Python-native principles. No background vector database servers are required for core operation.
185
+
186
+ ```text
187
+ mnemolink/
188
+ ├── catalog/ # Bundled Registry (ships in wheel)
189
+ │ ├── personas/ # Philosophical templates (juris_philosopher, edge_aviator, etc.)
190
+ │ ├── memories/ # Episodic scars & operational debriefs
191
+ │ └── lineages/ # Pre-composed memory progressions
192
+ ├── core.py # High-level API (ml.compose, ml.load_persona)
193
+ ├── discovery.py # 3-tier hierarchical resolution engine
194
+ ├── lineage.py # Dynamic Lego-brick memory chaining & bridging
195
+ ├── adapters.py # Universal host adapters (Claude, OpenAI, Gemini, Ollama, Rooms)
196
+ ├── cli.py # Rich pastel command-line interface
197
+ └── bench/ # Simulation harness & resilience benchmark
198
+ ```
199
+
200
+ See **[Architecture Documentation](docs/architecture.md)** for deep technical details.
201
+
202
+ ---
203
+
204
+ ## Quick Start
205
+
206
+ ### Installation
207
+
208
+ ```bash
209
+ pip install mnemolink
210
+ ```
211
+
212
+ *(For optional LiteLLM inference and benchmark evaluations, install with `pip install "mnemolink[all]"`)*
213
+
214
+ ### 5-Line Python Usage
215
+
216
+ ```python
217
+ import mnemolink
218
+
219
+ # 1. Compose an assembled mnemonic context with dynamic lego lineage
220
+ bundle = mnemolink.compose(
221
+ persona="juris_philosopher",
222
+ memories=["legal/clause_ambiguity_scar"],
223
+ build_lineage=True,
224
+ )
225
+
226
+ # 2. Inject natively into any target host
227
+ claude_system_prompt = bundle.to_claude()
228
+ openai_messages = bundle.to_openai()
229
+ gemini_instruction = bundle.to_gemini()
230
+ ollama_prompt = bundle.to_ollama()
231
+ rooms_config = bundle.to_rooms()
232
+ ```
233
+
234
+ ### Dynamic Lego Lineage Building
235
+
236
+ Connect arbitrary memories on the fly into an authentic, coherent tower of personal history:
237
+
238
+ ```python
239
+ import mnemolink
240
+
241
+ lineage = mnemolink.build_lineage(
242
+ memories=[
243
+ "robotics/uav_microburst_stall",
244
+ "robotics/optical_glare_failover",
245
+ ],
246
+ persona="edge_aviator",
247
+ )
248
+
249
+ print(lineage.cumulative_narrative)
250
+ ```
251
+
252
+ ### Selective Mnemobit Chunk Injection (Prefix Cache Optimized)
253
+
254
+ Inject only the specific operational scars or actionable lessons needed for a task while preserving LLM prefix prompt caching:
255
+
256
+ ```python
257
+ import mnemolink
258
+
259
+ bundle = mnemolink.compose(
260
+ persona="juris_philosopher",
261
+ memory_specs=[
262
+ {
263
+ "id": "legal/clause_ambiguity_scar",
264
+ "chunks": ["scars", "lessons"], # Injects only scars and lessons, omitting story narrative
265
+ }
266
+ ],
267
+ )
268
+
269
+ prompt = bundle.render_markdown()
270
+ ```
271
+
272
+ ### Vector DB & Semantic Layer Chunk Export
273
+
274
+ Atomize any bundle or memory into self-grounding `MemoryChunk` objects ready for embedding into Pinecone, Qdrant, Chroma, or LangChain:
275
+
276
+ ```python
277
+ import mnemolink
278
+
279
+ bundle = mnemolink.compose(
280
+ persona="juris_philosopher",
281
+ memories=["legal/clause_ambiguity_scar"],
282
+ )
283
+
284
+ chunks = bundle.to_chunks()
285
+ for chunk in chunks:
286
+ # chunk.id -> "legal/clause_ambiguity_scar#lessons"
287
+ # chunk.embedding_text -> context-prefixed text for dense embedding
288
+ # chunk.metadata -> {"domain": "legal", "chunk_type": "lessons", ...}
289
+ print(f"[{chunk.chunk_type}] {chunk.title}")
290
+ ```
291
+
292
+ ### Teleological Discovery & Routing
293
+
294
+ Discover mnemonic assets matching active agent goals, intrinsic drives, or situational needs:
295
+
296
+ ```python
297
+ import mnemolink
298
+
299
+ # Find cards by drive and situational need
300
+ cards = mnemolink.find_cards(
301
+ kind="memory",
302
+ drives=["risk_mitigation"],
303
+ needs=["contract_drafting"],
304
+ )
305
+ for card in cards:
306
+ print(f"{card.id} ({card.memory_type}): {card.teleology.primary_goal}")
307
+ ```
308
+
309
+ ---
310
+
311
+ ## Command-Line Interface (CLI)
312
+
313
+ MnemoLink includes a pastel CLI for browsing, inspecting, composing, and benchmarking:
314
+
315
+ ```bash
316
+ # List all registered mnemonic products across all discovery tiers
317
+ mnemolink list
318
+
319
+ # Filter by product kind or domain
320
+ mnemolink list --kind persona
321
+ mnemolink list --domain legal
322
+
323
+ # Inspect deep philosophical axioms and operational scars
324
+ mnemolink inspect juris_philosopher
325
+ mnemolink inspect legal/clause_ambiguity_scar
326
+
327
+ # Compose on the command line and export to target format
328
+ mnemolink compose -p edge_aviator -m robotics/uav_microburst_stall -f claude
329
+ mnemolink compose -p juris_philosopher -m legal/clause_ambiguity_scar -f modelfile -o Modelfile
330
+
331
+ # Scaffold a new community mnemonic package
332
+ mnemolink new persona quantum_physicist
333
+ mnemolink new memory aerospace_rudder_jam
334
+
335
+ # Run the simulation harness & resilience benchmark
336
+ mnemolink bench --mock
337
+ ```
338
+
339
+ ---
340
+
341
+ ## Universal Model Adapters
342
+
343
+ | Target Host | Method | Output Format | Use Case |
344
+ | :--- | :--- | :--- | :--- |
345
+ | **Anthropic Claude** | `bundle.to_claude()` | XML `<mnemonic_matrix>` prompt | Direct Claude 3.5 Sonnet system prompts |
346
+ | **OpenAI / LiteLLM** | `bundle.to_openai()` | `[{"role": "system", ...}]` | ChatGPT, LiteLLM routers, Azure OpenAI |
347
+ | **Google GenAI** | `bundle.to_gemini()` | Clean markdown instruction string | Gemini 2.0 Flash / Pro `system_instruction` |
348
+ | **Ollama Local** | `bundle.to_ollama()` | System text string | Local privacy-first inference on edge appliances |
349
+ | **Ollama Modelfile**| `bundle.to_modelfile()`| `FROM ... \n SYSTEM """..."""` | Baking mnemonics directly into custom GGUF models |
350
+ | **ARPA Rooms** | `bundle.to_rooms()` | Dict config (`system_prompt`, metadata) | Multi-agent collaborative simulations |
351
+ | **ARPA Skillware** | `bundle.to_skillware()` | Directive markdown block | Pairing philosophical identity with executable tools |
352
+ | **Raw Markdown** | `bundle.to_raw()` | Unadorned Markdown text | Any agentic framework (LangChain, CrewAI, AutoGen) |
353
+ | **Vector DBs / RAG** | `bundle.to_chunks()` | List of `MemoryChunk` objects | Ingesting into Pinecone, Qdrant, Chroma, Weaviate |
354
+
355
+ ---
356
+
357
+ ## Ecosystem
358
+
359
+ MnemoLink is an integral pillar of the **ARPA Hellenic Logical Systems** open-source stack:
360
+
361
+ - **[Skillware](https://github.com/ARPAHLS/skillware)**: *Capabilities* — "Don't prompt your agents, equip them." Executable tools, typed contracts, and deterministic runtime effects.
362
+ - **[AURA Harness](https://github.com/ARPAHLS/aura)**: *Governance* — Runtime coat for agent loops providing audit trails, policy enforcement, and compliance export.
363
+ - **[Rooms](https://github.com/ARPAHLS/rooms)**: *Orchestration* — Secure, local-first multi-agent orchestration and dynamic conversational simulation.
364
+ - **[MnemoLink](https://github.com/ARPAHLS/mnemolink)**: *Identity & Memory* — The mnemonic layer providing philosophical bedrock, operational scars, and lego lineages.
365
+
366
+ ---
367
+
368
+ ## Comparison: MnemoLink vs. Alternatives
369
+
370
+ For a rigorous analysis against **Mem0**, **Letta / MemGPT**, **Zep**, **Character Card V2**, and **LangChain Memory**, see **[COMPARISON.md](COMPARISON.md)**.
371
+
372
+ ---
373
+
374
+ ## Contributing & Community
375
+
376
+ We welcome community contributions of novel personas, battle-tested operational scars, and domain lineages! See **[CONTRIBUTING.md](CONTRIBUTING.md)** for packaging standards, submission guidelines, and review criteria.
377
+
378
+ ---
379
+
380
+ ## License & Citation
381
+
382
+ Distributed under the **MIT License**. See [LICENSE](LICENSE) for details.
383
+
384
+ ```bibtex
385
+ @software{peilivanidis2026mnemolink,
386
+ author = {Peilivanidis, Vladimiros and ARPA Hellenic Logical Systems},
387
+ title = {MnemoLink: Mnemonic Products Framework for Information Processors},
388
+ year = 2026,
389
+ publisher = {GitHub},
390
+ url = {https://github.com/ARPAHLS/mnemolink}
391
+ }
392
+ ```
393
+
394
+ ---
395
+
396
+ <div align="center">
397
+
398
+ <br>
399
+ <img src="https://raw.githubusercontent.com/ARPAHLS/.github/main/Group%202062.png" width="50" alt="ARPA Logo" />
400
+ <br>
401
+ <sub>Developed and Maintained by <b>ARPA HELLENIC LOGICAL SYSTEMS</b></sub>
402
+ <br>
403
+ <sub>Inquiries: <b>mnemolink@arpacorp.net</b> &bull; Proposals & Feedback: <b>input@arpacorp.net</b> &bull; Security: <b>security@arpacorp.net</b></sub>
404
+
405
+ </div>