feat(agents): add Jupyter-backed code policy module - #3259
Open
TomCC7 wants to merge 6 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #3259 +/- ##
==========================================
+ Coverage 75.20% 75.26% +0.06%
==========================================
Files 1128 1131 +3
Lines 107954 108307 +353
Branches 9751 9771 +20
==========================================
+ Hits 81188 81521 +333
- Misses 23955 23965 +10
- Partials 2811 2821 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
TomCC7
commented
Jul 29, 2026
TomCC7
marked this pull request as ready for review
July 29, 2026 03:46
TomCC7
requested review from
Dreamsorcerer,
leshy,
mustafab0,
paul-nechifor and
spomichter
as code owners
July 29, 2026 03:46
leshy
reviewed
Jul 29, 2026
leshy
reviewed
Jul 29, 2026
Member
Author
|
cleaned up, can check again @leshy |
TomCC7
force-pushed
the
cc/feat/code-as-policy-interface
branch
from
July 30, 2026 01:00
e25829b to
06a77a2
Compare
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Member
Author
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
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.
Contribution path
Problem
DimOS agents can call predefined skills, but they cannot submit a Python program that processes native observations, branches or retries, and composes deployed RPCs as one synchronous policy rollout.
Solution
CodePolicyModuleexposing one synchronouspython_exec(code, timeout_s)MCP skill.jupyter_client+ipykernelstack instead of a custom worker protocol.Dimosapp handle and a Memory2SqliteStoreattached to the explicitly configured recorder database.Recorderbeside the xArm simulation-agent blueprint. It records the enabled joint-state and color-image streams to a stable database path without changing Memory2 or perception.ipykernelandjupyter-clientare explicit dependencies of theagentsextra and are imported lazily. The v1 interface is foreground-only, text-only, single-call-at-a-time, and intentionally not a security sandbox. Real-hardware blueprints are unchanged.How to Test
Install and run the xArm simulation:
From another terminal:
uv run dimos mcp call python_exec --json-args \ '{"code":"print(memory.list_streams()); print(app.skills.get_robot_state())"}'Focused automated validation:
The focused suite passes 19 tests. Ruff, strict mypy over the changed source files, blueprint registry generation, staged pre-commit hooks, and
git diff --checkalso pass. A live MCP smoke test verified thatpython_execcan read the latest joint state and color image from the active Recorder database and query bounded observation history. Earlier validation covered DimOS RPC calls, namespace persistence, and interrupt-first timeout recovery.AI assistance
OpenAI Codex with GPT-5 was substantially involved in design discussion, implementation, tests, documentation, and validation. The author reviewed and approved the direction interactively.
Checklist