Skip to main content

MAPLE

Model-Agnostic Platform for Laboratory Experiments

MAPLE adds LLM agent capabilities to any MADSci-powered laboratory (v0.5.x) via MCP. Two agents — an Operator for experiment execution and an Overseer for lab monitoring — connect to your lab through configurable MCP servers.

Architecture

MAPLE Architecture

Quick Start

pip install maple-mcp
cd your-experiment/
cp .env.example .env          # Configure MADSci URLs + model provider
maple serve stub              # Start demo (no LLM needed)
maple chat operator           # Open TUI — type anything
maple down                    # Stop all services

For a real LLM experiment:

maple serve operator          # Start with your configured model
maple chat operator           # Run — auto-sends your experiment brief (see below)
maple chat operator --resume  # Pick up where you left off
maple chat operator --test    # Collaborative session — drive the robot turn-by-turn

maple chat operator auto-sends the experiment: block from your maple.config.yaml as the opening brief, so the agent starts running as soon as the TUI opens (only on a fresh session, and only if an objective is set). Use --test for an interactive session instead: the agent starts one experiment, then waits and executes tasks you type ("home the DOFBOT", "what are its constraints?") until you tell it to stop — useful for connectivity checks and exploring a new robot.

See examples/block_sorting/ for a complete walkthrough.

Installation

pip install maple-mcp

Requires Python 3.10+ and a running MADSci lab (v0.5.x).

CLI

maple serve {all, operator, overseer, stub, mock} [--dev]
maple chat {operator, overseer} [--resume] [--test]
maple down
maple status
maple logs

--test (operator only): collaborative mode — interactive, turn-by-turn control instead of an autonomous run.

Configuration

One maple.config.yaml per experiment:

experiment:
  name: My Experiment
  objective: Sort samples by type
  constraints:
    - "Only handle one sample at a time"

operator:
  vision:
    views:
      workspace:
        backend: "vision:MyVision"
        capture:
          node: MyRobot
          action: capture_camera_image
        covers: [MyRobot]
    default_view: workspace
  custom_tools:
    - "my_tools:prepare_sample"
  post_action_hooks:
    - node: AnalysisNode
      action: verify_placement

Infrastructure goes in .env (IPs, API keys, model provider).

The experiment: block is the brief the Operator runs. maple chat operator serializes it and sends it as the opening message on a fresh session, so the agent begins autonomously when the TUI opens. Leave objective empty to disable auto-send and type the brief yourself. --test ignores this block and sends the built-in collaborative brief instead.

Extending MAPLE

Config keys below are dotted paths into maple.config.yaml — e.g. operator.vision.views is the views: key nested under operator: → vision:.

Extension Point Mechanism Config Key
Vision detection/verification Subclass VisionBackend (pure: frames in, results out) — (referenced by a view's backend)
Vision views (scenes + routing) Declare views mapping cameras/nodes to backends operator.vision.views
MCP tools @mcp.tool decorator operator.custom_tools / overseer.custom_tools
Agent hooks extra_hooks param on factory Programmatic
Post-action hooks YAML (no code) operator.post_action_hooks
System prompts Markdown file operator.prompt / overseer.prompt

Supported Models

Provider Environment Variable
OpenAI MODEL_PROVIDER=openai
Anthropic MODEL_PROVIDER=anthropic
Ollama (local, free) MODEL_PROVIDER=ollama

Multi-User

Each device auto-generates a unique identity token. Multiple users can run experiments simultaneously — sessions are isolated automatically.

Programmatic Usage

from maple.operator.agent import create_operator_agent

agent = create_operator_agent("my-session")
result = agent("Sort the colored blocks by color.")

Testing

pytest -m "not integration"                    # Unit tests (no network)
docker compose -f docker-compose.ci.yaml up -d # Start MADSci
pytest -m integration                          # Integration tests

Compatibility

  • Python 3.10+
  • MADSci >=0.5.0, <0.6.0
  • FastMCP 3.x

License

MIT

Release files for maple-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maple-mcp 0.1.3
File Size Uploaded
maple_mcp-0.1.3.tar.gz 125.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maple-mcp 0.1.3
File Interpreter ABI Platform
maple_mcp-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 167.4 kB

Release files / maple_mcp-0.1.3.tar.gz

Download URL maple_mcp-0.1.3.tar.gz
Size 125.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e9f7be649f95796ba8ea954d5a5faa4eab4ceb781190106bc23bb670b61b161a
BLAKE2b-256 checksum
How to use checksums
091bce32a9a7d7485b125a8f4f90a5a151f55f24ddb1aee62b8e88b05087360b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / maple_mcp-0.1.3-py3-none-any.whl

Download URL maple_mcp-0.1.3-py3-none-any.whl
Size 42.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5275c457152ec3bca491967be16772516d49dc9249011b961ae18f500188b734
BLAKE2b-256 checksum
How to use checksums
152ea813969df18412a9f0bdecd99dc68377c1fc1b82aa73ae98f117c987c412
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page