System Agent Templates
March 4, 2026 ยท View on GitHub
This repository stores all system agent templates for Harness agents.
๐ Table of Contents
- Overview
- Available Templates
- Template Structure
- Adding a New Template
- Template Registration
- File Format Reference
- Best Practices
Overview
Agent templates are modular pipeline definitions that encapsulate:
- Pipeline configuration (stages, steps, containers, inputs)
- Metadata (name, description, version)
- Documentation (usage guides, capabilities, examples)
The Agents service automatically discovers and registers templates from this repository, making them available for deployment and execution.
Available Templates
The following agent templates are currently available in this repository:
| Template Name | Description | Version |
|---|---|---|
| autofix | Automatically identifies and fixes bugs, errors, and issues in codebases | 1.0.0 |
| code_coverage | AI-powered agent that automatically analyzes codebases and generates comprehensive unit tests to increase coverage | 1.0.0 |
| codereview | Automated code review agent that analyzes pull requests and provides feedback | 1.0.0 |
| ffcleanup | Feature flag cleanup agent that identifies and removes unused feature flags | 1.0.0 |
| manifest_remediator | Remediates issues in Kubernetes manifests and deployment configurations | 1.0.0 |
| onboarding | Onboarding agent that imports repositories into Harness Code and auto-generates CI pipelines using AI analysis | 1.0.0 |
| react_upgrade | AI-powered coding agent that automates React upgrades and code modifications using custom prompts | 1.0.0 |
| zero_day_remediation | Automatically identifies and remediates critical vulnerabilities in your software supply chain by proposing fixes and creating pull requests | 1.0.0 |
Template Structure
Each template must be organized in its own directory under templates/ with the following files:
templates/
โโโ <template-name>/
โโโ metadata.json # Template metadata and versioning (required)
โโโ pipeline.yaml # Pipeline definition and configuration (required)
โโโ wiki.MD # User-facing documentation (optional)
โโโ logo.svg # Template logo/icon (optional)
Example Structure
templates/
โโโ autofix/
โโโ metadata.json
โโโ pipeline.yaml
โโโ wiki.MD
โโโ logo.svg
Adding a New Template
Follow these steps to add a new agent template:
1. Create Template Directory
Create a new directory under templates/ with your agent's name (use lowercase, underscore-separated names):
mkdir -p templates/my_agent
2. Create Required Files
metadata.json
Define your template's metadata:
{
"name": "my_agent",
"description": "Brief description of what this agent does",
"version": "1.0.0"
}
pipeline.yaml
Define your pipeline configuration with inputs, stages, and steps:
pipeline:
clone:
depth: 1
ref:
name: <+inputs.branch>
type: branch
repo:
name: <+inputs.repo>
stages:
- name: my_agent_stage
steps:
- name: my_agent_step
run:
container:
image: your-registry/your-image:tag
env:
PLUGIN_CONFIG_VAR: <+inputs.configVar>
API_KEY: <+inputs.apiKey>
platform:
os: linux
arch: amd64
inputs:
apiKey:
type: secret
configVar:
type: string
default: "default-value"
repo:
type: string
branch:
type: string
default: main
wiki.MD
Create comprehensive documentation for your agent:
# My Agent
## Overview
Brief description of what the agent does and why it's useful.
## Key Capabilities
- Feature 1
- Feature 2
- Feature 3
## Usage
How to use this agent, including:
- Prerequisites
- Configuration requirements
- Example workflows
## Inputs
| Input | Type | Required | Default | Description |
| --------- | ------ | -------- | --------------- | -------------------------- |
| apiKey | secret | Yes | - | API key for authentication |
| configVar | string | No | "default-value" | Configuration parameter |
## Examples
Practical examples of using the agent.
logo.svg (Optional)
Provide an SVG logo for your agent to enhance visual identification in the UI:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<!-- Your logo design here -->
<circle cx="50" cy="50" r="40" fill="#0066cc"/>
</svg>
Logo Guidelines:
- Use SVG format for scalability
- Keep dimensions square (e.g., 100x100, 200x200)
- Use simple, recognizable designs
- Avoid overly complex graphics
3. Commit and Push
git add templates/my_agent/
git commit -m "Add my_agent template"
git push origin main
Template Registration
How Templates Are Discovered
The Agents service automatically discovers and registers templates through the following process:
- Repository Polling: The service periodically scans the
templates/directory in this repository - Validation: Each template directory is validated for required files (
metadata.json,pipeline.yaml) - Metadata Extraction: Template metadata is parsed from
metadata.json - Optional Files: If present,
wiki.MDandlogo.svgare loaded for enhanced documentation and UI display - Registration: Valid templates are registered in the service catalog
- Availability: Registered templates become available for deployment via API/UI
Registration Requirements
For successful registration, templates must:
- โ
Have required files:
metadata.jsonandpipeline.yaml - โ
Use valid JSON in
metadata.json - โ
Use valid YAML in
pipeline.yaml - โ Include a unique template name (no duplicates)
- โ
Follow semantic versioning (e.g.,
1.0.0,2.1.3)
Optional enhancements:
- ๐ Include
wiki.MDfor detailed documentation - ๐จ Include
logo.svgfor visual branding in the UI
Versioning and Updates
- Version Changes: Update the
versionfield inmetadata.jsonwhen making changes - Backward Compatibility: Avoid breaking changes to existing inputs/outputs
- Deprecation: Mark deprecated versions in the wiki documentation before removal
File Format Reference
metadata.json
Required fields:
{
"name": "string", // Template identifier (lowercase, alphanumeric, underscores)
"description": "string", // Brief description (1-2 sentences)
"version": "string" // Semantic version (MAJOR.MINOR.PATCH)
}
pipeline.yaml
The pipeline configuration follows the Harness CI pipeline v1 YAML format:
wiki.MD (Optional)
Provides user-facing documentation for the agent template. When present, this is displayed in the UI and helps users understand how to use the agent.
Recommended sections:
- Overview: What the agent does and its purpose
- Key Capabilities: Main features and functionality
- Usage: How to deploy and run the agent
- Inputs: Detailed input parameter documentation
- Outputs: Expected outputs and artifacts
- Examples: Real-world usage examples
- Troubleshooting: Common issues and solutions
logo.svg (Optional)
Best Practices
Naming Conventions
- โ
Use lowercase with underscores:
code_coverage,react_upgrade,zero_day_remediation,manifest_remediator - โ Avoid:
MyAgent,my-agent,MYAGENT,Code-Coverage,codeScanner
Documentation
- Write clear, concise descriptions
- Include practical examples
- Document all inputs with types and defaults
- Explain expected behavior and outputs
Security
- Never hardcode secrets or credentials
- Use
type: secretfor sensitive inputs - Follow principle of least privilege
- Document security requirements in wiki