# Versioning (/en/ai/ten-agent/reference/versioning)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

The TEN framework follows the [Semantic Versioning (SemVer)](https://semver.org/) specification for all package versions. This standardized approach helps manage dependencies and compatibility across the ecosystem.

## Package version declaration [#package-version-declaration]

Each TEN package must include a `version` field in its `manifest.json` file:

```json
{
  "version": "1.0.0"
}
```

## Package types and organization [#package-types-and-organization]

TEN packages are organized in the following directory structure:

```text
└── ten_packages/
    ├── extension/
    ├── extension_group/
    ├── protocol/
    └── system/
```

These packages are distinguished by the `type` field in their `manifest.json`:

```json
{
  "type": "system" // "extension", "extension_group", "protocol"
}
```

## Dependency management [#dependency-management]

Specify version requirements for dependencies in your package's `manifest.json`:

```json
{
  "dependencies": [
    {
      "type": "system",
      "name": "ten_runtime",
      "version": "1.0.1"
    },
    {
      "type": "system",
      "name": "ten_runtime_go",
      "version": "1.0.3"
    },
    {
      "type": "extension",
      "name": "default_http_extension_cpp",
      "version": "1.0.0"
    },
    {
      "type": "extension_group",
      "name": "default_extension_group",
      "version": "1.0.0"
    }
  ]
}
```

<CalloutContainer type="info">
  <CalloutDescription>
    If you don't specify a version requirement for a dependency, the system uses the latest available version.
  </CalloutDescription>
</CalloutContainer>

## Version requirement syntax [#version-requirement-syntax]

A version requirements string can contain multiple requirements separated by commas. Each requirement supports the following operators:

* `>`, `>=`, `=`: Specify a version range or exact version
* `~`: Specify a minimum version with limited flexibility
  * With major, minor, and patch specified: only patch-level changes are allowed
  * With only major and minor specified: only patch-level changes allowed
  * With only major specified: minor and patch-level changes allowed
* `^`: Allow SemVer-compatible updates
  * This operator is the default when no operator is specified
  * Updates are allowed as long as they don't change the leftmost non-zero number
  * Examples:
    * `^0.1.12` (same as `0.1.12`): can update to `0.1.13` but not `0.2.0`
    * `^1.0` (same as `1.0`): can update to `1.1` but not `2.0`

<CalloutContainer type="info">
  <CalloutDescription>
    A version specified as `0.0.x` is considered incompatible with any other version.
  </CalloutDescription>
</CalloutContainer>
