feat: add external python module deployment#2869
Draft
TomCC7 wants to merge 18 commits into
Draft
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #2869 +/- ##
==========================================
+ Coverage 72.21% 72.35% +0.13%
==========================================
Files 1001 1005 +4
Lines 89755 89915 +160
Branches 8196 8388 +192
==========================================
+ Hits 64818 65055 +237
+ Misses 22718 22646 -72
+ Partials 2219 2214 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 22 files with indirect coverage changes 🚀 New features to boost your workflow:
|
TomCC7
commented
Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
DimOS modules currently run inside the main Python environment, which makes it hard to integrate modules that need conflicting or heavyweight package dependencies while still using coordinator wiring, RPC, streams, lifecycle management, and docs-tested examples.
Solution
external-pythondeployment path with coordinator-visible declarations and runtime launch envelopes.WorkerManagerExternal, deployment planning/reference resolution, runtime entrypoint, and a temporaryplan/prepare/runlauncher.preparematerializes the external package environment beforerun.humanize, declared RPC calls, module refs, and stream roundtrip behavior.Testing
uv run ruff check dimos/core/deployment dimos/core/coordination/worker_manager_external.py examples/external-python-module/**/*.pyuv run pytest dimos/core/deployment/test_deployment.py dimos/core/coordination/test_module_coordinator.py::test_build_happy_path -qPYTHONPATH="examples/external-python-module" uv run python -c 'from dimos.core.coordination.module_coordinator import ModuleCoordinator; from dimos.core.deployment.ref import resolve_deployment_ref; from deployment import ExampleClient, ExampleExternalDeclaration; spec = resolve_deployment_ref("deployment:deployment_spec"); coordinator = ModuleCoordinator.build_deployment(spec); print(coordinator.get_instance(ExampleExternalDeclaration).greet("qa")); print(coordinator.get_instance(ExampleClient).call_external_dependency("qa")); print(coordinator.get_instance(ExampleClient).roundtrip_stream("stream-qa")); coordinator.stop()'timeout 10s env PYTHONPATH="examples/external-python-module" uv run python -m dimos.core.deployment.launcher run deployment:deployment_specuv run --with mypy mypy dimos/core/module.py dimos/core/deployment dimos/core/coordination/worker_manager_external.pyuv run doclinks --check docs/usage/modules.md docs/usage/external-python-modules.md docs/development/external_python_modules.md docs/coding-agents/index.md docs/coding-agents/external-python-modules.md examples/external-python-module/README.mdopenspec validate "external-python-module-deployment" --type change --strict --no-interactive