What Should the New "OpenAdapt" Package Be?

January 17, 2026 · View on GitHub

A comprehensive analysis of package architecture options for the OpenAdapt ecosystem.

Date: January 2026 Status: Architecture Proposal


Executive Summary

After reviewing how major ML/automation ecosystems structure their packages and analyzing our current codebase, I recommend Option B+: Thin CLI Wrapper with Progressive Enhancement. This provides a unified entry point (pip install openadapt) without requiring a complex full application upfront, while maintaining a clear path to evolve into a full product.


1. Literature Review: How Other Ecosystems Do It

1.1 HuggingFace Ecosystem

Structure: Hub-and-spoke model with a central "transformers" package

PackageRoleInstallation
transformersCore - model definitions, unified APIpip install transformers
datasetsData loading and processingpip install datasets
accelerateDistributed training utilitiespip install accelerate
evaluateMetrics and evaluationpip install evaluate
tokenizersFast tokenization (Rust)pip install tokenizers
diffusersImage/video generationpip install diffusers
peftParameter-efficient fine-tuningpip install peft
trlReinforcement learning for LLMspip install trl

Key Insights (from Transformers v5):

  • transformers is the pivot that all other tools build around
  • 3M+ daily pip installs in 2025 (up from 20k in v4)
  • Unified abstractions: PreTrainedModel, PreTrainedConfig, PreTrainedTokenizerBase
  • "Model-definition framework" - it defines, others use
  • Strong interoperability: Axolotl, Unsloth, DeepSpeed, vLLM, etc. all leverage transformers

Lesson: A single "core" package that defines the fundamental abstractions works well when it's clear what the core abstraction is.

1.2 LangChain Ecosystem

Structure: Core/Community/Integration split

PackageRoleInstallation
langchain-coreBase interfaces and abstractionsRequired dependency
langchainChains, agents, retrieval strategiespip install langchain
langchain-communityThird-party integrationspip install langchain-community
langchain-openaiOpenAI providerpip install langchain-openai
langchain-anthropicAnthropic providerpip install langchain-anthropic
langgraphStateful multi-actor appspip install langgraph
langsmithObservability/tracingpip install langsmith

Key Insights (from LangChain Architecture):

  • Started monolithic, refactored into modular packages
  • langchain-core holds stable abstractions with backward-compat guarantees
  • Provider packages are versioned separately (critical for API changes)
  • langchain (main) depends on langchain-core but NOT provider packages

Lesson: Separate stable core abstractions from volatile integrations. Provider packages should be opt-in.

1.3 PyTorch Ecosystem

Structure: Domain-specific libraries around a single core

PackageRoleInstallation
torchCore - tensor ops, autograd, trainingpip install torch
torchvisionComputer vision models/transformspip install torchvision
torchaudioAudio processingpip install torchaudio
torchtextNLP utilitiespip install torchtext
torchserveModel servingSeparate install

Key Insights (from PyTorch Ecosystem):

  • torch is the undisputed core - everything depends on it
  • Domain libraries (vision, audio) follow same philosophy but are independent
  • Version coupling is explicit: torchaudio 2.9 requires torch 2.9
  • Recently: torchaudio moved to "maintenance phase" to reduce redundancy

Lesson: Domain libraries should be tightly version-coupled to core. Pruning redundant packages is healthy.

1.4 Agent Frameworks (AutoGPT, AgentGPT)

Structure: Platform-centric with toolkit separation

ComponentRole
autogpt_platformFull platform (server, marketplace, GUI)
AutoGPT ClassicOriginal standalone agent
ForgeToolkit for building custom agents
agbenchmarkEvaluation framework

Key Insights (from AutoGPT Docs):

  • Evolved from single agent to full platform
  • Forge = reusable components, Platform = complete product
  • Different licenses: Platform (Polyform Shield), Rest (MIT)
  • Memory architecture: short-term (queue) + long-term (vector DB)

Lesson: Separation between toolkit (for developers) and platform (for end users) allows different licenses and evolution speeds.

1.5 ComfyUI / Stable Diffusion

Structure: Node-based plugin architecture

ComponentRole
ComfyUICore graph/node execution engine
custom_nodes/Plugin directory (community extensions)
ComfyUI ManagerPackage manager for extensions
workflows/Shareable DAG definitions

Key Insights (from ComfyUI Docs):

  • Everything is a node - maximum composability
  • Lazy DAG evaluation - only run what changed
  • Smart memory management (works with 1GB VRAM)
  • Extensions via custom_nodes/ directory - no core changes needed
  • Workflows are JSON - shareable, versionable

Lesson: Node/plugin architecture enables massive community contribution without touching core. Clear extension points matter.


2. Analysis of Our Current Ecosystem

2.1 Package Inventory

PackagePurposeKey ExportsCLI Entry
openadapt-mlML engine, training, models, runtimeAgentPolicy, QwenVLAdapter, train_with_trlpython -m openadapt_ml.scripts.train
openadapt-captureScreen recording, eventsCaptureSession, event streamscapture command
openadapt-groundingUI element localizationOmniParser, UITarsGrounderDeploy commands
openadapt-evalsBenchmark evaluationApiAgent, WAAAdapter, evaluate_agent_on_benchmarkopenadapt-evals command
openadapt-viewerHTML viewer generationPageBuilder, screenshot_display, componentsopenadapt-viewer command
openadapt-retrievalDemo retrievalMultimodalDemoRetriever, Qwen3VLEmbedderopenadapt-retrieval command

2.2 Dependency Graph

                    +-----------------+
                    |  openadapt-ml   |  (THE CORE)
                    |    (v0.2.0)     |
                    +--------+--------+
                             |
              +--------------+---------------+
              |              |               |
              v              v               v
    +----------------+ +-----------+ +----------------+
    |openadapt-capture| |openadapt-| |openadapt-evals |
    |    (v0.1.0)    | |grounding  | |   (v0.1.0)     |
    +----------------+ |(v0.1.0)   | +----------------+
                       +-----------+

                +-------------------+
                | openadapt-viewer  |  (UI components)
                |     (v0.1.0)      |
                +-------------------+

                +-------------------+
                |openadapt-retrieval|  (Demo search)
                |     (v0.1.0)      |
                +-------------------+

Current dependency from pyproject.toml:

  • openadapt-ml depends on openadapt-capture>=0.1.0
  • openadapt-evals is standalone (can use openadapt-ml optionally)
  • Other packages are standalone

2.3 What Each Package Actually Does

openadapt-ml (THE CORE)

Primary responsibility: Model-agnostic, domain-agnostic ML engine for GUI automation

Key modules:

openadapt_ml/
├── schema/           # Episode, Step, Action, Observation
├── models/           # QwenVLAdapter, APIAdapter, DummyAdapter
├── training/         # TRL trainer, dashboard generation
├── runtime/          # AgentPolicy, SafetyGate
├── ingest/           # Capture converter, synthetic data
├── datasets/         # Next-action SFT samples
├── benchmarks/       # WAA integration, VM management (shared with evals)
├── retrieval/        # Demo retriever (shared with retrieval package)
├── cloud/            # Lambda Labs, Azure, local serving
└── export/           # Parquet export

CLI entry points:

  • python -m openadapt_ml.scripts.train - Train models
  • python -m openadapt_ml.scripts.compare - Compare predictions
  • python -m openadapt_ml.benchmarks.cli vm monitor - VM management
  • python -m openadapt_ml.cloud.local serve - Serve dashboard

openadapt-capture

Primary responsibility: Platform-agnostic event capture with time-aligned media

Key features:

  • Keyboard/mouse events via pynput
  • Screen recording via av/mss
  • Audio capture via sounddevice
  • Whisper transcription
  • Privacy scrubbing (optional)

CLI: capture command

openadapt-grounding

Primary responsibility: Robust UI element localization

Key features:

  • OmniParser integration
  • UI-TARS VLM grounding
  • VLM provider adapters (Claude, GPT, Gemini)
  • AWS deployment automation

CLI: python -m openadapt_grounding.deploy

openadapt-evals

Primary responsibility: Benchmark evaluation infrastructure

Key features:

  • ApiAgent with P0 demo persistence fix
  • WAAAdapter, WAALiveAdapter, WAAMockAdapter
  • evaluate_agent_on_benchmark() runner
  • Azure parallel evaluation

CLI: openadapt-evals mock, openadapt-evals live

openadapt-viewer

Primary responsibility: Reusable HTML visualization components

Key features:

  • Screenshot displays with overlays
  • Playback controls
  • Metrics grids
  • PageBuilder for composing views

CLI: openadapt-viewer demo

openadapt-retrieval

Primary responsibility: Multimodal demo retrieval

Key features:

  • Qwen3-VL embeddings
  • CLIP fallback
  • FAISS vector index
  • MultimodalDemoRetriever

CLI: openadapt-retrieval embed, search, index

2.4 What's Missing for a Complete Product?

GapDescriptionWhich Package?
Unified CLINo single openadapt command that ties it all togetherNEW package
GUI for recordingEnd users need a GUI, not just CLINEW or openadapt-capture
Example workflowsNo end-to-end examples showing packages working togetherNEW package
Documentation hubDocs scattered across reposNEW package
Agent orchestrationNo loop that runs capture -> train -> deploy -> evalopenadapt-ml or NEW
Model registryNo central place to publish/share trained modelsNEW or external (HF Hub)

3. Options with Detailed Pros/Cons

Option A: openadapt = Examples/Docs Only

Description: The openadapt repo contains only examples, tutorials, and documentation. No code.

openadapt/
├── README.md
├── docs/
│   ├── getting-started.md
│   ├── architecture.md
│   └── tutorials/
├── examples/
│   ├── basic_capture_train_eval/
│   ├── demo_retrieval_augmented/
│   └── custom_grounding/
└── mkdocs.yml

User experience:

# No pip install openadapt
# Just visit docs site or clone repo for examples
ProsCons
Zero maintenance burdenNot pip-installable
Clear that openadapt-ml is the coreFragmented experience
No version conflictsNo unified CLI
SimpleConfusing for newcomers

Verdict: Too minimal. Users expect pip install openadapt to work.


Option B: openadapt = Thin CLI Wrapper

Description: pip install openadapt installs all packages as dependencies and provides a unified CLI.

openadapt/
├── pyproject.toml  # depends on all openadapt-* packages
├── src/openadapt/
│   ├── __init__.py  # re-exports common items
│   └── cli.py       # unified CLI
└── README.md

pyproject.toml:

[project]
name = "openadapt"
version = "0.1.0"
description = "GUI automation with ML"

dependencies = [
    "openadapt-ml>=0.2.0",
    "openadapt-capture>=0.1.0",
    "openadapt-evals>=0.1.0",
    "openadapt-viewer>=0.1.0",
]

[project.optional-dependencies]
grounding = ["openadapt-grounding>=0.1.0"]
retrieval = ["openadapt-retrieval>=0.1.0"]
all = ["openadapt[grounding,retrieval]"]

[project.scripts]
openadapt = "openadapt.cli:main"

User experience:

pip install openadapt

# Unified CLI
openadapt capture --name my-task
openadapt train --capture my-task
openadapt eval --checkpoint model.pt --benchmark waa
openadapt serve --port 8080
ProsCons
Single pip installAnother package to maintain
Unified CLIVersion coordination needed
Easy for newcomersHeavy install (all deps)
Clear entry pointMay pull unused packages

Verdict: Good balance. This is the LangChain approach.


Option C: openadapt = Full Application

Description: Full GUI application with bundled everything. Like the legacy openadapt.

openadapt/
├── pyproject.toml
├── src/openadapt/
│   ├── __init__.py
│   ├── cli.py
│   ├── app/           # GUI application
│   │   ├── main.py
│   │   ├── windows/
│   │   └── dialogs/
│   ├── orchestrator/  # Agent loop
│   └── server/        # Web dashboard
└── README.md

User experience:

pip install openadapt

# GUI app
openadapt app  # Opens GUI

# Or headless
openadapt capture
openadapt train
ProsCons
Complete productLots of work
Best for end usersPremature optimization
Single installHard to maintain
Clear visionDelays shipping

Verdict: This is the goal, but premature now. Build towards it.


Option D: No "openadapt" Package

Description: Users install individual packages. openadapt-ml is the "main" one.

# Users install what they need
pip install openadapt-ml
pip install openadapt-capture
pip install openadapt-evals
ProsCons
SimplestConfusing for newcomers
No coordination neededNo unified entry point
Minimal overheadHave to know package names
FlexibleFragmented experience

Verdict: Works for developers but bad UX for newcomers.


Description: Start with Option B but design it to evolve toward Option C.

Phase 1 (Now): Thin wrapper

openadapt/
├── pyproject.toml
├── src/openadapt/
│   ├── __init__.py      # Re-exports
│   ├── cli.py           # Unified CLI
│   └── config.py        # Shared config
└── README.md

Phase 2 (When ready): Add orchestration

openadapt/
├── src/openadapt/
│   ├── ...
│   ├── orchestrator/    # Agent loop
│   │   ├── loop.py      # Capture -> train -> deploy
│   │   └── scheduler.py
│   └── server/          # REST API
│       ├── app.py
│       └── routes.py

Phase 3 (Product launch): Add GUI

openadapt/
├── src/openadapt/
│   ├── ...
│   ├── app/             # Desktop GUI
│   │   ├── main.py
│   │   └── ...
│   └── web/             # Web interface
│       ├── frontend/
│       └── backend/

Key design principles:

  1. CLI first: Everything accessible via CLI
  2. Server optional: openadapt serve exposes REST API
  3. GUI optional: openadapt app opens GUI (when ready)
  4. Progressive disclosure: Basic use is simple, power features available

4.1 Final Recommendation: Option B+

Summary: Create a thin openadapt meta-package that:

  1. Depends on core packages (openadapt-ml, openadapt-capture, openadapt-evals, openadapt-viewer)
  2. Provides a unified CLI
  3. Re-exports common items for convenience
  4. Has optional dependencies for grounding and retrieval
  5. Is designed to grow into a full application over time

4.2 Proposed Package Structure

openadapt/
├── pyproject.toml
├── README.md
├── LICENSE (MIT)
├── CHANGELOG.md
├── src/openadapt/
│   ├── __init__.py          # Re-exports
│   ├── cli.py               # Unified CLI
│   ├── config.py            # Shared configuration
│   └── version.py           # Version info
├── docs/
│   ├── index.md
│   ├── getting-started.md
│   ├── architecture.md
│   └── tutorials/
├── examples/
│   ├── 01_basic_capture/
│   ├── 02_train_model/
│   ├── 03_evaluate/
│   └── 04_demo_retrieval/
└── tests/
    └── test_cli.py

4.3 Proposed CLI Design

# Installation
pip install openadapt              # Core packages
pip install openadapt[all]         # Everything
pip install openadapt[grounding]   # Add grounding
pip install openadapt[retrieval]   # Add retrieval

# Capture workflow
openadapt capture start --name "my-task"
openadapt capture stop
openadapt capture list
openadapt capture view my-task

# Training workflow
openadapt train --capture my-task --model qwen3vl-2b
openadapt train status
openadapt train stop

# Evaluation workflow
openadapt eval --checkpoint model.pt --benchmark waa --tasks 10
openadapt eval --agent api-claude --benchmark waa

# Serving
openadapt serve --port 8080        # Web dashboard
openadapt serve --api-only         # REST API only

# Utilities
openadapt version                  # Show all package versions
openadapt doctor                   # Check system requirements
openadapt config show              # Show configuration

4.4 Proposed __init__.py Re-exports

"""OpenAdapt - GUI automation with ML."""

# Version
from openadapt.version import __version__

# From openadapt-ml (core)
from openadapt_ml.runtime import AgentPolicy, SafetyGate
from openadapt_ml.models import QwenVLAdapter, APIAdapter
from openadapt_ml.schema import Episode, Step, Action, Observation

# From openadapt-capture
from openadapt_capture import CaptureSession

# From openadapt-evals
from openadapt_evals import (
    evaluate_agent_on_benchmark,
    ApiAgent,
    WAAAdapter,
)

# From openadapt-viewer
from openadapt_viewer import PageBuilder, generate_benchmark_html

# Optional: grounding
try:
    from openadapt_grounding import OmniParser, UITarsGrounder
except ImportError:
    pass

# Optional: retrieval
try:
    from openadapt_retrieval import MultimodalDemoRetriever
except ImportError:
    pass

__all__ = [
    "__version__",
    # Core
    "AgentPolicy",
    "SafetyGate",
    "QwenVLAdapter",
    "APIAdapter",
    "Episode",
    "Step",
    "Action",
    "Observation",
    # Capture
    "CaptureSession",
    # Evals
    "evaluate_agent_on_benchmark",
    "ApiAgent",
    "WAAAdapter",
    # Viewer
    "PageBuilder",
    "generate_benchmark_html",
]

4.5 Proposed pyproject.toml

[project]
name = "openadapt"
version = "0.1.0"
description = "GUI automation with ML - record, train, deploy, evaluate"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
authors = [
    {name = "MLDSAI Inc.", email = "richard@mldsai.com"}
]
keywords = ["gui", "automation", "ml", "rpa", "agent", "vlm"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]

dependencies = [
    "openadapt-ml>=0.2.0",
    "openadapt-capture>=0.1.0",
    "openadapt-evals>=0.1.0",
    "openadapt-viewer>=0.1.0",
]

[project.optional-dependencies]
grounding = [
    "openadapt-grounding>=0.1.0",
]
retrieval = [
    "openadapt-retrieval>=0.1.0",
]
all = [
    "openadapt[grounding,retrieval]",
]
dev = [
    "pytest>=8.0.0",
    "ruff>=0.1.0",
]

[project.scripts]
openadapt = "openadapt.cli:main"

[project.urls]
Homepage = "https://openadapt.ai"
Documentation = "https://docs.openadapt.ai"
Repository = "https://github.com/OpenAdaptAI/openadapt"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

5. Migration Path from Legacy OpenAdapt

5.1 Current State

OpenAdapt (legacy)
├── openadapt/         # Monolithic codebase
│   ├── capture/       # -> openadapt-capture
│   ├── models/        # -> openadapt-ml
│   ├── training/      # -> openadapt-ml
│   └── privacy/       # -> openadapt-privacy
└── ...

5.2 Migration Steps

  1. Archive legacy as openadapt-legacy

    # Rename repo
    gh repo rename OpenAdaptAI/OpenAdapt OpenAdaptAI/openadapt-legacy
    
    # Update README
    echo "This repo is archived. Use pip install openadapt instead." > README.md
    
  2. Create new openadapt repo

    gh repo create OpenAdaptAI/openadapt --public
    
  3. Publish packages to PyPI (in order)

    # 1. Core packages (no inter-dependencies)
    cd openadapt-capture && uvx twine upload dist/*
    cd openadapt-viewer && uvx twine upload dist/*
    cd openadapt-grounding && uvx twine upload dist/*
    cd openadapt-retrieval && uvx twine upload dist/*
    
    # 2. Depends on capture
    cd openadapt-ml && uvx twine upload dist/*
    
    # 3. Depends on nothing (but optionally uses ml)
    cd openadapt-evals && uvx twine upload dist/*
    
    # 4. Meta-package
    cd openadapt && uvx twine upload dist/*
    
  4. Update documentation

    • Create docs.openadapt.ai with unified docs
    • Add migration guide for legacy users
  5. Communication

    • Blog post announcing new architecture
    • GitHub Discussions announcement
    • Update all READMEs to point to new structure

5.3 For Legacy Users

# Old (legacy openadapt)
from openadapt.capture import capture_session
from openadapt.models import train_model

# New (modular openadapt)
from openadapt import CaptureSession  # From openadapt-capture
from openadapt_ml.training import train_with_trl  # From openadapt-ml

# Or using meta-package
from openadapt import AgentPolicy, CaptureSession

6. Timeline Considerations

6.1 What's Ready Now

PackagePyPI StatusProduction Ready?
openadapt-mlPublished (v0.2.0)Yes (core)
openadapt-capturePublished (v0.1.0)Yes
openadapt-evalsReadyYes
openadapt-viewerReadyYes
openadapt-groundingReadyBeta
openadapt-retrievalReadyBeta

6.2 MVP Timeline

Week 1-2: Foundation

  • Create openadapt repo
  • Implement thin CLI wrapper
  • Set up PyPI publishing
  • Basic documentation

Week 3-4: Polish

  • End-to-end examples
  • Integration tests
  • Unified docs site
  • Blog post / announcement

6.3 What Can Wait

FeatureWhenWhy Wait
GUI applicationAfter product-market fitNeed to validate workflows first
Agent orchestrationAfter eval framework stableNeed benchmark results first
Model registryAfter training stableNeed fine-tuned models first
Web dashboardAfter CLI validatedCLI-first approach

6.4 Is Building the Frontend Premature?

Yes, a full GUI is premature. Here's why:

  1. We don't know the workflows yet: Until we have more real users, we don't know what the ideal workflow is. CLI lets us iterate faster.

  2. Core ML isn't done: Training pipeline, evaluation, and demo retrieval are still evolving. GUI would lock us into current abstractions.

  3. Developer focus: Our current users are developers who prefer CLI/API over GUI.

What we DO need now:

  • Unified CLI for discoverability
  • Web dashboard for viewing results (openadapt-viewer handles this)
  • REST API for integration (can add to openadapt later)

7. Decision Matrix

CriteriaOption AOption BOption COption DOption B+
User onboardingPoorGoodBestPoorGood
Maintenance burdenNoneLowHighNoneLow
Developer experiencePoorGoodGoodBestGood
Newcomer experiencePoorGoodBestPoorGood
Time to shipInstant2 weeks3+ monthsInstant2 weeks
ScalabilityN/AGoodGoodN/ABest
Future GUI pathNoYesYesNoYes

Recommendation: Option B+ provides the best balance of quick shipping, good UX, and future extensibility.


8. Sources


Appendix A: Package Comparison Table

PackageHF EquivalentLangChain EquivalentPyTorch Equivalent
openadapttransformers (hub)langchain (main)torch
openadapt-mltransformerslangchain-coretorch
openadapt-capturedatasetsN/Atorchaudio
openadapt-evalsevaluateN/Atorchmetrics
openadapt-viewergradioN/Atensorboard
openadapt-groundingN/Alangchain-communitytorchvision
openadapt-retrievalfaisslangchain-communityN/A

Appendix B: Alternative Considered - Monorepo

We considered a monorepo structure (all packages in one repo) but rejected it because:

  1. Different release cadences: openadapt-ml changes faster than openadapt-capture
  2. Different dependencies: openadapt-grounding needs AWS deps, others don't
  3. Team specialization: Different contributors focus on different packages
  4. CI/CD complexity: Monorepo requires complex build matrix

The current multi-repo approach with a thin meta-package provides the flexibility we need while maintaining a unified user experience.