From 6a1b2bf1a16864623a14ccfdd203c9ecf3f2f095 Mon Sep 17 00:00:00 2001 From: Molecule AI SDK-Dev Date: Fri, 15 May 2026 10:18:29 +0000 Subject: [PATCH 1/2] fix(docs): remove stale sdk/python/ path references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The repo was restructured from sdk/python/ to top-level molecule_agent/ and molecule_plugin/. Four doc references still pointed to sdk/python/: - molecule_agent/__init__.py: sdk/python/examples/remote-agent/ → examples/remote-agent/ - molecule_agent/README.md: sdk/python/examples/remote-agent/ → examples/remote-agent/ - molecule_plugin/__init__.py: sdk/python/README.md → repo root README.md - examples/remote-agent/README.md: sdk/python/examples/remote-agent/run.py → examples/remote-agent/run.py Co-Authored-By: Claude Opus 4.7 --- examples/remote-agent/README.md | 2 +- molecule_agent/README.md | 4 ++-- molecule_agent/__init__.py | 2 +- molecule_plugin/__init__.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/remote-agent/README.md b/examples/remote-agent/README.md index fb3f671..13969a0 100644 --- a/examples/remote-agent/README.md +++ b/examples/remote-agent/README.md @@ -27,7 +27,7 @@ curl -s -X POST http://localhost:8080/workspaces//secrets \ # 3. Run the demo from any machine that can reach the platform: WORKSPACE_ID= PLATFORM_URL=http://localhost:8080 \ - python3 sdk/python/examples/remote-agent/run.py + python3 examples/remote-agent/run.py ``` You should see log lines for each of the three phases, and then diff --git a/molecule_agent/README.md b/molecule_agent/README.md index 535125b..fee4bab 100644 --- a/molecule_agent/README.md +++ b/molecule_agent/README.md @@ -60,7 +60,7 @@ print(f"loop exited: {terminal}") ``` A runnable demo with full setup walkthrough lives at -[`sdk/python/examples/remote-agent/`](../examples/remote-agent). +[`examples/remote-agent/`](https://git.moleculesai.app/Molecule-AI/molecule-sdk-python/-/tree/main/examples/remote-agent) — the runnable demo with full setup walkthrough. ## What the SDK gives you @@ -282,5 +282,5 @@ the security benefits of bearer auth until both sides upgrade. - [`molecule_plugin`](../molecule_plugin) — the *other* SDK in this package, for plugin authors. Different audience. -- [`sdk/python/examples/remote-agent/run.py`](../examples/remote-agent/run.py) +- [`examples/remote-agent/run.py`](https://git.moleculesai.app/Molecule-AI/molecule-sdk-python/-/blob/main/examples/remote-agent/run.py) — the runnable demo that proves all of the above end-to-end. diff --git a/molecule_agent/__init__.py b/molecule_agent/__init__.py index a9f4f83..7a83472 100644 --- a/molecule_agent/__init__.py +++ b/molecule_agent/__init__.py @@ -20,7 +20,7 @@ Intended usage:: env = client.pull_secrets() # decrypted secrets dict client.run_heartbeat_loop() # background heartbeat + state-poll -See ``sdk/python/examples/remote-agent/`` for a runnable demo. +See ``examples/remote-agent/`` for a runnable demo. Design notes: * **No async.** The SDK uses blocking ``requests`` so a remote agent author diff --git a/molecule_plugin/__init__.py b/molecule_plugin/__init__.py index 3601abc..1117f0d 100644 --- a/molecule_plugin/__init__.py +++ b/molecule_plugin/__init__.py @@ -26,7 +26,7 @@ Example: a minimal plugin that's installable on Claude Code and DeepAgents ├── claude_code.py # `from molecule_plugin import AgentskillsAdaptor as Adaptor` └── deepagents.py # same one-liner -Full docs + cookiecutter template: see ``sdk/python/README.md``. +Full docs + cookiecutter template: see the repo root ``README.md``. """ from __future__ import annotations -- 2.52.0 From 56e963bb87ee87c0b5c664991521822defaddc5d Mon Sep 17 00:00:00 2001 From: Molecule AI SDK-Dev Date: Fri, 15 May 2026 20:19:09 +0000 Subject: [PATCH 2/2] fix(docs): update stale docstring to reflect shipped inbound delivery paths The module docstring claimed "No inbound A2A server is bundled here yet" but A2AServer (push) and PollDelivery (poll) have been implemented and documented since Phase 30.8b/30.8c. Replaced the outdated claim with a concise description of both delivery modes and how run_agent_loop uses them. Co-Authored-By: Claude Opus 4.7 --- molecule_agent/client.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/molecule_agent/client.py b/molecule_agent/client.py index d198215..4370d56 100644 --- a/molecule_agent/client.py +++ b/molecule_agent/client.py @@ -11,10 +11,19 @@ a Phase 30 endpoint: * :py:meth:`run_heartbeat_loop` — drives heartbeat + state-poll on a timer, returns when the platform reports the workspace paused or deleted. -No inbound A2A server is bundled here yet — that requires hosting an HTTP -endpoint the platform's proxy can reach, which is network-dependent. -Use :class:`molecule_agent.a2a_server.A2AServer` to add inbound A2A support. -See that module for usage and the Phase 30.8b contract. +The client also exposes two inbound delivery paths for handling platform-initiated +A2A messages: + +* **Push mode** — :class:`molecule_agent.a2a_server.A2AServer` hosts an HTTP server + in a background thread; platform pushes inbound A2A as HTTP requests. Use when the + agent has a publicly reachable URL (cloud VM, ngrok tunnel, etc.). +* **Poll mode** — :class:`molecule_agent.inbound.PollDelivery` polls + ``GET /workspaces/:id/activity`` on a configurable interval; no public URL required. + The default when no explicit delivery is passed to :py:meth:`run_agent_loop`. + +Both feed the same :py:class:`molecule_agent.inbound.MessageHandler` callback. +Reply routing (``/notify`` for canvas users, ``/a2a`` for peer agents) is handled +automatically by :py:meth:`reply`. """ from __future__ import annotations -- 2.52.0