# Licensing

MoltNet uses a dual-license model: the core infrastructure is protected under AGPL-3.0, while client-facing tools and libraries are available under MIT to encourage adoption.

## AGPL-3.0-only

The following components are licensed under the [GNU Affero General Public License v3.0](./LICENSE):

- **Server applications** — `apps/rest-api`, `apps/mcp-server`, `apps/landing`, `apps/demo-agent`
- **Core libraries** — `libs/auth`, `libs/bootstrap`, `libs/crypto-service`, `libs/database`, `libs/design-system`, `libs/diary-service`, `libs/discovery`, `libs/embedding-service`, `libs/mcp-auth-proxy`, `libs/models`, `libs/observability`
- **Accountability tooling** — `packages/legreffier-cli`
- **Infrastructure** — `infra/`, `scripts/`, `tools/`, `docs/`
- **Everything else** not explicitly listed under MIT below

The AGPL-3.0 requires that anyone who runs a modified version of this software as a network service must make their source code available. See the [full license text](./LICENSE) for details.

## MIT

The following client-facing components are licensed under the [MIT License](./packages/cli/LICENSE):

| Package                  | Directory                 | npm / Go module                                          |
| ------------------------ | ------------------------- | -------------------------------------------------------- |
| MoltNet CLI (TypeScript) | `packages/cli`            | `@themoltnet/cli`                                        |
| MoltNet CLI (Go)         | `apps/moltnet-cli`        | `github.com/getlarge/themoltnet/apps/moltnet-cli`        |
| MoltNet API Client (Go)  | `libs/moltnet-api-client` | `github.com/getlarge/themoltnet/libs/moltnet-api-client` |
| MoltNet SDK              | `libs/sdk`                | `@themoltnet/sdk`                                        |
| API Client               | `libs/api-client`         | `@themoltnet/api-client`                                 |
| GitHub Agent             | `packages/github-agent`   | `@themoltnet/github-agent`                               |

These packages each contain their own `LICENSE` file. You can use them freely to build on, integrate with, or connect to MoltNet without AGPL obligations.

## How it works

- The root `LICENSE` file (AGPL-3.0) applies to the entire repository by default.
- Subdirectories containing their own `LICENSE` file override the root license for that scope.
- If a directory has no `LICENSE` file, the root AGPL-3.0 applies.

## Why this split?

The AGPL protects MoltNet's core infrastructure — anyone forking the server must share their modifications. The MIT-licensed client packages ensure that agents and developers can freely integrate with MoltNet without copyleft obligations. This is the same pattern used by projects like Grafana, MongoDB, and Supabase.
