# Licensing Guide for MARSYS

This document provides comprehensive information about MARSYS licensing, copyright ownership, and contributor requirements.

---

## Table of Contents

1. [Overview](#overview)
2. [Apache License 2.0](#apache-license-20)
3. [Copyright Ownership](#copyright-ownership)
4. [Contributor License Agreement (CLA)](#contributor-license-agreement-cla)
5. [FAQ for Contributors](#faq-for-contributors)
6. [FAQ for Users](#faq-for-users)
7. [Future Licensing Plans](#future-licensing-plans)

---

## Overview

**MARSYS (Multi-Agent Reasoning Systems)** is open-source software licensed under the **Apache License 2.0**.

### Quick Facts

- **License**: Apache License 2.0
- **Copyright Holder**: Marsys Project (original author: rezaho)
- **Contributor Agreement**: CLA required (automatic via CLA Assistant)
- **Cost**: Free for all use cases
- **Commercial Use**: Fully permitted
- **Source Code**: Openly available on GitHub

---

## Apache License 2.0

### What is Apache 2.0?

The Apache License 2.0 is one of the most popular permissive open-source licenses. It allows you to:

✅ **Use** MARSYS for any purpose (personal, commercial, production)
✅ **Modify** the source code to fit your needs
✅ **Distribute** MARSYS and your modifications
✅ **Sublicense** your modifications (can use different license for your additions)
✅ **Include** in proprietary/closed-source projects

### Requirements

When using MARSYS, you must:

📋 **Include the License** - Include a copy of the Apache 2.0 license
📋 **Preserve Copyright Notices** - Keep existing copyright notices intact
📋 **State Modifications** - Document significant changes you make
📋 **Include NOTICE file** - If one exists (not currently applicable)

### Patent Grant

Apache 2.0 includes an explicit patent grant:
- Contributors grant you a license to any patents covering their contributions
- Protection against patent litigation
- If you sue over patents, your license terminates

### Full License Text

Read the full Apache 2.0 license: [LICENSE](../../LICENSE)

---

## Copyright Ownership

### Who Owns MARSYS?

**Copyright Holder**: Marsys Project
**Original Author**: [rezaho](https://github.com/rezaho) (reza@marsys.ai)

The copyright is held **solely** by the original author. This is clearly documented in:
- [LICENSE](../../LICENSE) - Apache 2.0 with copyright notice
- [COPYRIGHT](../../COPYRIGHT) - Explicit ownership statement
- [AUTHORS](../../AUTHORS) - Attribution with ownership clarification

### What About Contributors?

Contributors:
- ✅ **Get attribution** in the AUTHORS file
- ✅ **Retain ownership** of their original contribution
- ✅ **Can use their code** elsewhere under Apache 2.0
- ❌ **Do NOT acquire** copyright ownership of MARSYS
- ❌ **Do NOT gain** the right to relicense the project

See [COPYRIGHT](../../COPYRIGHT) for detailed information.

---

## Contributor License Agreement (CLA)

### What is a CLA?

A **Contributor License Agreement (CLA)** is a legal document that contributors sign to grant specific rights to the project maintainer.

### Why MARSYS Requires a CLA

The CLA serves several purposes:

1. **Legal Protection**: Ensures contributors have the right to contribute their code
2. **Patent Grant**: Contributors grant a patent license for their contributions
3. **Sublicensing Rights**: Allows the project to offer different licenses if needed
4. **Licensing Flexibility**: Allows dual-licensing in the future while keeping the core open-source

### What Rights Does the CLA Grant?

When you sign the CLA, you grant:

#### Copyright License
- Perpetual, worldwide, non-exclusive license
- Permission to use, modify, reproduce, distribute
- **Sublicensing rights** (critical for dual-licensing)

#### Patent License
- Perpetual, worldwide, non-exclusive patent license
- Covers patents you own that are infringed by your contribution
- Irrevocable (unless we sue you for patent infringement)

#### Assignment Rights
- Rights can be assigned to "successors and assigns"
- No additional signature required from you

### What Rights Do You Keep?

You retain:
- ✅ **Ownership** of your original contribution
- ✅ **Right to use** your code in other projects
- ✅ **Attribution** in the AUTHORS file
- ✅ **Ability to contribute** the same code to other projects

### How to Sign the CLA

**It's automatic!** No paperwork, no email exchanges.

1. Open a pull request to MARSYS
2. CLA Assistant bot comments with a link
3. Click the link and review the CLA
4. Click "I Agree"
5. Your PR is automatically unblocked

**One-time process** - covers all future contributions.

### CLA Documents

- **Full CLA Text**: [docs/CLA.md](../CLA.md)
- **Setup Guide**: [docs/CLA_SETUP_GUIDE.md](../CLA_SETUP_GUIDE.md)

---

## FAQ for Contributors

### Q: Do I lose ownership of my code?

**No.** You retain ownership of your contribution. You grant a license, not a transfer of ownership.

### Q: Can I still use my code elsewhere?

**Yes.** You can use your contribution in other projects, including commercial ones.

### Q: Why does the project need sublicensing rights?

Sublicensing rights enable:
- Future dual-licensing (free open-source + paid commercial) if needed
- Sustainable development and flexibility for the project

### Q: What if I don't want to sign the CLA?

Your contribution cannot be merged without signing the CLA. However:
- You can still fork the project
- You can use MARSYS under Apache 2.0
- You can submit bug reports and suggestions

### Q: Can the CLA be changed later?

Existing CLAs remain valid. New contributors would sign an updated CLA if changes are made.

### Q: Do I need a lawyer to review the CLA?

The CLA is based on widely-used templates (similar to Google's and Apache Foundation's). However, if you have concerns, consult with a lawyer.

### Q: What if I'm contributing on behalf of my employer?

If your employer owns the IP to your work, they need to sign a Corporate CLA. Contact reza@marsys.ai for the corporate CLA template.

---

## FAQ for Users

### Q: Can I use MARSYS commercially?

**Yes.** Apache 2.0 fully permits commercial use at no cost.

### Q: Do I need to open-source my project if I use MARSYS?

**No.** Apache 2.0 is permissive, not copyleft. You can use MARSYS in proprietary projects.

### Q: Do I need to pay for MARSYS?

**No.** MARSYS is free for all use cases.

### Q: Can I modify MARSYS?

**Yes.** You can modify MARSYS and distribute your modifications.

### Q: Do I need to include the Apache 2.0 license?

**Yes.** Include a copy of the license and preserve copyright notices.

### Q: Can I sell products built with MARSYS?

**Yes.** You can build and sell commercial products using MARSYS.

### Q: What are my obligations?

- Include the Apache 2.0 license
- Preserve copyright notices
- Document significant modifications (recommended)

---

## Future Plans

MARSYS may explore dual-licensing options in the future to support sustainable development while keeping the core framework free and open-source under Apache 2.0.

---

## Contact

For licensing questions:
- **Email**: reza@marsys.ai
- **GitHub Discussions**: [Ask questions](https://github.com/rezaho/MARSYS/discussions)
- **GitHub Issues**: [Report licensing issues](https://github.com/rezaho/MARSYS/issues)

---

## Related Documents

- [LICENSE](../../LICENSE) - Full Apache 2.0 license text
- [COPYRIGHT](../../COPYRIGHT) - Copyright ownership details
- [AUTHORS](../../AUTHORS) - Contributor attribution
- [CONTRIBUTING.md](../../CONTRIBUTING.md) - Contribution guidelines
- [CLA.md](../CLA.md) - Full Contributor License Agreement
- [CLA_SETUP_GUIDE.md](../CLA_SETUP_GUIDE.md) - CLA Assistant setup

---

**Last Updated**: January 2025
**License Version**: Apache License 2.0
**Copyright**: 2025 Marsys Project
