Major Changes: - Rename repository from opencode-agents to OpenAgents - Remove all hardcoded model specifications (now model-agnostic) - Fix documentation: profile names, component counts, add Business profile - Add future plans note for other AI coding tools Repository Rename: - Update all URLs to github.com/darrenhinde/OpenAgents - Update git remote, README, install scripts, documentation - 15 files updated with new repository name Model-Agnostic Framework: - Remove model specifications from 6 agent files - Framework now works with any AI provider (Claude, GPT, Gemini, local models) - Users control model selection via OpenCode CLI settings Documentation Fixes: - Correct profile name: Core → Essential - Add missing Business profile documentation - Fix component counts: Developer (19), Advanced (32) - Document all 5 profiles with accurate descriptions Future Plans: - Add note about support for other AI tools (Cursor, Claude Code, etc.) - Clear focus on stabilizing OpenCode integration first This makes OpenAgents a truly universal, model-agnostic framework accessible to all users regardless of their AI provider preference.
5.1 KiB
Contributing to OpenAgents
Thank you for your interest in contributing! This guide will help you add new components to the registry.
Quick Start
- Fork the repository
- Create a new branch for your feature
- Add your component
- Test it works
- Submit a pull request
Adding New Components
Component Types
- Agents (
.opencode/agent/*.md) - Main AI agents - Subagents (
.opencode/agent/subagents/*.md) - Specialized helpers - Commands (
.opencode/command/*.md) - Slash commands - Tools (
.opencode/tool/*/index.ts) - Utility tools - Plugins (
.opencode/plugin/*.ts) - Integrations - Contexts (
.opencode/context/**/*.md) - Context files
Component Structure
For Markdown Files (Agents, Commands, Contexts)
All markdown files should include YAML frontmatter:
---
description: "Brief description of what this does"
mode: primary # For agents only
temperature: 0.1 # Optional - for agents only
tools: # For agents only
read: true
edit: true
write: true
permissions: # Optional
bash:
"*": "deny"
---
# Component Name
Your component content here...
Required fields:
description- Brief description (all components)
Agent-specific fields:
mode- Agent mode (primary, secondary, etc.)model- AI model to usetemperature- Temperature settingtools- Available toolspermissions- Security permissions
For TypeScript Files (Tools, Plugins)
Include JSDoc comments at the top:
/**
* Tool Name
*
* Brief description of what this tool does
*/
export function myTool() {
// Implementation
}
File Naming Conventions
- kebab-case for file names:
my-new-agent.md - PascalCase for TypeScript types/interfaces
- camelCase for variables and functions
Adding Your Component
-
Create the component file in the appropriate directory:
# Example: Adding a new agent touch .opencode/agent/my-new-agent.md -
Add frontmatter and content following the structure above
-
Test your component:
# Validate structure ./scripts/validate-component.sh -
Update the registry (automatic on merge to main):
# Manual update (optional) ./scripts/register-component.sh
Component Categories
When adding components, they're automatically categorized:
- core - Essential components included in minimal installs
- extended - Additional features for developer profile
- advanced - Experimental or specialized components
The auto-registration script assigns categories based on component type and location.
Testing Your Component
Local Testing
-
Install locally:
# Test the installer ./install.sh --list -
Validate structure:
./scripts/validate-component.sh -
Test with OpenCode:
opencode --agent your-new-agent
Automated Testing
When you submit a PR, GitHub Actions will:
- Validate component structure
- Update the registry
- Run validation checks
Pull Request Guidelines
PR Title Format
Use conventional commits:
feat: add new agent for Xfix: correct issue in Y commanddocs: update Z documentationchore: update dependencies
PR Description
Include:
- What - What component are you adding/changing?
- Why - Why is this useful?
- How - How does it work?
- Testing - How did you test it?
Example:
## What
Adds a new `database-agent` for managing database migrations.
## Why
Automates common database tasks and ensures migration safety.
## How
- Scans migration files
- Validates migration order
- Runs migrations with rollback support
## Testing
- [x] Validated with `./scripts/validate-component.sh`
- [x] Tested with PostgreSQL and MySQL
- [x] Tested rollback scenarios
Component Dependencies
If your component depends on others, declare them in the registry:
{
"id": "my-component",
"dependencies": ["tool:env", "agent:task-manager"]
}
The installer will automatically install dependencies.
Registry Auto-Update
The registry is automatically updated when:
- You push to
mainbranch - Changes are made to
.opencode/directory
The GitHub Action:
- Scans all components
- Extracts metadata
- Updates
registry.json - Commits changes
You don't need to manually edit registry.json!
Code Style
Markdown
- Use clear, concise language
- Include examples
- Add code blocks with syntax highlighting
- Use proper heading hierarchy
TypeScript
- Follow existing code style
- Add JSDoc comments
- Use TypeScript types (no
any) - Export functions explicitly
Bash Scripts
- Use
set -efor error handling - Add comments for complex logic
- Use meaningful variable names
- Include help text
Questions?
- Issues: Open an issue for bugs or feature requests
- Discussions: Use GitHub Discussions for questions
- Security: Email security issues privately
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🎉