> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs-shaunak-branch.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Understand package structure and management in the C3 AI Agentic Platform.

A package in the C3 AI Agentic Platform is a way to bundle code so other applications can use it. In a maintenance context, packages could include data models for assets and sensors, logic for condition monitoring, and dashboards for tracking equipment health.

Applications can be built from combining several packages or they can be built from a single package. The rest of this section will explain how to make the right choices for your application.

**What you need to know about packages**:

* You develop packages locally, publish them as versioned artifacts, and then other applications can import them.
* Each package needs a manifest file to identify it, and can include source code, tests, configuration, and other resources.
* Package structure in C3 AI is flexible, but there are conventions that help you organize your project by triggering built-in automations.

## Understanding packages

### Package structure

C3 AI packages use directory structure to activate platform features. Each directory serves a specific purpose, triggering different automations when files are placed in the correct locations.

A typical package includes these directories:

```bash
reliabilityMonitor/
  src/                        # Application logic
  config/                     # Environment config
  metadata/                   # Platform integration
  seed/                       # Initial data
  data/                       # Reference data
  ui/c3/meta/                 # Frontend code
  test/                       # Tests
```

Each directory enables specific platform features:

* **src/**: Core application logic with Type definitions and implementations
* **ui/c3/meta/**: Frontend components and pages
* **config/**: Environment-specific settings
* **metadata/**: Platform integration points
* **seed/**: Initial data loaded during first deployment
* **data/**: Static reference data and lookup tables
* **test/**: Automated tests that mirror your source structure

For detailed information about each directory and how to structure your files, see the [Creating a Package](/platform-architecture/package-management/creating-a-package) guide.

### Package examples

In a maintenance context, a wind farm application might use two packages:

* An Equipment Monitoring package containing turbine models, failure prediction, and alert dashboards
* A Performance Analytics package containing efficiency calculations and trend visualizations

Here's how these packages would be structured:

```mermaid
flowchart TD
    A[Wind Farm App] --> P1[Equipment Monitoring] & P2[Performance Analytics]
    
    P1 --> S1[src/]
    S1 --> A1[asset/] & SE1[sensor/] & AL1[alert/]
    A1 --> A1F["Asset.c3typ
              Asset.js"]
    SE1 --> SE1F["Sensor.c3typ
                Sensor.js"]
    AL1 --> AL1F["Alert.c3typ
               Alert.js"]
    
    P1 --> U1[ui/c3/meta/]
    U1 --> C1[components/] & PG1[pages/]
    C1 --> C1F["AssetCard.jsx
              AlertList.jsx"]
    PG1 --> PG1F["Dashboard.jsx"]
    
    P2 --> S2[src/]
    S2 --> P2A[performance/] & M2[metric/]
    P2A --> P2AF["Performance.c3typ
                Performance.js"]
    M2 --> M2F["Metric.c3typ
              Metric.js"]
    
    P2 --> U2[ui/c3/meta/]
    U2 --> C2[components/] & PG2[pages/]
    C2 --> C2F["PerformanceChart.jsx
              MetricDisplay.jsx"]
    PG2 --> PG2F["Analytics.jsx"]
    
    style A fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style P1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style P2 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style S1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style S2 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style A1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style SE1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style AL1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style P2A fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style M2 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style U1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style U2 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style C1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style C2 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style PG1 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style PG2 fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style A1F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style SE1F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style AL1F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style P2AF fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style M2F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style C1F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style C2F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style PG1F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style PG2F fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
```

The Equipment Monitoring package includes everything needed for real-time monitoring: types for representing turbines and sensors, methods for predicting failures and handling alerts, and a dashboard UI for operators.

The Performance Analytics package focuses on efficiency tracking with its own types for metrics, methods for trend analysis, and visualization components.

These feature sets can then be reused in other applications, like a Solar Farm or Battery Storage system that needs similar monitoring and analytics capabilities.

### Package lifecycle

Packages need to be created and published to be reused.
Let's follow our Wind Farm application's packages through this process:

#### Create

You start by creating packages within your application, each focused on a specific business capability. In our Wind Farm example, we have packages for monitoring equipment health and analyzing performance:

```mermaid
flowchart TD
    A[Wind Farm App] --> M[Equipment Monitoring] & P[Performance Analytics]
    
    style A fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style M fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style P fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
```

#### Publish

Once your packages are ready for sharing, you publish them as artifacts. An artifact is a versioned snapshot of your package that includes all its code, configuration, and resources. This versioning ensures other applications can depend on specific, stable versions of your packages:

```mermaid
flowchart TD
    M[Equipment Monitoring] --> |publish| MA[Monitoring Artifact]
    P[Performance Analytics] --> |publish| PA[Analytics Artifact]
    
    style M fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style P fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style MA fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style PA fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
```

#### Reuse

Published artifacts become available to other applications in your organization. For example, a Solar Farm application might need the same equipment monitoring and performance analysis capabilities. Instead of building these features from scratch, it can import the existing artifacts:

```mermaid
flowchart TD
    S[Solar Farm App] --> |import| MA[Monitoring Artifact]
    S --> |import| PA[Analytics Artifact]
    
    style S fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style MA fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
    style PA fill:#787878,stroke:#333,stroke-width:2px,color:#1a1a1a
```

This lifecycle enables you to build a library of reusable features across your organization. As you develop new applications, you can combine existing packages in different ways to quickly implement common functionality while focusing your development efforts on unique requirements.

<Tip>
  Artifacts only become available to you once they're published to the C3 AI Agentic Platform and you have the necessary permissions to import them.
</Tip>

## Next steps

Now that you understand the basic concepts of packages in the C3 AI Agentic Platform, the following pages will explain certain concepts in greater detail:

<CardGroup cols={2}>
  <Card title="Creating a Package" href="/platform-architecture/package-management/creating-a-package">
    Learn about each folder's purpose in detail, with examples of files and their contents. This guide will help you structure your package effectively.
  </Card>

  <Card title="Importing Packages" href="/platform-architecture/package-management/importing-a-package">
    Understand how to reuse components across packages, manage dependencies, and handle versioning to build modular applications.
  </Card>

  <Card title="Artifact Management" href="/platform-architecture/package-management/artifact-management">
    Follow our comprehensive guide on deploying applications, managing releases, and making your packages available across environments.
  </Card>

  <Card title="Package Tools" href="/platform-architecture/package-management/describing-package-management-tools">
    Discover the suite of tools C3 AI provides for managing package releases, automating deployments, and maintaining package dependencies.
  </Card>
</CardGroup>
