mantisdk 0.1.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 (192) hide show
  1. mantisdk-0.1.0/.gitignore +94 -0
  2. mantisdk-0.1.0/LICENSE +19 -0
  3. mantisdk-0.1.0/PKG-INFO +119 -0
  4. mantisdk-0.1.0/PUBLISHING.md +95 -0
  5. mantisdk-0.1.0/README.md +66 -0
  6. mantisdk-0.1.0/pyproject.toml +364 -0
  7. mantisdk-0.1.0/src/mantisdk/__init__.py +22 -0
  8. mantisdk-0.1.0/src/mantisdk/adapter/__init__.py +15 -0
  9. mantisdk-0.1.0/src/mantisdk/adapter/base.py +94 -0
  10. mantisdk-0.1.0/src/mantisdk/adapter/messages.py +270 -0
  11. mantisdk-0.1.0/src/mantisdk/adapter/triplet.py +1028 -0
  12. mantisdk-0.1.0/src/mantisdk/algorithm/__init__.py +39 -0
  13. mantisdk-0.1.0/src/mantisdk/algorithm/apo/__init__.py +5 -0
  14. mantisdk-0.1.0/src/mantisdk/algorithm/apo/apo.py +889 -0
  15. mantisdk-0.1.0/src/mantisdk/algorithm/apo/prompts/apply_edit_variant01.poml +22 -0
  16. mantisdk-0.1.0/src/mantisdk/algorithm/apo/prompts/apply_edit_variant02.poml +18 -0
  17. mantisdk-0.1.0/src/mantisdk/algorithm/apo/prompts/text_gradient_variant01.poml +18 -0
  18. mantisdk-0.1.0/src/mantisdk/algorithm/apo/prompts/text_gradient_variant02.poml +16 -0
  19. mantisdk-0.1.0/src/mantisdk/algorithm/apo/prompts/text_gradient_variant03.poml +107 -0
  20. mantisdk-0.1.0/src/mantisdk/algorithm/base.py +162 -0
  21. mantisdk-0.1.0/src/mantisdk/algorithm/decorator.py +264 -0
  22. mantisdk-0.1.0/src/mantisdk/algorithm/fast.py +250 -0
  23. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/__init__.py +59 -0
  24. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/adapter.py +459 -0
  25. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/gepa.py +364 -0
  26. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/__init__.py +18 -0
  27. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/README.md +12 -0
  28. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/__init__.py +0 -0
  29. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/anymaths_adapter/README.md +341 -0
  30. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/anymaths_adapter/__init__.py +1 -0
  31. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/anymaths_adapter/anymaths_adapter.py +174 -0
  32. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/anymaths_adapter/requirements.txt +1 -0
  33. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/default_adapter/README.md +0 -0
  34. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/default_adapter/__init__.py +0 -0
  35. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/default_adapter/default_adapter.py +209 -0
  36. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/dspy_adapter/README.md +7 -0
  37. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/dspy_adapter/__init__.py +0 -0
  38. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/dspy_adapter/dspy_adapter.py +307 -0
  39. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/dspy_full_program_adapter/README.md +99 -0
  40. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/dspy_full_program_adapter/dspy_program_proposal_signature.py +137 -0
  41. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/dspy_full_program_adapter/full_program_adapter.py +266 -0
  42. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/GEPA_RAG.md +621 -0
  43. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/__init__.py +56 -0
  44. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/evaluation_metrics.py +226 -0
  45. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/generic_rag_adapter.py +496 -0
  46. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/rag_pipeline.py +238 -0
  47. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/vector_store_interface.py +212 -0
  48. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/vector_stores/__init__.py +2 -0
  49. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/vector_stores/chroma_store.py +196 -0
  50. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/vector_stores/lancedb_store.py +422 -0
  51. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/vector_stores/milvus_store.py +409 -0
  52. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/vector_stores/qdrant_store.py +368 -0
  53. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/generic_rag_adapter/vector_stores/weaviate_store.py +418 -0
  54. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/mcp_adapter/README.md +552 -0
  55. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/mcp_adapter/__init__.py +37 -0
  56. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/mcp_adapter/mcp_adapter.py +705 -0
  57. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/mcp_adapter/mcp_client.py +364 -0
  58. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/terminal_bench_adapter/README.md +9 -0
  59. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/terminal_bench_adapter/__init__.py +0 -0
  60. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/adapters/terminal_bench_adapter/terminal_bench_adapter.py +217 -0
  61. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/api.py +375 -0
  62. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/core/__init__.py +0 -0
  63. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/core/adapter.py +180 -0
  64. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/core/data_loader.py +74 -0
  65. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/core/engine.py +356 -0
  66. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/core/result.py +233 -0
  67. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/core/state.py +636 -0
  68. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/__init__.py +0 -0
  69. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/aime.py +24 -0
  70. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/anymaths-bench/eval_default.py +111 -0
  71. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/anymaths-bench/prompt-templates/instruction_prompt.txt +9 -0
  72. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/anymaths-bench/prompt-templates/optimal_prompt.txt +24 -0
  73. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/anymaths-bench/train_anymaths.py +177 -0
  74. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/dspy_full_program_evolution/arc_agi.ipynb +25705 -0
  75. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/dspy_full_program_evolution/example.ipynb +348 -0
  76. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/mcp_adapter/__init__.py +4 -0
  77. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/mcp_adapter/mcp_optimization_example.py +455 -0
  78. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/rag_adapter/RAG_GUIDE.md +613 -0
  79. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/rag_adapter/__init__.py +9 -0
  80. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/rag_adapter/rag_optimization.py +824 -0
  81. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/rag_adapter/requirements-rag.txt +29 -0
  82. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/terminal-bench/prompt-templates/instruction_prompt.txt +16 -0
  83. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/terminal-bench/prompt-templates/terminus.txt +9 -0
  84. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/examples/terminal-bench/train_terminus.py +161 -0
  85. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/gepa_utils.py +117 -0
  86. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/logging/__init__.py +0 -0
  87. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/logging/experiment_tracker.py +187 -0
  88. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/logging/logger.py +75 -0
  89. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/logging/utils.py +103 -0
  90. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/proposer/__init__.py +0 -0
  91. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/proposer/base.py +31 -0
  92. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/proposer/merge.py +357 -0
  93. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/proposer/reflective_mutation/__init__.py +0 -0
  94. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/proposer/reflective_mutation/base.py +49 -0
  95. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/proposer/reflective_mutation/reflective_mutation.py +176 -0
  96. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/py.typed +0 -0
  97. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/strategies/__init__.py +0 -0
  98. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/strategies/batch_sampler.py +77 -0
  99. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/strategies/candidate_selector.py +50 -0
  100. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/strategies/component_selector.py +36 -0
  101. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/strategies/eval_policy.py +64 -0
  102. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/strategies/instruction_proposal.py +127 -0
  103. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/utils/__init__.py +10 -0
  104. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/lib/utils/stop_condition.py +196 -0
  105. mantisdk-0.1.0/src/mantisdk/algorithm/gepa/tracing.py +105 -0
  106. mantisdk-0.1.0/src/mantisdk/algorithm/utils.py +177 -0
  107. mantisdk-0.1.0/src/mantisdk/algorithm/verl/__init__.py +5 -0
  108. mantisdk-0.1.0/src/mantisdk/algorithm/verl/interface.py +202 -0
  109. mantisdk-0.1.0/src/mantisdk/cli/__init__.py +56 -0
  110. mantisdk-0.1.0/src/mantisdk/cli/prometheus.py +115 -0
  111. mantisdk-0.1.0/src/mantisdk/cli/store.py +131 -0
  112. mantisdk-0.1.0/src/mantisdk/cli/vllm.py +29 -0
  113. mantisdk-0.1.0/src/mantisdk/client.py +408 -0
  114. mantisdk-0.1.0/src/mantisdk/config.py +348 -0
  115. mantisdk-0.1.0/src/mantisdk/emitter/__init__.py +43 -0
  116. mantisdk-0.1.0/src/mantisdk/emitter/annotation.py +370 -0
  117. mantisdk-0.1.0/src/mantisdk/emitter/exception.py +54 -0
  118. mantisdk-0.1.0/src/mantisdk/emitter/message.py +61 -0
  119. mantisdk-0.1.0/src/mantisdk/emitter/object.py +117 -0
  120. mantisdk-0.1.0/src/mantisdk/emitter/reward.py +320 -0
  121. mantisdk-0.1.0/src/mantisdk/env_var.py +156 -0
  122. mantisdk-0.1.0/src/mantisdk/execution/__init__.py +15 -0
  123. mantisdk-0.1.0/src/mantisdk/execution/base.py +64 -0
  124. mantisdk-0.1.0/src/mantisdk/execution/client_server.py +443 -0
  125. mantisdk-0.1.0/src/mantisdk/execution/events.py +69 -0
  126. mantisdk-0.1.0/src/mantisdk/execution/inter_process.py +16 -0
  127. mantisdk-0.1.0/src/mantisdk/execution/shared_memory.py +282 -0
  128. mantisdk-0.1.0/src/mantisdk/instrumentation/__init__.py +119 -0
  129. mantisdk-0.1.0/src/mantisdk/instrumentation/agentops.py +314 -0
  130. mantisdk-0.1.0/src/mantisdk/instrumentation/agentops_langchain.py +45 -0
  131. mantisdk-0.1.0/src/mantisdk/instrumentation/litellm.py +83 -0
  132. mantisdk-0.1.0/src/mantisdk/instrumentation/vllm.py +81 -0
  133. mantisdk-0.1.0/src/mantisdk/instrumentation/weave.py +500 -0
  134. mantisdk-0.1.0/src/mantisdk/litagent/__init__.py +11 -0
  135. mantisdk-0.1.0/src/mantisdk/litagent/decorator.py +536 -0
  136. mantisdk-0.1.0/src/mantisdk/litagent/litagent.py +252 -0
  137. mantisdk-0.1.0/src/mantisdk/llm_proxy.py +1890 -0
  138. mantisdk-0.1.0/src/mantisdk/logging.py +370 -0
  139. mantisdk-0.1.0/src/mantisdk/reward.py +7 -0
  140. mantisdk-0.1.0/src/mantisdk/runner/__init__.py +11 -0
  141. mantisdk-0.1.0/src/mantisdk/runner/agent.py +845 -0
  142. mantisdk-0.1.0/src/mantisdk/runner/base.py +182 -0
  143. mantisdk-0.1.0/src/mantisdk/runner/legacy.py +309 -0
  144. mantisdk-0.1.0/src/mantisdk/semconv.py +170 -0
  145. mantisdk-0.1.0/src/mantisdk/server.py +401 -0
  146. mantisdk-0.1.0/src/mantisdk/store/__init__.py +23 -0
  147. mantisdk-0.1.0/src/mantisdk/store/base.py +897 -0
  148. mantisdk-0.1.0/src/mantisdk/store/client_server.py +2092 -0
  149. mantisdk-0.1.0/src/mantisdk/store/collection/__init__.py +30 -0
  150. mantisdk-0.1.0/src/mantisdk/store/collection/base.py +587 -0
  151. mantisdk-0.1.0/src/mantisdk/store/collection/memory.py +970 -0
  152. mantisdk-0.1.0/src/mantisdk/store/collection/mongo.py +1412 -0
  153. mantisdk-0.1.0/src/mantisdk/store/collection_based.py +1823 -0
  154. mantisdk-0.1.0/src/mantisdk/store/insight.py +648 -0
  155. mantisdk-0.1.0/src/mantisdk/store/listener.py +58 -0
  156. mantisdk-0.1.0/src/mantisdk/store/memory.py +396 -0
  157. mantisdk-0.1.0/src/mantisdk/store/mongo.py +165 -0
  158. mantisdk-0.1.0/src/mantisdk/store/sqlite.py +3 -0
  159. mantisdk-0.1.0/src/mantisdk/store/threading.py +357 -0
  160. mantisdk-0.1.0/src/mantisdk/store/utils.py +142 -0
  161. mantisdk-0.1.0/src/mantisdk/tracer/__init__.py +16 -0
  162. mantisdk-0.1.0/src/mantisdk/tracer/agentops.py +242 -0
  163. mantisdk-0.1.0/src/mantisdk/tracer/base.py +287 -0
  164. mantisdk-0.1.0/src/mantisdk/tracer/dummy.py +106 -0
  165. mantisdk-0.1.0/src/mantisdk/tracer/otel.py +555 -0
  166. mantisdk-0.1.0/src/mantisdk/tracer/weave.py +677 -0
  167. mantisdk-0.1.0/src/mantisdk/trainer/__init__.py +6 -0
  168. mantisdk-0.1.0/src/mantisdk/trainer/init_utils.py +263 -0
  169. mantisdk-0.1.0/src/mantisdk/trainer/legacy.py +367 -0
  170. mantisdk-0.1.0/src/mantisdk/trainer/registry.py +12 -0
  171. mantisdk-0.1.0/src/mantisdk/trainer/trainer.py +618 -0
  172. mantisdk-0.1.0/src/mantisdk/types/__init__.py +6 -0
  173. mantisdk-0.1.0/src/mantisdk/types/core.py +553 -0
  174. mantisdk-0.1.0/src/mantisdk/types/resources.py +204 -0
  175. mantisdk-0.1.0/src/mantisdk/types/tracer.py +515 -0
  176. mantisdk-0.1.0/src/mantisdk/types/tracing.py +218 -0
  177. mantisdk-0.1.0/src/mantisdk/utils/__init__.py +1 -0
  178. mantisdk-0.1.0/src/mantisdk/utils/id.py +18 -0
  179. mantisdk-0.1.0/src/mantisdk/utils/metrics.py +1025 -0
  180. mantisdk-0.1.0/src/mantisdk/utils/otel.py +578 -0
  181. mantisdk-0.1.0/src/mantisdk/utils/otlp.py +536 -0
  182. mantisdk-0.1.0/src/mantisdk/utils/server_launcher.py +1045 -0
  183. mantisdk-0.1.0/src/mantisdk/utils/system_snapshot.py +81 -0
  184. mantisdk-0.1.0/src/mantisdk/verl/__init__.py +8 -0
  185. mantisdk-0.1.0/src/mantisdk/verl/__main__.py +6 -0
  186. mantisdk-0.1.0/src/mantisdk/verl/async_server.py +46 -0
  187. mantisdk-0.1.0/src/mantisdk/verl/config.yaml +27 -0
  188. mantisdk-0.1.0/src/mantisdk/verl/daemon.py +1154 -0
  189. mantisdk-0.1.0/src/mantisdk/verl/dataset.py +44 -0
  190. mantisdk-0.1.0/src/mantisdk/verl/entrypoint.py +248 -0
  191. mantisdk-0.1.0/src/mantisdk/verl/trainer.py +549 -0
  192. mantisdk-0.1.0/uv.lock +14081 -0
@@ -0,0 +1,94 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # Allow vendored GEPA library (hard fork)
28
+ !src/mantisdk/algorithm/gepa/lib/
29
+ !src/mantisdk/algorithm/gepa/lib/**
30
+
31
+ # PyInstaller
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Environments
58
+ .env
59
+ .venv
60
+ env/
61
+ venv/
62
+ ENV/
63
+ env.bak/
64
+ venv.bak/
65
+
66
+ # IDE
67
+ .idea/
68
+ .vscode/
69
+ *.swp
70
+ *.swo
71
+ *~
72
+
73
+ # Jupyter Notebook
74
+ .ipynb_checkpoints
75
+
76
+ # pyenv
77
+ .python-version
78
+
79
+ # mypy
80
+ .mypy_cache/
81
+ .dmypy.json
82
+ dmypy.json
83
+
84
+ # Pyright
85
+ .pyright/
86
+
87
+ # OS
88
+ .DS_Store
89
+ Thumbs.db
90
+
91
+ # Project specific
92
+ data/
93
+ logs/
94
+ *.log
mantisdk-0.1.0/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ The MIT License (MIT)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: mantisdk
3
+ Version: 0.1.0
4
+ Summary: Mantisdk - AI Agent Training and Evaluation Platform
5
+ Project-URL: Homepage, https://github.com/withmetis/mantis
6
+ Project-URL: Documentation, https://withmetis.github.io/mantis/mantisdk/
7
+ Project-URL: Repository, https://github.com/withmetis/mantis
8
+ Project-URL: Issues, https://github.com/withmetis/mantis/issues
9
+ Author-email: Metis Team <team@withmetis.ai>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: agents,ai,evaluation,llm,mantis,observability,reinforcement-learning,training
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: agentops>=0.4.13
23
+ Requires-Dist: aiohttp
24
+ Requires-Dist: aiologic
25
+ Requires-Dist: fastapi
26
+ Requires-Dist: flask
27
+ Requires-Dist: gepa>=0.0.24
28
+ Requires-Dist: gpustat
29
+ Requires-Dist: graphviz
30
+ Requires-Dist: gunicorn
31
+ Requires-Dist: litellm[proxy]>=1.74
32
+ Requires-Dist: openai
33
+ Requires-Dist: opentelemetry-api>=1.35
34
+ Requires-Dist: opentelemetry-exporter-otlp>=1.35
35
+ Requires-Dist: opentelemetry-sdk>=1.35
36
+ Requires-Dist: portpicker
37
+ Requires-Dist: psutil
38
+ Requires-Dist: pydantic>=2.11
39
+ Requires-Dist: rich
40
+ Requires-Dist: setproctitle
41
+ Requires-Dist: uvicorn
42
+ Requires-Dist: uvicorn-worker
43
+ Provides-Extra: apo
44
+ Requires-Dist: poml; extra == 'apo'
45
+ Provides-Extra: mongo
46
+ Requires-Dist: pymongo; extra == 'mongo'
47
+ Provides-Extra: verl
48
+ Requires-Dist: verl>=0.5.0; extra == 'verl'
49
+ Requires-Dist: vllm>=0.8.4; extra == 'verl'
50
+ Provides-Extra: weave
51
+ Requires-Dist: weave>=0.52.22; extra == 'weave'
52
+ Description-Content-Type: text/markdown
53
+
54
+ # Mantisdk
55
+
56
+ [![PyPI version](https://badge.fury.io/py/mantisdk.svg)](https://badge.fury.io/py/mantisdk)
57
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
58
+
59
+ **AI Agent Training and Evaluation Platform**
60
+
61
+ Mantisdk is a comprehensive toolkit for training and evaluating AI agents using reinforcement learning, automatic prompt optimization, and supervised fine-tuning.
62
+
63
+ ## Core Features
64
+
65
+ - Turn your agent into an optimizable beast with **minimal code changes**
66
+ - Build with **any** agent framework (LangChain, OpenAI Agent SDK, AutoGen, CrewAI, and more)
67
+ - **Selectively** optimize one or more agents in a multi-agent system
68
+ - Embraces **algorithms** like Reinforcement Learning, Automatic Prompt Optimization, Supervised Fine-tuning and more
69
+
70
+ ## Installation
71
+
72
+ ```bash
73
+ pip install mantisdk
74
+ ```
75
+
76
+ For optional dependencies:
77
+
78
+ ```bash
79
+ # For APO (Automatic Prompt Optimization)
80
+ pip install mantisdk[apo]
81
+
82
+ # For VERL integration
83
+ pip install mantisdk[verl]
84
+
85
+ # For Weave integration
86
+ pip install mantisdk[weave]
87
+
88
+ # For MongoDB store
89
+ pip install mantisdk[mongo]
90
+ ```
91
+
92
+ ## Quick Start
93
+
94
+ ```python
95
+ import mantisdk as msk
96
+
97
+ # Initialize the client
98
+ client = msk.MantisdkClient()
99
+
100
+ # Your agent code here...
101
+ ```
102
+
103
+ ## CLI Usage
104
+
105
+ ```bash
106
+ # Start the Mantisdk server
107
+ msk store serve
108
+
109
+ # Run with vLLM
110
+ msk vllm start
111
+ ```
112
+
113
+ ## Documentation
114
+
115
+ For full documentation, visit [https://withmetis.github.io/mantis/mantisdk/](https://withmetis.github.io/mantis/mantisdk/)
116
+
117
+ ## License
118
+
119
+ MIT License - see [LICENSE](LICENSE) for details.
@@ -0,0 +1,95 @@
1
+ # Publishing Mantisdk to PyPI
2
+
3
+ This document describes how to set up and publish the Mantisdk package to PyPI.
4
+
5
+ Mantisdk is part of the Mantis monorepo and is published from `mantisdk/sdk/`.
6
+
7
+ ## Prerequisites
8
+
9
+ 1. A PyPI account (https://pypi.org/account/register/)
10
+ 2. A TestPyPI account (https://test.pypi.org/account/register/)
11
+ 3. The package built and ready to publish
12
+
13
+ ## Setting Up Trusted Publishing (Recommended)
14
+
15
+ Trusted publishing uses OpenID Connect (OIDC) to authenticate with PyPI without needing API tokens.
16
+
17
+ ### Step 1: Reserve the Package Name on PyPI
18
+
19
+ 1. Go to https://pypi.org/manage/account/publishing/
20
+ 2. Click "Add a new pending publisher"
21
+ 3. Fill in the details:
22
+ - **PyPI Project Name**: `mantisdk`
23
+ - **Owner**: Your GitHub organization or username (e.g., `withmetis`)
24
+ - **Repository name**: `mantis`
25
+ - **Workflow name**: `mantisdk-pypi-release.yml`
26
+ - **Environment name**: (leave blank or use `release`)
27
+ 4. Click "Add"
28
+
29
+ ### Step 2: Set Up TestPyPI (Optional but Recommended)
30
+
31
+ 1. Go to https://test.pypi.org/manage/account/publishing/
32
+ 2. Follow the same steps as above for TestPyPI (use `mantisdk-pypi-nightly.yml`)
33
+
34
+ ### Step 3: Verify GitHub Actions
35
+
36
+ The workflows are configured in the mantis repo root `.github/workflows/`:
37
+
38
+ - `mantisdk-pypi-release.yml` - Publishes to PyPI when you push a tag like `mantisdk-v0.1.0`
39
+ - `mantisdk-pypi-nightly.yml` - Publishes nightly builds to TestPyPI
40
+ - `mantisdk-test.yml` - Runs tests on changes to `mantisdk/sdk/`
41
+
42
+ ## Manual Publishing (Alternative)
43
+
44
+ If you need to publish manually:
45
+
46
+ ```bash
47
+ # Install build tools
48
+ pip install build twine
49
+
50
+ # Build the package
51
+ python -m build
52
+
53
+ # Upload to TestPyPI first
54
+ python -m twine upload --repository testpypi dist/*
55
+
56
+ # Test installation from TestPyPI
57
+ pip install --index-url https://test.pypi.org/simple/ \
58
+ --extra-index-url https://pypi.org/simple/ mantisdk
59
+
60
+ # Upload to PyPI
61
+ python -m twine upload dist/*
62
+ ```
63
+
64
+ ## Releasing a New Version
65
+
66
+ 1. Update the version in `mantisdk/sdk/pyproject.toml` and `mantisdk/sdk/src/mantisdk/__init__.py`
67
+ 2. Commit the changes
68
+ 3. Create and push a version tag (note the `mantisdk-` prefix):
69
+ ```bash
70
+ git tag mantisdk-v0.1.0
71
+ git push origin mantisdk-v0.1.0
72
+ ```
73
+ 4. GitHub Actions will automatically build and publish to PyPI
74
+
75
+ ## Version Numbering
76
+
77
+ We follow semantic versioning (SemVer):
78
+
79
+ - **MAJOR.MINOR.PATCH** (e.g., `0.1.0`)
80
+ - Increment MAJOR for breaking changes
81
+ - Increment MINOR for new features
82
+ - Increment PATCH for bug fixes
83
+
84
+ ## Troubleshooting
85
+
86
+ ### "Project not found" error
87
+
88
+ Make sure you've set up the pending publisher on PyPI before pushing the first release tag.
89
+
90
+ ### "Authentication failed" error
91
+
92
+ Verify that:
93
+ 1. The workflow file name matches what you configured on PyPI
94
+ 2. The repository owner/name matches
95
+ 3. The `id-token: write` permission is set in the workflow
@@ -0,0 +1,66 @@
1
+ # Mantisdk
2
+
3
+ [![PyPI version](https://badge.fury.io/py/mantisdk.svg)](https://badge.fury.io/py/mantisdk)
4
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
+
6
+ **AI Agent Training and Evaluation Platform**
7
+
8
+ Mantisdk is a comprehensive toolkit for training and evaluating AI agents using reinforcement learning, automatic prompt optimization, and supervised fine-tuning.
9
+
10
+ ## Core Features
11
+
12
+ - Turn your agent into an optimizable beast with **minimal code changes**
13
+ - Build with **any** agent framework (LangChain, OpenAI Agent SDK, AutoGen, CrewAI, and more)
14
+ - **Selectively** optimize one or more agents in a multi-agent system
15
+ - Embraces **algorithms** like Reinforcement Learning, Automatic Prompt Optimization, Supervised Fine-tuning and more
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install mantisdk
21
+ ```
22
+
23
+ For optional dependencies:
24
+
25
+ ```bash
26
+ # For APO (Automatic Prompt Optimization)
27
+ pip install mantisdk[apo]
28
+
29
+ # For VERL integration
30
+ pip install mantisdk[verl]
31
+
32
+ # For Weave integration
33
+ pip install mantisdk[weave]
34
+
35
+ # For MongoDB store
36
+ pip install mantisdk[mongo]
37
+ ```
38
+
39
+ ## Quick Start
40
+
41
+ ```python
42
+ import mantisdk as msk
43
+
44
+ # Initialize the client
45
+ client = msk.MantisdkClient()
46
+
47
+ # Your agent code here...
48
+ ```
49
+
50
+ ## CLI Usage
51
+
52
+ ```bash
53
+ # Start the Mantisdk server
54
+ msk store serve
55
+
56
+ # Run with vLLM
57
+ msk vllm start
58
+ ```
59
+
60
+ ## Documentation
61
+
62
+ For full documentation, visit [https://withmetis.github.io/mantis/mantisdk/](https://withmetis.github.io/mantis/mantisdk/)
63
+
64
+ ## License
65
+
66
+ MIT License - see [LICENSE](LICENSE) for details.