Docs/Project

Project

Contributing and license

Contribute to SAG and distribute changes under the MIT License.
Updated 2026-07-22Applies to SAG v1.2.2

SAG is an open-source project under the MIT License. Bug fixes, documentation, tests, connectors, and discussed product improvements are welcome.

Before you begin

  1. Read the repository CONTRIBUTING.md.
  2. Search existing issues and pull requests to avoid duplicate work.
  3. Open an issue before proposing a substantial architecture or behavior change. Explain the problem, user impact, and compatibility implications.
  4. Create a focused branch from the latest main.

Code boundaries

Contributions must preserve the core dependency rule: application code reaches zleap-sag only through apps/api/sag_api/sag/. Never make the knowledge engine depend on FastAPI, the Web UI, users, conversations, or citation models.

Add new frontend messages to both en-US and zh-CN. An API change must update its schema, OpenAPI behavior, and related documentation.

Checks before submission

bash
cd apps/api
ruff check .

cd apps/web
npm run i18n:check
npm run typecheck
npm run build

Run more focused tests for the affected area. A bug fix should include regression coverage for the original failure.

Sensitive information

Never commit real JWTs, model keys, Apple signing credentials, database passwords, or private documents to code, issues, screenshots, or logs.

Include only the minimum sanitized logs in a public issue. For a security vulnerability that has not been disclosed, do not begin with a public issue containing exploit details.

License

SAG uses the MIT License. By contributing, you agree that the project may distribute the contribution under that license.

Related projects:

Found an issue? Treat the public repository as the source of truth.View SAG source