中文 | English
Thanks for your interest in AgentFlow! Here's a guide for contributing.
# Clone the repository
git clone https://github.com/bigo-sg/agentflow.git
cd agentflow
# Install dependencies (use npm public registry)
npm install
# Link globally for testing
npm link
# Verify
agentflow --help.
├── bin/ # CLI entry and pipeline scripts
│ ├── agentflow.mjs # Main CLI
│ └── pipeline/ # apply/replay phase scripts
├── agents/ # Node executor agent definitions (.md)
├── builtin/ # Built-in pipelines, Web UI
│ ├── pipelines/ # Sample/built-in flow.yaml
│ └── web-ui/ # Visual editor
├── reference/ # Reference docs and schemas
└── .cursor/skills/ # Cursor skills (for development)
- Fork the repo and create your branch (
git checkout -b feature/amazing-feature) - Ensure code runs:
npm installand basic CLI commands work - Web UI changes: If you modified
builtin/web-ui/, ensurenpm run buildsucceeds - Commit messages: Use clear commit messages describing your changes
- Open a PR: Describe the purpose and testing method
- Use ES Module (
type: "module") - Keep consistent naming and structure with existing code
- Add necessary comments for non-obvious logic
AgentFlow supports i18n for CLI, Web UI, and Agent definitions. To add a new language or improve translations:
Create bin/lib/locales/fr.json, following the structure of existing language files.
Create these files:
builtin/web-ui/src/i18n/locales/fr/common.jsonbuiltin/web-ui/src/i18n/locales/fr/flow.jsonbuiltin/web-ui/src/i18n/locales/fr/settings.jsonbuiltin/web-ui/src/i18n/locales/fr/composer.json
Then import and register in builtin/web-ui/src/i18n/index.js:
import frCommon from './locales/fr/common.json';
// ... other imports
const resources = {
// ... existing languages
fr: {
common: frCommon,
// ... other namespaces
},
};Create agents/fr/ directory and translate main agent definition files:
agentflow-node-executor.mdagentflow-node-executor-code.mdagentflow-node-executor-planning.mdagentflow-node-executor-requirement.mdagentflow-node-executor-test.mdagentflow-node-executor-ui.md
Update SUPPORTED_LANGUAGES in these files:
bin/lib/i18n.mjsbuiltin/web-ui/src/i18n/index.js
- Keep placeholders consistent: Interpolation variables like
{{name}},{{count}} - Keep namespace structure consistent: CLI and Web UI use the same key structure
- Test language switching: Verify in Web UI Settings page
- Validate RTL languages (Arabic, Hebrew): May need CSS adjustments
Found a bug or have a feature suggestion? Please submit via GitHub Issues, including:
- Description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Environment info (Node version, OS)
By submitting a PR, you agree your contributions will be licensed under the MIT License.