> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datamarkin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Datamarkin Ecosystem

> Understanding how AgentUI, Mozo, and PixelFlow work together

## The Datamarkin Ecosystem

Datamarkin provides three powerful libraries that work seamlessly together to create a complete computer vision development platform. Each library serves a distinct purpose while integrating naturally with the others.

<CardGroup cols={3}>
  <Card title="AgentUI" icon="diagram-project" color="#0D9373">
    **The Builder**

    Visual workflow creation and management
  </Card>

  <Card title="Mozo" icon="server" color="#0D9373">
    **The Engine**

    Model serving and execution
  </Card>

  <Card title="PixelFlow" icon="eye" color="#0D9373">
    **The Foundation**

    Core CV primitives and visualization
  </Card>
</CardGroup>

## How They Work Together

The three libraries form a complete pipeline for computer vision development:

```mermaid theme={null}
graph LR
    A[AgentUI] -->|Workflows| B[Mozo]
    B -->|Results| C[PixelFlow]
    C -->|Annotated Output| D[Your Application]
    C -.->|Visualization Tools| A
```

### The Complete Workflow

<Steps>
  <Step title="Build in AgentUI">
    Create visual workflows by connecting tools with a drag-and-drop interface. Choose from 35+ built-in tools for detection, segmentation, tracking, annotation, and more. Export workflows as JSON for version control.
  </Step>

  <Step title="Execute on Mozo">
    Deploy your workflows on Mozo's model server. Access 35+ pre-configured models across 10 frameworks including Detectron2, YOLOv8, Florence-2, and more. Mozo handles memory management and lazy loading automatically.
  </Step>

  <Step title="Visualize with PixelFlow">
    Process results using PixelFlow's powerful annotation and analysis tools. Draw bounding boxes, add labels, track objects across frames, monitor zones, and export results.
  </Step>
</Steps>

## Library Comparison

| Feature             | AgentUI                    | Mozo                              | PixelFlow                     |
| ------------------- | -------------------------- | --------------------------------- | ----------------------------- |
| **Primary Purpose** | Visual workflow builder    | Model server                      | CV primitives & visualization |
| **Key Feature**     | Drag-and-drop interface    | 35+ pre-configured models         | 20+ annotators                |
| **Deployment**      | Web UI + Python API        | HTTP server + Python SDK          | Python library                |
| **Dependencies**    | PixelFlow, Mozo (optional) | PixelFlow (for output format)     | NumPy, OpenCV                 |
| **Best For**        | Rapid prototyping          | Production deployments            | Custom CV pipelines           |
| **Model Support**   | Via Mozo integration       | Detectron2, YOLO, Florence-2, OCR | Framework agnostic            |

## Integration Patterns

### Pattern 1: Full Stack (All Three Libraries)

Use all three libraries for a complete solution from design to deployment to visualization.

```python theme={null}
from agentui import Workflow
from mozo import ModelManager
from pixelflow import annotate

# Load workflow built in AgentUI
workflow = Workflow.load("my_workflow.json")

# Execute on Mozo's model server
results = workflow.run(image, use_mozo=True)

# Visualize with PixelFlow
annotated = annotate.box(image, results.detections)
annotate.label(annotated, results.detections)
```

### Pattern 2: AgentUI + PixelFlow (Local Execution)

Build workflows visually and run them locally without needing a model server.

```python theme={null}
from agentui import Workflow
from pixelflow import annotate

# Load and run workflow locally
workflow = Workflow.load("detection_workflow.json")
results = workflow.run(image)

# Annotate results
annotated = annotate.box(image, results.detections)
```

### Pattern 3: Mozo + PixelFlow (API-First)

Use Mozo as a model serving layer with PixelFlow for visualization.

```python theme={null}
from mozo import predict
from pixelflow import annotate, Detections

# Call Mozo's API
response = predict("detectron2", "mask_rcnn_R_50_FPN", image)

# Convert to PixelFlow format
detections = Detections.from_mozo(response)

# Visualize
annotated = annotate.mask(image, detections)
annotate.box(annotated, detections)
```

### Pattern 4: PixelFlow Standalone

Use PixelFlow independently for custom computer vision pipelines.

```python theme={null}
from pixelflow import annotate, Detections, Tracker, Zones

# Your custom detection logic
detections = your_model.predict(image)

# Use PixelFlow for tracking and analysis
tracker = Tracker()
tracked = tracker.update(detections)

# Monitor zones
zone = Zones.rectangle((100, 100), (500, 500))
in_zone = detections.filter_by_zone(zone)

# Annotate
annotated = annotate.box(image, tracked)
annotate.label(annotated, tracked)
```

## Data Flow

Understanding how data flows between the libraries:

<AccordionGroup>
  <Accordion title="AgentUI → Mozo">
    **Format:** JSON workflow definition

    AgentUI exports workflows as JSON that specify which models to use, how to connect them, and what parameters to apply. Mozo can parse these workflows and execute them using its model registry.
  </Accordion>

  <Accordion title="Mozo → PixelFlow">
    **Format:** Unified Detections object

    Mozo returns results in PixelFlow's `Detections` format, which provides a consistent interface regardless of the underlying model framework (Detectron2, YOLO, etc.).
  </Accordion>

  <Accordion title="PixelFlow → Application">
    **Format:** NumPy arrays with metadata

    PixelFlow processes and annotates images as NumPy arrays. All metadata (bounding boxes, labels, masks) is preserved in the `Detections` object for downstream use.
  </Accordion>
</AccordionGroup>

## Architectural Benefits

### Loose Coupling

Each library can be used independently. You're not forced to use all three - choose what fits your needs.

### Shared Standards

All libraries use PixelFlow's `Detections` format as a common data structure, ensuring seamless interoperability.

### Incremental Adoption

Start with one library and add others as your needs grow:

* Begin with **PixelFlow** for basic CV needs
* Add **Mozo** when you need pre-configured models
* Include **AgentUI** for visual workflow management

## Real-World Use Cases

<CardGroup cols={2}>
  <Card title="Surveillance System" icon="camera">
    **Libraries:** All three

    * Build detection + tracking workflows in AgentUI
    * Deploy on Mozo for efficient model serving
    * Use PixelFlow for zone monitoring and alerts
  </Card>

  <Card title="Document Processing" icon="file-lines">
    **Libraries:** Mozo + PixelFlow

    * Use Mozo's OCR models (PaddleOCR, EasyOCR)
    * Extract layout with PP-Structure
    * Visualize results with PixelFlow annotators
  </Card>

  <Card title="Quality Inspection" icon="magnifying-glass">
    **Libraries:** AgentUI + Mozo

    * Design inspection workflows in AgentUI
    * Run on Mozo with custom defect detection models
    * Export results for analysis
  </Card>

  <Card title="Custom CV Pipeline" icon="code">
    **Libraries:** PixelFlow standalone

    * Integrate with your existing ML models
    * Use PixelFlow's annotators and trackers
    * Build custom analysis workflows
  </Card>
</CardGroup>

## Getting Started

Choose your entry point based on your use case:

<Tabs>
  <Tab title="I want to build workflows visually">
    Start with **AgentUI**:

    ```bash theme={null}
    pip install agentui
    agentui serve
    ```

    Visit [http://localhost:8000](http://localhost:8000) to access the visual workflow builder.

    [View AgentUI Quickstart →](/agentui/quickstart)
  </Tab>

  <Tab title="I need pre-configured models">
    Start with **Mozo**:

    ```bash theme={null}
    pip install mozo
    mozo serve
    ```

    Access 35+ models via HTTP API at [http://localhost:8000](http://localhost:8000).

    [View Mozo Quickstart →](/mozo/quickstart)
  </Tab>

  <Tab title="I'm building a custom pipeline">
    Start with **PixelFlow**:

    ```bash theme={null}
    pip install pixelflow
    ```

    Use PixelFlow's annotators, trackers, and analysis tools in your Python code.

    [View PixelFlow Quickstart →](/pixelflow/quickstart)
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="Explore AgentUI" icon="diagram-project" href="/agentui/index">
    Learn about visual workflow building
  </Card>

  <Card title="Explore Mozo" icon="server" href="/mozo/index">
    Discover available models
  </Card>

  <Card title="Explore PixelFlow" icon="eye" href="/pixelflow/index">
    Master CV primitives and annotators
  </Card>

  <Card title="GitHub" icon="github" href="https://github.com/datamarkin">
    View source code and examples
  </Card>
</CardGroup>
