Skip to main content

Molecule AI workspace runtime — shared infrastructure for all agent adapters

Project description

molecule-ai-workspace-runtime

Shared Python runtime infrastructure for all Molecule AI agent adapters.

This package provides the core machinery that every Molecule AI workspace container needs:

  • A2A server — Registers with the platform, heartbeats, serves A2A JSON-RPC
  • Adapter interfaceBaseAdapter / AdapterConfig / SetupResult
  • Built-in tools — delegation, memory, approvals, sandbox, telemetry
  • Skill loader — loads and hot-reloads skill modules from /configs/skills/
  • Plugin system — per-workspace + shared plugin discovery and install
  • Config / preflight — YAML config loading with validation

Installation

pip install molecule-ai-workspace-runtime

Adapter Discovery

The runtime discovers adapters in two ways:

  1. ADAPTER_MODULE env var (standalone adapter repos):

    ADAPTER_MODULE=my_adapter molecule-runtime
    

    The module must export an Adapter class extending BaseAdapter.

  2. Built-in subdirectory scan (monorepo local dev): Scans molecule_runtime/adapters/ subdirectories for Adapter classes.

Writing an Adapter

from molecule_runtime.adapters.base import BaseAdapter, AdapterConfig
from a2a.server.agent_execution import AgentExecutor

class Adapter(BaseAdapter):
    @staticmethod
    def name() -> str:
        return "my-runtime"

    @staticmethod
    def display_name() -> str:
        return "My Runtime"

    @staticmethod
    def description() -> str:
        return "My custom agent runtime"

    async def setup(self, config: AdapterConfig) -> None:
        result = await self._common_setup(config)
        # Store result attributes for create_executor

    async def create_executor(self, config: AdapterConfig) -> AgentExecutor:
        # Return an AgentExecutor instance
        ...

Set ADAPTER_MODULE=my_package.adapter and run molecule-runtime.

License

BSL-1.1 — see LICENSE for details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

molecule_ai_workspace_runtime-0.1.7.tar.gz (139.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

molecule_ai_workspace_runtime-0.1.7-py3-none-any.whl (160.1 kB view details)

Uploaded Python 3

File details

Details for the file molecule_ai_workspace_runtime-0.1.7.tar.gz.

File metadata

File hashes

Hashes for molecule_ai_workspace_runtime-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f92fa3749e7cc2b73ed92d4d829b1bc2984a7f7ffc533abf083fb7d398cbfc91
MD5 eecc6a3b00b695b20f74e65ca9cbe264
BLAKE2b-256 2672cdf3fccec2a2db16e3ded810a76bc3d113ac0923b3ff5e62763c4824a3e3

See more details on using hashes here.

File details

Details for the file molecule_ai_workspace_runtime-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for molecule_ai_workspace_runtime-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1960d9a4e09aac4a6db3a2325a259552a5a92d9d41e4dcd724589b3f865e2df9
MD5 39d95e3c6f56cc399a8bfdb70ab8218b
BLAKE2b-256 0f216762f42bb76a991fe9767930e2dbeaa141daf860a06df79afbd89f3183ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page