Thank you for your interest in contributing to Better Agents! This document provides guidelines and instructions for contributing.
-
Clone the repository
git clone https://github.com/langwatch/better-agents cd better-agents -
Install dependencies
pnpm install
-
Build the project
pnpm build
-
Run the tests
pnpm test
To add support for a new agent framework:
-
Update types (
src/types.ts):export type AgentFramework = 'agno' | 'mastra' | 'your-framework';
-
Create a framework provider (
src/providers/frameworks/your-framework/):// src/providers/frameworks/your-framework/index.ts export const YourFrameworkProvider: FrameworkProvider = { id: 'your-framework', language: 'python', // or 'typescript' displayName: 'Your Framework', async setup({ projectPath }) { // Framework-specific setup }, getMCPConfig() { return { command: 'npx', args: [...] }; // optional }, getAgentsGuidelines() { return '## Your Framework Guidelines\n...'; }, };
-
Register the provider (
src/providers/frameworks/index.ts): Add your provider to the PROVIDERS map. -
Add framework choice (
src/config-collection/choice-builders/framework-choices.ts): Add your framework to the choices builder.
To add support for a new coding assistant:
-
Update types (
src/types.ts):export type CodingAssistant = 'claude-code' | 'cursor' | 'kilocode' | 'your-assistant' | 'none';
-
Create an assistant provider (
src/providers/coding-assistants/your-assistant/):// src/providers/coding-assistants/your-assistant/index.ts export const YourAssistantProvider: CodingAssistantProvider = { id: 'your-assistant', displayName: 'Your Assistant', command: 'your-cli-command', async isAvailable() { // Check if the assistant CLI is installed return { installed: true, installCommand: 'npm install -g your-cli' }; }, async launch({ projectPath, prompt }) { // Launch the assistant with the initial prompt }, };
-
Register the provider (
src/providers/coding-assistants/index.ts): Add your provider to the PROVIDERS map. -
Add assistant choice (
src/config-collection/choice-builders/coding-assistant-choices.ts): Add your assistant to the choices builder.
Note: Editor configuration (MCP files, etc.) is handled centrally by src/builders/editor-setup-builder.ts. If your assistant needs specific files, add them there.
To add support for a new programming language:
-
Update types (
src/types.ts):export type ProgrammingLanguage = 'python' | 'typescript' | 'your-language';
-
Create a language provider (
src/providers/languages/your-language.ts):export const YourLanguageProvider: LanguageProvider = { id: 'your-language', displayName: 'Your Language', sourceDir: 'src', // or 'app' testFileExtension: '.test.yourlang', // Add language-specific configuration };
-
Register the provider (
src/providers/languages/index.ts): Add your provider to the PROVIDERS map. -
Add language choice (
src/config-collection/choice-builders/language-choices.ts): Add your language to the choices builder. -
Update project scaffolding (
src/project-scaffolding/): Add language-specific file templates and conventions.
- Use TypeScript strict mode
- Follow the existing code style
- Use
constfor functions:const functionName = () => {} - Use explicit types, avoid
any - Use
typeoverinterface - Add comments for complex logic
Before submitting a PR:
-
Build the project
pnpm build
-
Test the CLI
pnpm dev init test-project
-
Verify output Check that the generated project has the correct structure and files.
-
Fork the repository
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write clear, concise commit messages
- Keep commits focused and atomic
- Update documentation as needed
-
Test your changes
-
Submit a pull request
- Describe what your changes do
- Reference any related issues
- Include screenshots if applicable
- Open an issue for bugs or feature requests
- Join our Discord community
- Email us at support@langwatch.ai
Thank you for contributing! 🚀