mm-agenttoolkit 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 (89) hide show
  1. mm_agenttoolkit-0.1.0/.claude/settings.local.json +44 -0
  2. mm_agenttoolkit-0.1.0/.github/dependabot.yml +16 -0
  3. mm_agenttoolkit-0.1.0/.github/workflows/ci.yaml +37 -0
  4. mm_agenttoolkit-0.1.0/.gitignore +51 -0
  5. mm_agenttoolkit-0.1.0/.pre-commit-config.yaml +16 -0
  6. mm_agenttoolkit-0.1.0/.python-version +1 -0
  7. mm_agenttoolkit-0.1.0/Agents.md +0 -0
  8. mm_agenttoolkit-0.1.0/CONTRIBUTING.md +47 -0
  9. mm_agenttoolkit-0.1.0/Claude.md +16 -0
  10. mm_agenttoolkit-0.1.0/LICENSE.md +21 -0
  11. mm_agenttoolkit-0.1.0/PKG-INFO +556 -0
  12. mm_agenttoolkit-0.1.0/README.md +545 -0
  13. mm_agenttoolkit-0.1.0/agenttoolkit/__init__.py +55 -0
  14. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/__init__.py +59 -0
  15. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/fs/__init__.py +21 -0
  16. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/fs/workspace.py +482 -0
  17. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/shell/__init__.py +30 -0
  18. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/shell/backends/__init__.py +11 -0
  19. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/shell/backends/bubblewrap.py +164 -0
  20. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/shell/backends/docker.py +355 -0
  21. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/shell/backends/subprocess.py +55 -0
  22. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/shell/policy.py +170 -0
  23. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/shell/sandbox.py +222 -0
  24. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/todo/__init__.py +14 -0
  25. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/todo/errors.py +10 -0
  26. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/todo/in_memory.py +122 -0
  27. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/todo/models.py +15 -0
  28. mm_agenttoolkit-0.1.0/agenttoolkit/builtins/todo/protocol.py +34 -0
  29. mm_agenttoolkit-0.1.0/agenttoolkit/skills/__init__.py +10 -0
  30. mm_agenttoolkit-0.1.0/agenttoolkit/skills/models.py +145 -0
  31. mm_agenttoolkit-0.1.0/agenttoolkit/skills/skills.py +188 -0
  32. mm_agenttoolkit-0.1.0/agenttoolkit/tools/__init__.py +40 -0
  33. mm_agenttoolkit-0.1.0/agenttoolkit/tools/arguments.py +64 -0
  34. mm_agenttoolkit-0.1.0/agenttoolkit/tools/binding.py +68 -0
  35. mm_agenttoolkit-0.1.0/agenttoolkit/tools/context.py +51 -0
  36. mm_agenttoolkit-0.1.0/agenttoolkit/tools/middleware.py +182 -0
  37. mm_agenttoolkit-0.1.0/agenttoolkit/tools/models.py +184 -0
  38. mm_agenttoolkit-0.1.0/agenttoolkit/tools/results.py +41 -0
  39. mm_agenttoolkit-0.1.0/agenttoolkit/tools/schema.py +105 -0
  40. mm_agenttoolkit-0.1.0/agenttoolkit/tools/tools.py +216 -0
  41. mm_agenttoolkit-0.1.0/examples/approval_and_status.py +44 -0
  42. mm_agenttoolkit-0.1.0/examples/availability_gating.py +43 -0
  43. mm_agenttoolkit-0.1.0/examples/custom_middleware.py +35 -0
  44. mm_agenttoolkit-0.1.0/examples/custom_result_type.py +36 -0
  45. mm_agenttoolkit-0.1.0/examples/dependency_injection.py +29 -0
  46. mm_agenttoolkit-0.1.0/examples/dynamic_description.py +36 -0
  47. mm_agenttoolkit-0.1.0/examples/schema_export.py +34 -0
  48. mm_agenttoolkit-0.1.0/examples/skills.py +47 -0
  49. mm_agenttoolkit-0.1.0/examples/structured_tool_calls.py +42 -0
  50. mm_agenttoolkit-0.1.0/experiments/README.md +22 -0
  51. mm_agenttoolkit-0.1.0/experiments/__init__.py +1 -0
  52. mm_agenttoolkit-0.1.0/experiments/agent.py +118 -0
  53. mm_agenttoolkit-0.1.0/experiments/chat.py +135 -0
  54. mm_agenttoolkit-0.1.0/experiments/chat_with_bash_and_skills.py +72 -0
  55. mm_agenttoolkit-0.1.0/experiments/chat_with_connected_sandbox.py +97 -0
  56. mm_agenttoolkit-0.1.0/experiments/chat_with_sandbox.py +97 -0
  57. mm_agenttoolkit-0.1.0/experiments/environments/__init__.py +3 -0
  58. mm_agenttoolkit-0.1.0/experiments/environments/console.py +118 -0
  59. mm_agenttoolkit-0.1.0/experiments/model.py +23 -0
  60. mm_agenttoolkit-0.1.0/experiments/sandboxing/__init__.py +13 -0
  61. mm_agenttoolkit-0.1.0/experiments/sandboxing/connected_sandbox.Dockerfile +38 -0
  62. mm_agenttoolkit-0.1.0/experiments/sandboxing/connected_sandbox.py +70 -0
  63. mm_agenttoolkit-0.1.0/experiments/sandboxing/openhue-env +19 -0
  64. mm_agenttoolkit-0.1.0/experiments/sandboxing/workspace.py +56 -0
  65. mm_agenttoolkit-0.1.0/experiments/skills/cli-skill-creator/SKILL.md +118 -0
  66. mm_agenttoolkit-0.1.0/experiments/skills/cli-skill-creator/scripts/init_skill.py +89 -0
  67. mm_agenttoolkit-0.1.0/experiments/skills/cli-skill-creator/scripts/quick_validate.py +104 -0
  68. mm_agenttoolkit-0.1.0/experiments/skills/openhue-cli/SKILL.md +172 -0
  69. mm_agenttoolkit-0.1.0/experiments/skills/welcome-message/SKILL.md +10 -0
  70. mm_agenttoolkit-0.1.0/experiments/skills/welcome-message/references/style.md +3 -0
  71. mm_agenttoolkit-0.1.0/experiments/skills/welcome-message/scripts/render.py +4 -0
  72. mm_agenttoolkit-0.1.0/experiments/tools/__init__.py +5 -0
  73. mm_agenttoolkit-0.1.0/experiments/tools/files.py +81 -0
  74. mm_agenttoolkit-0.1.0/experiments/tools/shell.py +40 -0
  75. mm_agenttoolkit-0.1.0/experiments/tools/skills.py +37 -0
  76. mm_agenttoolkit-0.1.0/pyproject.toml +102 -0
  77. mm_agenttoolkit-0.1.0/references/hueify-cli/SKILL.md +122 -0
  78. mm_agenttoolkit-0.1.0/scripts/build_connected_sandbox.sh +10 -0
  79. mm_agenttoolkit-0.1.0/tests/test_builtin_shell.py +413 -0
  80. mm_agenttoolkit-0.1.0/tests/test_builtin_todo.py +64 -0
  81. mm_agenttoolkit-0.1.0/tests/test_builtin_workspace.py +208 -0
  82. mm_agenttoolkit-0.1.0/tests/test_connected_sandbox.py +75 -0
  83. mm_agenttoolkit-0.1.0/tests/test_experiment_file_tools.py +67 -0
  84. mm_agenttoolkit-0.1.0/tests/test_skill_edge_cases.py +206 -0
  85. mm_agenttoolkit-0.1.0/tests/test_skill_middleware.py +192 -0
  86. mm_agenttoolkit-0.1.0/tests/test_skills.py +157 -0
  87. mm_agenttoolkit-0.1.0/tests/test_tool_behaviors.py +321 -0
  88. mm_agenttoolkit-0.1.0/tests/test_tools.py +200 -0
  89. mm_agenttoolkit-0.1.0/uv.lock +653 -0
@@ -0,0 +1,44 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(.venv/Scripts/python.exe *)",
5
+ "Bash(git add *)",
6
+ "Bash(git commit *)",
7
+ "Bash(git check-ignore *)",
8
+ "Read(//c/code/agenttoolkit/**)",
9
+ "Bash(git -C /c/code/agenttoolkit status --porcelain -- '*.md' '*.MD')",
10
+ "Bash(python *)",
11
+ "Bash(uv run *)",
12
+ "Bash(uv sync *)",
13
+ "Bash(pip show *)",
14
+ "Bash(.venv/Scripts/python -c \"import openai\")",
15
+ "Bash(.venv/Scripts/python -c \"from llmify import ChatOpenAI; print\\('ok'\\)\")",
16
+ "Bash(../.venv/Scripts/python chat.py)",
17
+ "Bash(C:/code/agenttoolkit/.venv/Scripts/python -c \"import sys; print\\(sys.executable\\)\")",
18
+ "Bash(C:/code/agenttoolkit/.venv/Scripts/python -c \"import llmify; print\\(llmify.__file__\\)\")",
19
+ "Bash(C:/code/agenttoolkit/.venv/Scripts/python -m pip list)",
20
+ "Bash(C:/code/agenttoolkit/.venv/Scripts/python *)",
21
+ "Read(//c/code/agenttoolkit/examples/**)",
22
+ "Read(//c/code/agenttoolkit/agenttoolkit/**)",
23
+ "Bash(rg -n \"ActionResult\\(?!\\\\[\\)\" -P tests examples experiments agenttoolkit)",
24
+ "Bash(uv lock *)",
25
+ "Bash(git mv *)",
26
+ "Bash(mv experiments/connected_sandbox.py experiments/sandboxing/connected_sandbox.py)",
27
+ "Bash(mv experiments/connected_sandbox.Dockerfile experiments/sandboxing/connected_sandbox.Dockerfile)",
28
+ "Bash(uv add *)",
29
+ "Bash(xargs grep -liE \"grep|search\")",
30
+ "Bash(git -C C:/code/agenttoolkit status --short .import_linter_cache)",
31
+ "Bash(uv python *)",
32
+ "Bash(git stash *)",
33
+ "Bash(docker update *)",
34
+ "Read(//c/code/agenttoolkit/.venv/Lib/site-packages/llmify/**)",
35
+ "Read(//c/code/agenttoolkit/experiments/**)",
36
+ "Bash(git rm *)",
37
+ "Bash(grep -v \"^\\\\./\\\\.venv/\")",
38
+ "Bash(gh auth *)",
39
+ "Bash(gh repo *)",
40
+ "Bash(git remote *)",
41
+ "Bash(git revert *)"
42
+ ]
43
+ }
44
+ }
@@ -0,0 +1,16 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: uv
5
+ directory: /
6
+ schedule:
7
+ interval: weekly
8
+ groups:
9
+ python-dependencies:
10
+ patterns:
11
+ - "*"
12
+
13
+ - package-ecosystem: github-actions
14
+ directory: /
15
+ schedule:
16
+ interval: monthly
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python-version: ["3.13", "3.14"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v4
21
+ with:
22
+ version: "latest"
23
+
24
+ - name: Set up Python ${{ matrix.python-version }}
25
+ run: uv python install ${{ matrix.python-version }}
26
+
27
+ - name: Install dependencies
28
+ run: uv sync --locked --python ${{ matrix.python-version }}
29
+
30
+ - name: Lint
31
+ run: uv run --locked --python ${{ matrix.python-version }} ruff check .
32
+
33
+ - name: Check architecture
34
+ run: uv run --locked --python ${{ matrix.python-version }} lint-imports
35
+
36
+ - name: Test with branch coverage
37
+ run: uv run --locked --python ${{ matrix.python-version }} pytest
@@ -0,0 +1,51 @@
1
+ # Byte-compiled / optimized files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ build/
8
+ dist/
9
+ *.egg-info/
10
+ *.egg
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ env/
16
+ ENV/
17
+
18
+ # Environment variables
19
+ .env
20
+ .env.*
21
+ !.env.example
22
+
23
+ # Testing / coverage
24
+ .pytest_cache/
25
+ .coverage
26
+ .coverage.*
27
+ htmlcov/
28
+ .tox/
29
+ .nox/
30
+
31
+ # Type checkers / linters
32
+ .mypy_cache/
33
+ .ruff_cache/
34
+ .pytype/
35
+
36
+ # Jupyter
37
+ .ipynb_checkpoints/
38
+
39
+ # IDE
40
+ .vscode/
41
+ .idea/
42
+
43
+ # OS
44
+ .DS_Store
45
+ Thumbs.db
46
+
47
+ # Logs
48
+ *.log
49
+
50
+ # Import linter
51
+ .import_linter_cache/
@@ -0,0 +1,16 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-toml
9
+ - id: check-added-large-files
10
+ - id: check-merge-conflict
11
+
12
+ - repo: https://github.com/psf/black
13
+ rev: 26.1.0
14
+ hooks:
15
+ - id: black
16
+ args: [--line-length=88]
@@ -0,0 +1 @@
1
+ 3.14
File without changes
@@ -0,0 +1,47 @@
1
+ # Contributing
2
+
3
+ ## Setup
4
+
5
+ ```console
6
+ uv sync --locked
7
+ ```
8
+
9
+ This installs the locked dev environment (`pytest`, `pytest-asyncio`,
10
+ `pytest-cov`, `ruff`).
11
+
12
+ ## Before opening a PR
13
+
14
+ ```console
15
+ uv run --locked ruff check .
16
+ uv run --locked pytest
17
+ ```
18
+
19
+ `pytest` measures branch coverage for `agenttoolkit` and fails the run
20
+ below 90%; add tests alongside any new branch rather than special-casing
21
+ the coverage gate. CI runs the same two commands on Python 3.13 and 3.14 —
22
+ a change that only works on one of those versions isn't done.
23
+
24
+ ## Conventions
25
+
26
+ - Python 3.13 evaluates annotations eagerly, so any module using a
27
+ forward reference (a class referencing its own name, or a name defined
28
+ later in the file) needs `from __future__ import annotations` at the
29
+ top. This isn't needed on 3.14 (PEP 649), but the project supports both,
30
+ so add it whenever it would matter on 3.13.
31
+ - Use absolute imports (`from agenttoolkit.tools.context import
32
+ ToolContext`), not relative imports — except in `__init__.py` files,
33
+ which use relative imports to re-export their package's public API.
34
+ - Don't add comments or docstrings that just restate what the code already
35
+ says. Only write one when it explains something a reader couldn't get
36
+ from the code itself: why something exists, a hidden constraint, or a
37
+ behavior that would otherwise be surprising.
38
+ - Keep `agenttoolkit` provider-neutral and free of application-specific
39
+ tools or an agent loop — that scope belongs in consuming projects, not
40
+ here. `experiments/` holds example integrations and isn't part of the
41
+ published package.
42
+
43
+ ## Reporting issues
44
+
45
+ Open a GitHub issue with a minimal reproduction. For bugs, include the
46
+ Python version and the smallest `Tools`/`Tool` setup that reproduces the
47
+ problem.
@@ -0,0 +1,16 @@
1
+ # Conventions
2
+
3
+ - The project supports Python 3.13-3.14. Always add
4
+ `from __future__ import annotations` to modules that use forward
5
+ references (e.g. a class referencing its own name, or names defined later
6
+ in the file), since lazy annotation evaluation (PEP 649) is only native to
7
+ 3.14+ and 3.13 will raise `NameError` at import time otherwise.
8
+ - Use absolute imports (`from agenttoolkit.tools.context import ToolContext`),
9
+ not relative imports (`from .context import ToolContext`). The one
10
+ exception is `__init__.py` files, which use relative imports to re-export
11
+ their package's public API.
12
+ - No comments or docstrings that just restate what the code does (e.g. a
13
+ docstring on `ActionResult` saying "Provider-neutral outcome of one tool
14
+ invocation" — the name and fields already say that). Only write one when
15
+ it explains something non-obvious: why it exists, a hidden constraint, or
16
+ a behavior that would otherwise surprise a reader.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mathis Arends
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
7
+ deal in the Software without restriction, including without limitation the
8
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9
+ sell 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
13
+ all 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
20
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ DEALINGS IN THE SOFTWARE.