monkeyllm 0.49.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 (100) hide show
  1. monkeyllm-0.49.0/LICENSE +201 -0
  2. monkeyllm-0.49.0/NOTICE +5 -0
  3. monkeyllm-0.49.0/PKG-INFO +304 -0
  4. monkeyllm-0.49.0/README.md +266 -0
  5. monkeyllm-0.49.0/pyproject.toml +54 -0
  6. monkeyllm-0.49.0/setup.cfg +4 -0
  7. monkeyllm-0.49.0/src/monkeyllm/__init__.py +10 -0
  8. monkeyllm-0.49.0/src/monkeyllm/canopy.py +246 -0
  9. monkeyllm-0.49.0/src/monkeyllm/catalog.py +462 -0
  10. monkeyllm-0.49.0/src/monkeyllm/cli.py +310 -0
  11. monkeyllm-0.49.0/src/monkeyllm/curator.py +480 -0
  12. monkeyllm-0.49.0/src/monkeyllm/dialect.py +100 -0
  13. monkeyllm-0.49.0/src/monkeyllm/errors.py +33 -0
  14. monkeyllm-0.49.0/src/monkeyllm/fetch.py +140 -0
  15. monkeyllm-0.49.0/src/monkeyllm/forest.py +282 -0
  16. monkeyllm-0.49.0/src/monkeyllm/gardener.py +1584 -0
  17. monkeyllm-0.49.0/src/monkeyllm/gitops.py +65 -0
  18. monkeyllm-0.49.0/src/monkeyllm/harvest.py +183 -0
  19. monkeyllm-0.49.0/src/monkeyllm/indexer.py +78 -0
  20. monkeyllm-0.49.0/src/monkeyllm/lint.py +88 -0
  21. monkeyllm-0.49.0/src/monkeyllm/models.py +511 -0
  22. monkeyllm-0.49.0/src/monkeyllm/parser.py +162 -0
  23. monkeyllm-0.49.0/src/monkeyllm/ranger.py +221 -0
  24. monkeyllm-0.49.0/src/monkeyllm/server.py +293 -0
  25. monkeyllm-0.49.0/src/monkeyllm/snapshot.py +81 -0
  26. monkeyllm-0.49.0/src/monkeyllm/telemetry.py +99 -0
  27. monkeyllm-0.49.0/src/monkeyllm/tokens.py +44 -0
  28. monkeyllm-0.49.0/src/monkeyllm/trails.py +154 -0
  29. monkeyllm-0.49.0/src/monkeyllm/vine.py +1832 -0
  30. monkeyllm-0.49.0/src/monkeyllm.egg-info/PKG-INFO +304 -0
  31. monkeyllm-0.49.0/src/monkeyllm.egg-info/SOURCES.txt +98 -0
  32. monkeyllm-0.49.0/src/monkeyllm.egg-info/dependency_links.txt +1 -0
  33. monkeyllm-0.49.0/src/monkeyllm.egg-info/entry_points.txt +2 -0
  34. monkeyllm-0.49.0/src/monkeyllm.egg-info/requires.txt +15 -0
  35. monkeyllm-0.49.0/src/monkeyllm.egg-info/top_level.txt +1 -0
  36. monkeyllm-0.49.0/tests/test_bench_baselines.py +89 -0
  37. monkeyllm-0.49.0/tests/test_budgets_telemetry.py +120 -0
  38. monkeyllm-0.49.0/tests/test_canopy_vector.py +211 -0
  39. monkeyllm-0.49.0/tests/test_content_policy.py +238 -0
  40. monkeyllm-0.49.0/tests/test_curator.py +408 -0
  41. monkeyllm-0.49.0/tests/test_dataset_adoption.py +311 -0
  42. monkeyllm-0.49.0/tests/test_dataset_curation.py +269 -0
  43. monkeyllm-0.49.0/tests/test_demo_loop.py +90 -0
  44. monkeyllm-0.49.0/tests/test_docx_converter.py +119 -0
  45. monkeyllm-0.49.0/tests/test_fetch_snapshot.py +140 -0
  46. monkeyllm-0.49.0/tests/test_gardener.py +289 -0
  47. monkeyllm-0.49.0/tests/test_gardener_rollup.py +174 -0
  48. monkeyllm-0.49.0/tests/test_gauntlet.py +299 -0
  49. monkeyllm-0.49.0/tests/test_harvest.py +139 -0
  50. monkeyllm-0.49.0/tests/test_infra.py +103 -0
  51. monkeyllm-0.49.0/tests/test_init_forest.py +77 -0
  52. monkeyllm-0.49.0/tests/test_llm_providers.py +54 -0
  53. monkeyllm-0.49.0/tests/test_mcp_demo.py +52 -0
  54. monkeyllm-0.49.0/tests/test_media_stub.py +355 -0
  55. monkeyllm-0.49.0/tests/test_multi_forest.py +130 -0
  56. monkeyllm-0.49.0/tests/test_parser_models.py +159 -0
  57. monkeyllm-0.49.0/tests/test_payload_policy.py +55 -0
  58. monkeyllm-0.49.0/tests/test_plant_dataset.py +188 -0
  59. monkeyllm-0.49.0/tests/test_query_budget.py +159 -0
  60. monkeyllm-0.49.0/tests/test_query_security.py +127 -0
  61. monkeyllm-0.49.0/tests/test_ranger.py +226 -0
  62. monkeyllm-0.49.0/tests/test_read_primitives.py +171 -0
  63. monkeyllm-0.49.0/tests/test_repo_hygiene.py +67 -0
  64. monkeyllm-0.49.0/tests/test_sniff.py +125 -0
  65. monkeyllm-0.49.0/tests/test_sniff_memo.py +172 -0
  66. monkeyllm-0.49.0/tests/test_station_admin_scope.py +236 -0
  67. monkeyllm-0.49.0/tests/test_station_answer_store.py +437 -0
  68. monkeyllm-0.49.0/tests/test_station_api.py +328 -0
  69. monkeyllm-0.49.0/tests/test_station_clipper.py +82 -0
  70. monkeyllm-0.49.0/tests/test_station_compose_review.py +342 -0
  71. monkeyllm-0.49.0/tests/test_station_credentials.py +373 -0
  72. monkeyllm-0.49.0/tests/test_station_env_providers.py +289 -0
  73. monkeyllm-0.49.0/tests/test_station_explain.py +363 -0
  74. monkeyllm-0.49.0/tests/test_station_first_run.py +377 -0
  75. monkeyllm-0.49.0/tests/test_station_forage.py +412 -0
  76. monkeyllm-0.49.0/tests/test_station_jobs.py +388 -0
  77. monkeyllm-0.49.0/tests/test_station_lifecycle.py +765 -0
  78. monkeyllm-0.49.0/tests/test_station_maintenance.py +298 -0
  79. monkeyllm-0.49.0/tests/test_station_map.py +295 -0
  80. monkeyllm-0.49.0/tests/test_station_mcp.py +142 -0
  81. monkeyllm-0.49.0/tests/test_station_models.py +218 -0
  82. monkeyllm-0.49.0/tests/test_station_pair.py +377 -0
  83. monkeyllm-0.49.0/tests/test_station_payload.py +300 -0
  84. monkeyllm-0.49.0/tests/test_station_people.py +387 -0
  85. monkeyllm-0.49.0/tests/test_station_reindex.py +198 -0
  86. monkeyllm-0.49.0/tests/test_station_reply_budget.py +206 -0
  87. monkeyllm-0.49.0/tests/test_station_scoping.py +234 -0
  88. monkeyllm-0.49.0/tests/test_station_studio_routes.py +131 -0
  89. monkeyllm-0.49.0/tests/test_station_view.py +171 -0
  90. monkeyllm-0.49.0/tests/test_station_vision.py +176 -0
  91. monkeyllm-0.49.0/tests/test_station_warm.py +164 -0
  92. monkeyllm-0.49.0/tests/test_studio_calls.py +159 -0
  93. monkeyllm-0.49.0/tests/test_studio_data_console.py +115 -0
  94. monkeyllm-0.49.0/tests/test_studio_history.py +198 -0
  95. monkeyllm-0.49.0/tests/test_studio_i18n.py +217 -0
  96. monkeyllm-0.49.0/tests/test_studio_routes.py +81 -0
  97. monkeyllm-0.49.0/tests/test_tend.py +140 -0
  98. monkeyllm-0.49.0/tests/test_troop.py +204 -0
  99. monkeyllm-0.49.0/tests/test_view.py +130 -0
  100. monkeyllm-0.49.0/tests/test_write_primitives.py +240 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,5 @@
1
+ MonkeyLLM
2
+ Copyright 2026 Jimmy Wesley
3
+
4
+ This product includes software developed as part of the MonkeyLLM project
5
+ (https://github.com/JimmyWesley/MonkeyLLM).
@@ -0,0 +1,304 @@
1
+ Metadata-Version: 2.4
2
+ Name: monkeyllm
3
+ Version: 0.49.0
4
+ Summary: An agent-navigable knowledge forest: markdown and indexes an LLM traverses through MCP, instead of flat vector search.
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://monkeyllm.com
7
+ Project-URL: Repository, https://github.com/JimmyWesley/MonkeyLLM
8
+ Project-URL: Documentation, https://github.com/JimmyWesley/MonkeyLLM/blob/main/docs/guide/README.md
9
+ Project-URL: Paper, https://github.com/JimmyWesley/MonkeyLLM/blob/main/paper/monkeyllm-paper.md
10
+ Project-URL: Issues, https://github.com/JimmyWesley/MonkeyLLM/issues
11
+ Keywords: llm,rag,mcp,agents,retrieval,knowledge-base,markdown,knowledge-graph
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: Topic :: Text Processing :: Indexing
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ License-File: NOTICE
25
+ Requires-Dist: mcp<3,>=2
26
+ Requires-Dist: pydantic>=2.7
27
+ Requires-Dist: pyyaml>=6.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=8.0; extra == "dev"
30
+ Requires-Dist: pytest-timeout>=2.3; extra == "dev"
31
+ Provides-Extra: demo
32
+ Requires-Dist: huggingface_hub>=0.30; extra == "demo"
33
+ Provides-Extra: ingest
34
+ Requires-Dist: openpyxl>=3.1; extra == "ingest"
35
+ Requires-Dist: python-docx>=1.1; extra == "ingest"
36
+ Requires-Dist: xlrd>=2.0; extra == "ingest"
37
+ Dynamic: license-file
38
+
39
+ <div align="center">
40
+ <img src="https://raw.githubusercontent.com/JimmyWesley/MonkeyLLM/main/docs/logo.png" alt="MonkeyLLM Logo" width="120"/>
41
+ </div>
42
+
43
+ # MonkeyLLM
44
+
45
+ **This repository is not an application. It is a knowledge engine: a new
46
+ way to query data.**
47
+
48
+ Knowledge lives in a **forest**: a git-versioned tree of markdown nodes,
49
+ each carrying a curated, scent-bearing passport. An AI does not get handed
50
+ a retrieval dump. It **navigates**: drops in through search, follows typed
51
+ edges, reads exactly the node it needs, and plants what it learns.
52
+ Successful hunts deposit pheromone and mint shortcut links, so the corpus
53
+ itself learns from use.
54
+
55
+ <div align="center">
56
+ <img src="https://raw.githubusercontent.com/JimmyWesley/MonkeyLLM/main/docs/guide/assets/graph-sample.png" alt="A real knowledge forest: 1,877 nodes across 49 branches, seen in the Explore console" width="900"/>
57
+ <br/>
58
+ <sub>A real forest: 1,877 nodes across 49 branches. Every cluster is a
59
+ branch, every dot a node; solid lines are curated trails, dashed ones are
60
+ shortcuts a hunt discovered, and the glow is pheromone left by use.</sub>
61
+ </div>
62
+
63
+ The number that made us write it down: on a benchmark where **every
64
+ question needs ≥3 chained hops**, the *same* 12B local model scores
65
+ **0 / 11 as a classic top-k RAG reader** and **11 / 11 (100%) as a forest
66
+ navigator**, at **0.58×** the token cost per correct answer of an
67
+ iterative-RAG baseline, on a single consumer GPU. If your first reaction
68
+ is *"I need to test whether this actually serves my case"*, good. Every
69
+ number is reproducible from committed scripts, and the whole design is
70
+ written down in [the paper](https://github.com/JimmyWesley/MonkeyLLM/blob/main/paper/monkeyllm-paper.md).
71
+
72
+ Everything else in this repository exists *around* that engine. The
73
+ **Studio** console you see in the screenshots is not the product. It is
74
+ the **management layer**: the window where people watch, govern and teach
75
+ what the engine serves.
76
+
77
+ The spec is the truth: the latest `docs/monkeyllm-spec-v*.md` is
78
+ normative; code follows it, never the other way around.
79
+
80
+ ## The engine, inside your own code
81
+
82
+ The engine is a plain Python package (**Apache-2.0**) with no host, no
83
+ server and no UI attached. Point it at a folder and you have a forest;
84
+ operate it from your own Python:
85
+
86
+ ```bash
87
+ pip install monkeyllm # the monkeyllm package + vine CLI
88
+ vine init --forest ./brain --title "My brain" # an empty forest, git and all
89
+ ```
90
+
91
+ Straight from source, without waiting for a release:
92
+ `pip install "git+https://github.com/JimmyWesley/MonkeyLLM.git"`. Python
93
+ 3.11+; the file converters of Part G are an extra
94
+ (`pip install "monkeyllm[ingest]"`), and contributors want the editable
95
+ install further down.
96
+
97
+ ```python
98
+ from monkeyllm import Vine
99
+ from monkeyllm.harvest import harvest
100
+
101
+ vine = Vine("./brain")
102
+ vine.plant({"id": "inbox/_index", "type": "branch", "parent": "_index",
103
+ "title": "Inbox", "summary": "Loose notes before they find a branch."})
104
+ vine.plant({"id": "inbox/first-note", "type": "note", "parent": "inbox/_index",
105
+ "title": "First note", "summary": "Where this brain begins.",
106
+ "body": "Planted from my own code."})
107
+
108
+ vine.locate("where does this brain begin?") # ranked entry points, BM25, zero embeddings
109
+ harvest(vine, "first note") # one-shot retrieval: evidence + snippets, zero LLM
110
+ ```
111
+
112
+ Every primitive an agent uses rides that same object (`locate`, `look`,
113
+ `move`, `pick`, `scan`, `sniff`, `query`, `plant`, `graft`, `tend`), each
114
+ token-budgeted, each truncation explicit. The Gardener (`vine adopt` /
115
+ `vine sync`) mirrors an existing document tree into a forest, and the
116
+ Ranger (`vine ranger`) keeps it healthy over time.
117
+
118
+ And the same forest speaks **MCP** to any agent, straight from the CLI:
119
+
120
+ ```bash
121
+ vine serve --forest ./brain # stdio MCP server
122
+ vine serve --forest ./brain --transport http # or over HTTP
123
+ ```
124
+
125
+ Claude Code, or any MCP-capable runtime, then holds the forest's tools:
126
+ no host, no accounts, your machine, your ecosystem.
127
+
128
+ ## Anything you feed it becomes navigable
129
+
130
+ You do not prepare your files for the engine. You hand them over and the
131
+ **Gardener** converts, summarises and commits each one, through the same
132
+ pipeline whether it runs from the command line (`vine adopt`), from the
133
+ console, or from your browser:
134
+
135
+ | What you drop in | What it becomes |
136
+ |---|---|
137
+ | `.md`, `.markdown`, `.txt` | a `note`; the text is already the body |
138
+ | `.docx` | a `document`: headings and paragraphs as markdown |
139
+ | `.pdf` | a `document`, through a one-line converter hook, using any CLI extractor you trust ([how](https://github.com/JimmyWesley/MonkeyLLM/blob/main/docs/ingest-tools.md)) |
140
+ | `.csv` | a **dataset**: a real SQLite table, queried with read-only SQL |
141
+ | `.json` | a dataset when it is a flat table, otherwise a `document` holding the JSON |
142
+ | `.xlsx`, `.xls` | a dataset **per sheet**, with types inferred |
143
+ | `.db`, `.sqlite`, `.sqlite3` | adopted whole: the database itself becomes the payload, with a generated query manual and sample rows |
144
+ | `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp` | a `media` node; on a Station with a `vision` model bound, it also gets a written description that search can find |
145
+ | `.mp3`, `.wav`, `.m4a`, `.ogg`, `.flac` | a `media` node carrying its passport |
146
+ | anything else | listed as `unsupported` in the report, by name, so you can see exactly what did not land |
147
+
148
+ Tabular files stop being documents: a spreadsheet becomes a table an
149
+ agent queries in SQL, with a `## Query manual` and sample rows written
150
+ into its passport, so a model knows which tables and columns exist before
151
+ it asks. What they *mean* is the one thing a machine cannot infer, so a
152
+ person writes it in a `## Notes` section that travels with the dataset
153
+ everywhere it is read.
154
+
155
+ `.docx`, `.xlsx` and `.xls` need the optional `ingest` extra
156
+ (`pip install -e ".[ingest]"`). PDFs need a converter hook, because a good
157
+ extractor is a heavyweight (often copyleft) dependency this project will
158
+ not force on you: name the tool in `_meta/gardener.yaml` and it joins the
159
+ pipeline. Everything else in the table works out of the box.
160
+
161
+ ![Sending files into a forest from the Ingest console](https://raw.githubusercontent.com/JimmyWesley/MonkeyLLM/main/docs/guide/assets/ingest.png)
162
+
163
+ Drop files, mirror a whole folder the host can read, or write a document
164
+ in place: each one arrives with a curated passport, and a batch is a job
165
+ you can watch. Nothing is chunked and forgotten. Every document becomes a
166
+ node with a name, a summary and edges.
167
+
168
+ ### And from the browser
169
+
170
+ The **Clipper** (`apps/clipper/`) is a Chrome/Edge/Brave extension that
171
+ turns the page you are reading into a forest: the readable article or just
172
+ your selection as markdown, a screenshot or a dragged region as a `media`
173
+ node. Drag the region, adjust it by its handles, mark it up (arrow, box,
174
+ pen, text label) and leave a note for the Gardener, typed or dictated. The
175
+ clip lands with the page's address attached, so it can always be traced
176
+ back.
177
+
178
+ <div align="center">
179
+ <table>
180
+ <tr>
181
+ <td align="center" width="30%">
182
+ <img src="https://raw.githubusercontent.com/JimmyWesley/MonkeyLLM/main/docs/guide/assets/clipper.png" width="250" alt="The Clipper popup: clip, capture, write or ask"/>
183
+ </td>
184
+ <td align="center" width="70%">
185
+ <img src="https://raw.githubusercontent.com/JimmyWesley/MonkeyLLM/main/docs/guide/assets/sample-clipper.png" width="620" alt="Capturing and annotating a region of a page, with a note for the Gardener"/>
186
+ </td>
187
+ </tr>
188
+ <tr>
189
+ <td align="center"><sub>One click: clip, capture, write, or ask the forest.</sub></td>
190
+ <td align="center"><sub>Drag a region, annotate it, leave a note, then capture.</sub></td>
191
+ </tr>
192
+ </table>
193
+ </div>
194
+
195
+ It holds a paired key of its own, never your password, and the Station
196
+ serves the build at `/clipper.zip`, offered on the console's own rail: a
197
+ key that can only narrow your access is self-service, so getting the
198
+ extension is too.
199
+
200
+ ## Quick start (development)
201
+
202
+ ```bash
203
+ pip install -e ".[dev]" && pip install -e apps/station
204
+ python -m pytest -q
205
+ python forests/scripts/build_fixture.py
206
+ python -m monkeyllm.cli validate --forest forests/forest-fixture
207
+ ```
208
+
209
+ ## The management layer (Station + Studio)
210
+
211
+ When a forest must be a **shared, governed asset** instead of a personal
212
+ directory, the **Station** (spec Part J) wraps the untouched engine with
213
+ identity, per-forest policy, audit and model bindings, serving REST under
214
+ `/v1` and MCP under `/mcp`. It also serves the **Studio**, the web console:
215
+
216
+ <div align="center">
217
+ <img src="https://raw.githubusercontent.com/JimmyWesley/MonkeyLLM/main/docs/guide/assets/overview.png" alt="The Studio console, the management layer over the engine" width="720"/>
218
+ </div>
219
+
220
+ Ask questions that arrive with their sources, walk the tree as a living
221
+ graph, query datasets in SQL, feed the forest from uploads and the browser
222
+ Clipper, grant scoped access, and hand your own AI the skill that makes
223
+ the forest its persistent memory. The console is where the engine's
224
+ possibilities become visible, but whatever it shows, an API client holding
225
+ the same key could fetch: there is no privileged path.
226
+
227
+ ## Documentation
228
+
229
+ **[The MonkeyLLM Handbook](https://github.com/JimmyWesley/MonkeyLLM/blob/main/docs/guide/README.md)**: install it, sign in
230
+ for the first time, use and feed the forest, connect your own AI over MCP
231
+ (including the Claude Code skill the Studio generates), and govern the
232
+ deployment. English, Português and Español, with screenshots.
233
+
234
+ ## The paper
235
+
236
+ **[MonkeyLLM: Stigmergic Navigation of Knowledge Forests](https://github.com/JimmyWesley/MonkeyLLM/blob/main/paper/monkeyllm-paper.md)**,
237
+ replacing retrieval-augmented generation with agentic foraging by small
238
+ language models. The forest, the scent contract, the ten budgeted
239
+ primitives, the pheromone economy, and the **Forest Principle** (*spend
240
+ intelligence on the environment so you can spend less on the model*), with
241
+ every benchmark number reproducible from this repository.
242
+
243
+ ## Roadmap
244
+
245
+ The engine, the Station, the Studio and the Clipper are built and
246
+ measured; the phases below are what comes next. The full plan, with exit
247
+ criteria per phase, is [`docs/monkeyllm-roadmap.md`](https://github.com/JimmyWesley/MonkeyLLM/blob/main/docs/monkeyllm-roadmap.md);
248
+ the working backlog is [`tasks/`](https://github.com/JimmyWesley/MonkeyLLM/blob/main/tasks/README.md).
249
+
250
+ | Next | What it means | Where it stands |
251
+ |---|---|---|
252
+ | **Monkey Bench, officially** | The full benchmark run published with its traces, against top-k and iterative RAG baselines | 3 of 4 exit criteria met; the fourth re-measured as tokens-per-correct (0.58×) |
253
+ | **Convergence curve** | Proving hops-to-answer *drops* as a forest is used: the pheromone economy paying off, and the paper's signature chart | measured once; the criterion is not met yet, and the findings (floor effect, pheromone cross-talk) are themselves results |
254
+ | **The Troop** | Parallel foragers with a judge: today an accuracy amplifier, not yet a speed one | 8/8 accuracy on both arms; the wall-clock criterion needs a deeper corpus |
255
+ | **Entities and typed edges at ingest** | The Gardener extracting people, places and relations, beyond today's summaries and `related-to` proposals | designed (Part G), needs a spec bump |
256
+ | **Station hardening** | OIDC sign-in, per-principal quotas | the rest of Part J ships today |
257
+ | **Publication** | The paper deposited with a DOI (Zenodo / arXiv) | written; deposit pending |
258
+ | **Phase 3: a faster core** (conditional) | Rust for Catalog + Canopy behind the same contracts, **only if** telemetry proves the bottleneck | deliberately not started; the SLM dominates the cost today |
259
+
260
+ The rule the project holds itself to: **no phase starts before the
261
+ previous one passes its exit criteria, and no optimization happens
262
+ without a measurement that justifies it.** The benchmark is the judge,
263
+ not intuition, which is why a criterion that did not pass is written down
264
+ above instead of quietly dropped.
265
+
266
+ ## Layout
267
+
268
+ | Path | What lives there |
269
+ |---|---|
270
+ | `src/monkeyllm/` | **the engine**: `vine` CLI, 10 primitives, harvest, Gardener (ingest), Ranger (maintenance), catalog, Canopy |
271
+ | `apps/station/` | the deployable host: REST `/v1`, MCP `/mcp`, serves the Studio |
272
+ | `apps/studio/` | the web console (React/Vite, built into the Station image) |
273
+ | `apps/clipper/` | the browser extension: clip the page you are reading into a forest |
274
+ | `paper/` | the paper: design, vocabulary, benchmarks, authorship |
275
+ | `forests/` | generated forests (gitignored except `forests/scripts/`); rebuild, never edit |
276
+ | `bench/` | Monkey Bench: chunker, RAG baselines, runner |
277
+ | `scripts/` | infra + measurement (local models, bench, curation metrics) |
278
+ | `docs/` | the spec, the handbook (`docs/guide/`) and design notes |
279
+ | `tasks/` | backlog, one file per task |
280
+
281
+ ## Run the whole environment (Docker)
282
+
283
+ One container serves frontend and backend; data persists in named volumes:
284
+
285
+ ```bash
286
+ cp .env.example .env # fill in what you use
287
+ docker compose up --build -d
288
+ ```
289
+
290
+ See [deploy/README.md](https://github.com/JimmyWesley/MonkeyLLM/blob/main/deploy/README.md) for the full walkthrough,
291
+ including Dokploy and optional local llama.cpp inference.
292
+
293
+ ## License
294
+
295
+ Two licenses, split along the line the architecture already draws:
296
+
297
+ - **Engine** (`src/monkeyllm/`, the spec, the benchmark, the tooling):
298
+ [Apache-2.0](https://github.com/JimmyWesley/MonkeyLLM/blob/main/LICENSE). The MCP contract is meant to spread.
299
+ - **Host** (`apps/station/`, `apps/studio/`, `apps/clipper/`):
300
+ [AGPL-3.0-only](https://github.com/JimmyWesley/MonkeyLLM/blob/main/apps/station/LICENSE). Self-hosting is free and
301
+ unrestricted; offering it as a managed service means opening your stack.
302
+
303
+ See [LICENSING.md](https://github.com/JimmyWesley/MonkeyLLM/blob/main/LICENSING.md) for the full map, the commercial option and
304
+ the DCO requirement for contributions.