Thank you for your interest in contributing to OpenAgent! This document explains how to get involved.
Please read and follow our Code of Conduct before contributing.
- Bug reports — open an issue with steps to reproduce, expected vs. actual behavior, and environment details
- Feature requests — open an issue describing the use case and proposed solution
- Code contributions — bug fixes, new features, documentation improvements
- New AI providers — integrate a new model provider in
model/ - Translations — improve or add locales under
web/src/locales/
| Tool | Version |
|---|---|
| Go | 1.23.6+ |
| Node.js | 20+ |
| Yarn | 1.x |
| MySQL | 8.0+ (or MariaDB) |
| Auth service | latest |
git clone https://github.com/the-open-agent/openagent.git
cd openagent
cp conf/app.conf.example conf/app.conf # edit DB and auth settingsKey fields in conf/app.conf:
dataSourceName = root:password@tcp(localhost:3306)/openagent
casdoorEndpoint = http://localhost:8000
casdoorClientId = <your-client-id>
casdoorClientSecret = <your-client-secret>
casdoorOrganization = built-in
casdoorApplication = app-openagent# Using Docker
docker run -d -p 8000:8000 casbin/casdoor-all-in-oneCreate an application in the auth service and copy the client ID/secret into app.conf.
# Install dependencies and run
go mod download
go run main.go
# Runs on http://localhost:14444 by defaultcd web
yarn install
yarn start # Dev server on http://localhost:3000 (proxies API to :14444)docker-compose up
# Opens on http://localhost:14444-
Fork the repository and create a branch from
master:git checkout -b feat/your-feature-name
Use a semantic prefix —
feat/,fix/,docs/,chore/, orrefactor/. -
Make your changes following the conventions below.
-
Run tests and lint before pushing:
# Backend go test -v $(go list ./...) -tags skipCi golangci-lint run # Frontend cd web && yarn lint && yarn test
-
Commit with a semantic message:
feat: add support for XYZ provider fix: resolve crash when uploading PDF docs: update deployment instructions -
Open a pull request against
masterwith a clear description of what changed and why.
- Beego MVC pattern: controllers handle HTTP,
object/contains business logic - New AI model providers go in
model/and must implement the provider interface - Routes are registered in
routers/router.go - Formatting:
gofumpt(enforced by golangci-lint) - Avoid duplicate i18n keys between frontend and backend
- UI components use Ant Design v5
- i18n strings must be added to both
web/src/locales/en/data.jsonandweb/src/locales/zh/data.json - API calls go through helper modules in
web/src/backend/ - State via React Context/Hooks — no Redux
- Create
model/<provider>.goimplementing the provider interface (seemodel/openai.gofor reference). - Register the provider in
model/provider.go. - Add the provider name to the frontend select options and i18n strings.
- Add a test in
model/<provider>_test.goif an API key can be mocked or injected via env.
- Add new keys to
web/src/locales/en/data.json(English, required). - Add the same keys to
web/src/locales/zh/data.json(Chinese). - Additional locales in
web/src/locales/are welcome — copy theen/folder structure. - Run
cd web && yarn lintto catch missing keys.
Every pull request runs the following checks automatically:
| Check | Command |
|---|---|
| Go unit tests | go test -v ./... -tags skipCi |
| Go build | go build ./... |
| golangci-lint | golangci-lint run |
| Frontend build | yarn run build |
| Frontend lint | yarn lint |
All checks must pass before a PR can be merged.
Please do not open a public issue for security vulnerabilities. Report them privately via GitHub Security Advisories.