arkai 0.8.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 (47) hide show
  1. arkai-0.8.0/LICENSE +184 -0
  2. arkai-0.8.0/PKG-INFO +112 -0
  3. arkai-0.8.0/README.md +83 -0
  4. arkai-0.8.0/arkai/__init__.py +3 -0
  5. arkai-0.8.0/arkai/__main__.py +6 -0
  6. arkai-0.8.0/arkai/agent.py +1171 -0
  7. arkai-0.8.0/arkai/agent_claude.py +159 -0
  8. arkai-0.8.0/arkai/agent_codex.py +261 -0
  9. arkai-0.8.0/arkai/agent_crush.py +329 -0
  10. arkai-0.8.0/arkai/agent_omp.py +531 -0
  11. arkai-0.8.0/arkai/agent_opencode.py +338 -0
  12. arkai-0.8.0/arkai/agent_pi.py +925 -0
  13. arkai-0.8.0/arkai/agent_session.py +143 -0
  14. arkai-0.8.0/arkai/benchmark.py +817 -0
  15. arkai-0.8.0/arkai/cli.py +64 -0
  16. arkai-0.8.0/arkai/cloud_auth.py +496 -0
  17. arkai-0.8.0/arkai/cloud_provider.py +415 -0
  18. arkai-0.8.0/arkai/config.py +416 -0
  19. arkai-0.8.0/arkai/document_processor.py +317 -0
  20. arkai-0.8.0/arkai/inference.py +814 -0
  21. arkai-0.8.0/arkai/inference_backend.py +71 -0
  22. arkai-0.8.0/arkai/inference_llama_cpp.py +89 -0
  23. arkai-0.8.0/arkai/inference_mlx.py +71 -0
  24. arkai-0.8.0/arkai/inference_splash.py +48 -0
  25. arkai-0.8.0/arkai/inference_strata.py +117 -0
  26. arkai-0.8.0/arkai/model.py +299 -0
  27. arkai-0.8.0/arkai/model_splash.py +367 -0
  28. arkai-0.8.0/arkai/model_store.py +54 -0
  29. arkai-0.8.0/arkai/pi_vertex_anthropic.js +132 -0
  30. arkai-0.8.0/arkai/providers.py +562 -0
  31. arkai-0.8.0/arkai/rag.py +639 -0
  32. arkai-0.8.0/arkai/sandbox.py +479 -0
  33. arkai-0.8.0/arkai/splash_bridge.py +397 -0
  34. arkai-0.8.0/arkai/status.py +86 -0
  35. arkai-0.8.0/arkai/tools.py +807 -0
  36. arkai-0.8.0/arkai/utils.py +395 -0
  37. arkai-0.8.0/arkai/vectordb.py +466 -0
  38. arkai-0.8.0/arkai/wtmcp.py +675 -0
  39. arkai-0.8.0/arkai/wtmcp_supervisor.py +59 -0
  40. arkai-0.8.0/arkai.egg-info/PKG-INFO +112 -0
  41. arkai-0.8.0/arkai.egg-info/SOURCES.txt +45 -0
  42. arkai-0.8.0/arkai.egg-info/dependency_links.txt +1 -0
  43. arkai-0.8.0/arkai.egg-info/entry_points.txt +2 -0
  44. arkai-0.8.0/arkai.egg-info/requires.txt +22 -0
  45. arkai-0.8.0/arkai.egg-info/top_level.txt +1 -0
  46. arkai-0.8.0/pyproject.toml +75 -0
  47. arkai-0.8.0/setup.cfg +4 -0
arkai-0.8.0/LICENSE ADDED
@@ -0,0 +1,184 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined in Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
25
+ permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to source code, documentation source, and
29
+ configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or Object
37
+ form, made available under the License, including any additions to
38
+ that work or derivative works thereof (as defined 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, thus including
44
+ but not limited to any source code and object code modifications,
45
+ processing of the Work in its entirety, as part of a larger work.
46
+ However, works that merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof do not make the Derivative
48
+ Works a derivative work of the Work, unless the link occurs on behalf
49
+ of the Work. For the purposes of this definition, a work of
50
+ authorship, including the Work, shall not be deemed modified by
51
+ including it.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original Work and any Derivative Works thereof, that
55
+ intentionally submits, displays, performs, publishes, distributes,
56
+ or otherwise makes available to Licensor or any third party any
57
+ Source or Object form of the Work. For the purposes of this definition,
58
+ a Contribution does not include (i) Source code or Object form of the
59
+ Work that is solely for development purposes, or (ii) communications
60
+ intended for development purposes.
61
+
62
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
63
+ whom a Contribution has been received by Licensor and subsequently
64
+ incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License.
67
+
68
+ Subject to the terms and conditions of this License, each Contributor
69
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
70
+ royalty-free, irrevocable copyright license to reproduce, prepare
71
+ Derivative Works of, publicly display, publicly perform, sublicense,
72
+ and distribute the Work and such Derivative Works in Source or Object
73
+ form.
74
+
75
+ 3. Grant of Patent License.
76
+
77
+ Subject to the terms and conditions of this License, each Contributor
78
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
79
+ royalty-free, irrevocable (except as stated in this section) patent
80
+ license to make, have made, use, offer to sell, sell, import, and
81
+ otherwise transfer the Work, where such license applies only to those
82
+ patent claims licensable by such Contributor that are necessarily
83
+ infringed by their Contribution(s) alone or by combination of their
84
+ Contribution(s) with the Work to which such Contribution(s) was
85
+ submitted. If You institute patent litigation against any entity
86
+ (including a cross-claim or counterclaim in a lawsuit) for infringement
87
+ of a patent, then the patent licenses granted to this License to that
88
+ entity shall terminate as of the date such litigation is filed.
89
+
90
+ 4. Redistribution.
91
+
92
+ You may reproduce and distribute copies of the Work or Derivative
93
+ Works thereof in any medium, with or without modifications, and in
94
+ Source or Object form, provided that You meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file, then any
109
+ Derivative Works that You distribute must include a readable
110
+ copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE from the Work, provided that
122
+ such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions of this License.
131
+
132
+ 5. Submission of Contributions.
133
+
134
+ Unless You explicitly state otherwise, any Contribution intentionally
135
+ submitted for inclusion in the Work by You to Licensor shall be
136
+ under the terms and conditions of this License, without any additional
137
+ terms or conditions. Notwithstanding the above, nothing herein shall
138
+ supersede or modify the terms of any separate license agreement you
139
+ may have executed with Licensor regarding such Contribution.
140
+
141
+ 6. Trademarks.
142
+
143
+ This License does not grant permission to use the trade names, trademarks,
144
+ service marks, or product names of the Licensor, except as required for
145
+ reasonable and customary use in describing the origin of the Work and
146
+ reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty.
149
+
150
+ Unless required by applicable law or agreed to in writing, Licensor
151
+ provides the Work (and each Contributor provides its Contributions) on
152
+ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
153
+ express or implied, including, without limitation, any warranties or
154
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
155
+ A PARTICULAR PURPOSE. You are solely responsible for determining the
156
+ appropriateness of using or redistributing the Work and assume any
157
+ risks associated with Your exercise of permissions under this License.
158
+
159
+ 8. Limitation of Liability.
160
+
161
+ In no event and under no legal theory, whether in tort (including
162
+ negligence), contract, or otherwise, unless required by applicable law
163
+ (such as deliberate and grossly negligent acts) or agreed to in writing,
164
+ shall any Contributor be liable to You for damages, including any direct,
165
+ indirect, special, incidental, or consequential damages of any character
166
+ arising as a result of this License or out of the use or inability to
167
+ use the Work (including but not limited to damages for loss of goodwill,
168
+ work stoppage, computer failure or malfunction, or any and all other
169
+ commercial damages or losses), even if such Contributor has been advised
170
+ of the possibility of such damages.
171
+
172
+ 9. Accepting Warranty or Additional Liability.
173
+
174
+ While redistributing the Work or Derivative Works thereof, You may choose
175
+ to offer, and charge a fee for, acceptance of support, warranty, indemnity,
176
+ or other liability obligations and/or rights consistent with this License.
177
+ However, in accepting such obligations, You may act only on Your own behalf
178
+ and on Your sole responsibility, not on behalf of any other Contributor,
179
+ and only if You agree to indemnify, defend, and hold each Contributor
180
+ harmless for any liability incurred by, or claims asserted against, such
181
+ Contributor by reason of your accepting any such warranty or additional
182
+ liability.
183
+
184
+ END OF TERMS AND CONDITIONS
arkai-0.8.0/PKG-INFO ADDED
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: arkai
3
+ Version: 0.8.0
4
+ Summary: Local AI inference workflow management
5
+ Author: arkai contributors
6
+ License: Apache License 2.0
7
+ Requires-Python: <3.15,>=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: PyYAML>=6.0
11
+ Requires-Dist: requests>=2.28.0
12
+ Provides-Extra: rag
13
+ Requires-Dist: chromadb<2.0,>=1.0.0; extra == "rag"
14
+ Requires-Dist: pymupdf>=1.23.0; extra == "rag"
15
+ Requires-Dist: markdown>=3.4; extra == "rag"
16
+ Requires-Dist: sentence-transformers>=2.2.0; extra == "rag"
17
+ Provides-Extra: mlx
18
+ Requires-Dist: mlx-lm>=0.20.0; extra == "mlx"
19
+ Provides-Extra: keychain
20
+ Requires-Dist: keyring>=24.0.0; extra == "keychain"
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest>=7.0; extra == "dev"
23
+ Requires-Dist: behave>=1.2.6; extra == "dev"
24
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
25
+ Requires-Dist: ty>=0.0.74; extra == "dev"
26
+ Requires-Dist: coverage[toml]>=7.10; extra == "dev"
27
+ Requires-Dist: packaging; extra == "dev"
28
+ Dynamic: license-file
29
+
30
+ # arkai
31
+
32
+ Arkai is a command-line tool for running coding agents with local AI
33
+ models. It connects an agent to an inference server and can manage MCP
34
+ tools and sandboxed execution for a project. Cloud providers are also
35
+ supported when you prefer not to run inference locally.
36
+
37
+ Use Arkai when you want one command to start an agent with a selected
38
+ model and the supporting services it needs.
39
+
40
+ ## Requirements
41
+
42
+ - Python 3.10–3.14
43
+ - `git` for Git-backed model downloads; Hugging Face repositories with
44
+ large weight files may also require Git LFS.
45
+ - For local inference, an installed inference backend. The default is
46
+ `llama-server` from [llama.cpp](https://github.com/ggml-org/llama.cpp).
47
+ - An installed supported agent CLI, such as OpenCode, Crush, Claude Code,
48
+ Codex, Pi, or OMP.
49
+ - For the default sandboxed and MCP-enabled agent workflow, `arapuca` and
50
+ `wtmcp`. Both integrations can be skipped for a run, but doing so
51
+ removes sandbox protection or MCP tools respectively.
52
+
53
+ ## Install
54
+
55
+ You can install from PyPI:
56
+
57
+ ```bash
58
+ python -m pip install arkai
59
+ ```
60
+
61
+ To install from the GitHub repository:
62
+
63
+ ```bash
64
+ git clone https://github.com/LeGambiArt/arkai.git
65
+ cd arkai
66
+ python3.14 -m venv .venv
67
+ source .venv/bin/activate
68
+ python -m pip install .
69
+ ```
70
+
71
+ Optional extras are described in the [user guides](docs/guides).
72
+
73
+ ## Start using Arkai
74
+
75
+ Download a model and start an agent (this example skips MCP and
76
+ sandboxing, so use it only in a workspace you trust):
77
+
78
+ ```bash
79
+ arkai model download hf:ibm-granite/granite-4.1-8b-GGUF
80
+ arkai agent start \
81
+ --agent opencode \
82
+ --model hf:ibm-granite/granite-4.1-8b-GGUF \
83
+ --no-mcp \
84
+ --no-sandbox
85
+ ```
86
+
87
+ This requires `llama-server` and the OpenCode CLI to be installed. For
88
+ the sandboxed, MCP-enabled workflow, install `arapuca` and `wtmcp`, then
89
+ omit `--no-mcp` and `--no-sandbox`. Arkai can also start a configured
90
+ agent with `arkai agent start`; use `arkai --help` to explore commands.
91
+
92
+ To create a project configuration and validate it:
93
+
94
+ ```bash
95
+ arkai config init
96
+ # Edit .arkai.yaml, for example to set inference.model.
97
+ arkai config validate
98
+ ```
99
+
100
+ For troubleshooting, put `--debug` before the command, for example
101
+ `arkai --debug agent start`.
102
+
103
+ ## More
104
+
105
+ - [User guides](https://github.com/LeGambiArt/arkai/tree/main/docs/guides) —
106
+ configuration, models, agents, sandboxing, plugins, and RAG.
107
+ - [Design documents](https://github.com/LeGambiArt/arkai/tree/main/docs/design) —
108
+ architecture and implementation details, one feature per document.
109
+ - [Contributing](https://github.com/LeGambiArt/arkai/blob/main/CONTRIBUTING.
110
+ md)
111
+
112
+ Arkai is licensed under [Apache 2.0](https://github.com/LeGambiArt/arkai/blob/main/LICENSE).
arkai-0.8.0/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # arkai
2
+
3
+ Arkai is a command-line tool for running coding agents with local AI
4
+ models. It connects an agent to an inference server and can manage MCP
5
+ tools and sandboxed execution for a project. Cloud providers are also
6
+ supported when you prefer not to run inference locally.
7
+
8
+ Use Arkai when you want one command to start an agent with a selected
9
+ model and the supporting services it needs.
10
+
11
+ ## Requirements
12
+
13
+ - Python 3.10–3.14
14
+ - `git` for Git-backed model downloads; Hugging Face repositories with
15
+ large weight files may also require Git LFS.
16
+ - For local inference, an installed inference backend. The default is
17
+ `llama-server` from [llama.cpp](https://github.com/ggml-org/llama.cpp).
18
+ - An installed supported agent CLI, such as OpenCode, Crush, Claude Code,
19
+ Codex, Pi, or OMP.
20
+ - For the default sandboxed and MCP-enabled agent workflow, `arapuca` and
21
+ `wtmcp`. Both integrations can be skipped for a run, but doing so
22
+ removes sandbox protection or MCP tools respectively.
23
+
24
+ ## Install
25
+
26
+ You can install from PyPI:
27
+
28
+ ```bash
29
+ python -m pip install arkai
30
+ ```
31
+
32
+ To install from the GitHub repository:
33
+
34
+ ```bash
35
+ git clone https://github.com/LeGambiArt/arkai.git
36
+ cd arkai
37
+ python3.14 -m venv .venv
38
+ source .venv/bin/activate
39
+ python -m pip install .
40
+ ```
41
+
42
+ Optional extras are described in the [user guides](docs/guides).
43
+
44
+ ## Start using Arkai
45
+
46
+ Download a model and start an agent (this example skips MCP and
47
+ sandboxing, so use it only in a workspace you trust):
48
+
49
+ ```bash
50
+ arkai model download hf:ibm-granite/granite-4.1-8b-GGUF
51
+ arkai agent start \
52
+ --agent opencode \
53
+ --model hf:ibm-granite/granite-4.1-8b-GGUF \
54
+ --no-mcp \
55
+ --no-sandbox
56
+ ```
57
+
58
+ This requires `llama-server` and the OpenCode CLI to be installed. For
59
+ the sandboxed, MCP-enabled workflow, install `arapuca` and `wtmcp`, then
60
+ omit `--no-mcp` and `--no-sandbox`. Arkai can also start a configured
61
+ agent with `arkai agent start`; use `arkai --help` to explore commands.
62
+
63
+ To create a project configuration and validate it:
64
+
65
+ ```bash
66
+ arkai config init
67
+ # Edit .arkai.yaml, for example to set inference.model.
68
+ arkai config validate
69
+ ```
70
+
71
+ For troubleshooting, put `--debug` before the command, for example
72
+ `arkai --debug agent start`.
73
+
74
+ ## More
75
+
76
+ - [User guides](https://github.com/LeGambiArt/arkai/tree/main/docs/guides) —
77
+ configuration, models, agents, sandboxing, plugins, and RAG.
78
+ - [Design documents](https://github.com/LeGambiArt/arkai/tree/main/docs/design) —
79
+ architecture and implementation details, one feature per document.
80
+ - [Contributing](https://github.com/LeGambiArt/arkai/blob/main/CONTRIBUTING.
81
+ md)
82
+
83
+ Arkai is licensed under [Apache 2.0](https://github.com/LeGambiArt/arkai/blob/main/LICENSE).
@@ -0,0 +1,3 @@
1
+ """arkai: Local AI inference workflow management."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,6 @@
1
+ """Entry point for arkai package."""
2
+
3
+ from arkai.cli import main
4
+
5
+ if __name__ == "__main__":
6
+ main()