Custom agents for opencode.
This option can either be:
- An attribute set defining agents
- A path to a directory containing multiple agent files
If an attribute set is used, the attribute name becomes the agent filename, and the value is either:
- Inline content as a string (creates
opencode/agent/<name>.md) - A path to a file (creates
opencode/agent/<name>.md)
If a path is used, it is expected to contain agent files. The directory is symlinked to $XDG_CONFIG_HOME/opencode/agent/.
Declarations
Type
(attribute set of (strings concatenated with "\n" or absolute path)) or absolute pathDefault
{ }Example
{
code-reviewer = ''
# Code Reviewer Agent
You are a senior software engineer specializing in code reviews.
Focus on code quality, security, and maintainability.
## Guidelines
- Review for potential bugs and edge cases
- Check for security vulnerabilities
- Ensure code follows best practices
- Suggest improvements for readability and performance
'';
documentation = ./agents/documentation.md;
}