Template Creation Guide
Create custom agent templates to tailor AI behavior for your specific workflows, tech stack, and team conventions.
Template Basics
A template defines an agent's personality, responsibilities, and behavior. Templates are stored as YAML files and rendered with project-specific variables at runtime.
Creating a Template
From the UI
- Navigate to Templates in the app sidebar
- Click Create Template
- Fill in the template name, description, and base agent type
- Write the template content in the editor
- Configure behavior settings (autonomy, verbosity, creativity)
- Save the template
From YAML
You can also import templates from YAML files:
meta:
name: "DevOps Engineer"
description: "Specialized for infrastructure and deployment tasks"
agent_type: "engineer"
version: "1.0.0"
tags:
- devops
- infrastructure
- ci-cd
visibility: private
template:
role:
title: "DevOps Engineer"
responsibilities:
- Manage CI/CD pipelines
- Configure infrastructure as code
- Monitor deployment health
- Automate operational tasks
goals:
- Zero-downtime deployments
- Infrastructure reliability above 99.9%
- Automated rollback on failure
capabilities:
allowed_tools:
- terraform
- docker
- kubectl
- aws-cli
behavior:
autonomy: 0.7
verbosity: 0.5
creativity: 0.3
style: "concise and operational"
content: |
# {{role.title}} Agent
You are the {{role.title}} for **{{team_name}}**.
## Responsibilities
{{#role.responsibilities}}
- {{.}}
{{/role.responsibilities}}
## Infrastructure Stack
- Cloud: AWS (ECS, RDS, S3, CloudFront)
- IaC: Terraform
- CI/CD: GitHub Actions
- Containers: Docker
- Monitoring: Datadog
## Deployment Protocol
1. All changes must go through PR review
2. Staging deployment before production
3. Canary releases for critical services
4. Automated rollback on health check failure
## Coding Standards
- Terraform modules must include README
- Docker images must use multi-stage builds
- All secrets via AWS Secrets Manager
security:
sensitive_operations:
- infrastructure provisioning
- secret management
external_services:
- AWS
- Datadog
declared_risk: medium Template Variables
Templates use Mustache-style placeholders that are replaced at runtime:
{{team_name}} Your team's display name{{role.title}} The role title from template config{{repo}} GitHub repository (owner/name){{#role.responsibilities}} Loop over responsibilities list{{#role.goals}} Loop over goals list{{#repo}}...{{/repo}} Conditional block: only renders if repo is setBehavior Tuning
Each template has three behavior sliders that influence agent personality:
Autonomy 0.0 - 1.0
How independently the agent acts. Low = asks for confirmation often. High = takes initiative.
Verbosity 0.0 - 1.0
How detailed the agent's responses are. Low = concise. High = thorough explanations.
Creativity 0.0 - 1.0
How much the agent explores novel solutions. Low = follows conventions. High = proposes alternatives.
Security Validation
All templates go through security validation before they can be applied or published. The system checks for:
Prompt injection attempts, jailbreak patterns, dangerous shell commands (rm -rf /), remote code execution, data exfiltration
Accessing .env files, credential patterns, network exfiltration tools, base64 obfuscation
Sudo usage, making files executable, system service manipulation, package installation
External URLs, file write operations, privileged Docker containers
Safety Score
Each template receives a safety score from 0-100:
- 80-100 (Low Risk) - Safe to use and publish to marketplace
- 50-79 (Medium Risk) - Review carefully before using
- 0-49 (High Risk) - Contains critical or high-severity issues that must be resolved
Templates with critical or high-severity violations cannot be applied to agents.
Allowed Commands
Templates are sandboxed to a whitelist of safe commands:
# Version control
git, gh
# Package managers
npm, npx, yarn, cargo, pip, go
# Build tools
node, rustc, python, make
# Safe utilities
ls, cat, head, tail, grep, find, mkdir, cp, mv, touch
echo, sed, awk, jq, yq, date, pwd, which, cd
# Test runners
jest, pytest, cargo test Applying Templates
To apply a custom template to an agent:
- Open the Templates page
- Click the Apply button on your template
- Select which agent to apply it to (e.g., Engineer)
- Confirm the action
- Restart the agent to pick up the new template
Sharing Templates
Export / Import
Share templates with teammates by exporting to YAML:
- Open the template in the editor
- Click Export YAML
- Share the YAML file
- Others can import it via Import YAML
Marketplace (Premium)
Premium users can publish templates to the marketplace:
- Template must pass security validation (score 80+)
- Set a price (0 for free, or price in cents for paid)
- Publish from the template editor
- Others can browse, download, or purchase your template
Best Practices
- Be specific about your tech stack - Include framework versions, libraries, and conventions
- Define clear boundaries - Specify what the agent should and should not do
- Include examples - Show sample code patterns, PR formats, or commit message styles
- Set appropriate autonomy - Higher for routine tasks, lower for critical operations
- Keep templates focused - One template per role, not one giant template
- Version your templates - Use semantic versioning and update the changelog
- Test incrementally - Make small changes and observe the impact before large rewrites
- Declare external services - List any APIs or services the agent will interact with in the security section
Example Templates
Strict Code Reviewer
# Code Review Architect
You are a strict code reviewer for **{{team_name}}**.
## Review Criteria
- All functions must have type annotations
- No console.log in production code
- Maximum function length: 50 lines
- Maximum file length: 300 lines
- All API endpoints must have error handling
- No hardcoded strings (use constants)
## PR Approval Rules
- APPROVE only if all criteria are met
- REQUEST_CHANGES with specific line references
- Never approve PRs that skip tests Content Marketing Agent
# Content Strategist
You are the Content Strategist for **{{team_name}}**.
## Content Guidelines
- Write for a developer audience (technical but approachable)
- Include code examples in every tutorial
- SEO: target long-tail keywords with 100-1000 monthly searches
- Tone: helpful, not salesy
## Publishing Workflow
1. Research keywords and outline
2. Draft content with code examples
3. Submit for review via GitHub issue
4. Wait for founder approval before publishing
## Channels
- Blog: weekly technical tutorial
- Twitter: 3 threads per week
- Dev.to: cross-post blog articles