Template System
Stationβs template system allows you to package agents, configurations, and dependencies into reusable bundles that can be shared, versioned, and deployed across environments.
What are Templates?
Templates are packaged configurations that include:
- Agent definitions with prompts and configurations
- MCP server configurations and tool dependencies
- Environment variables and secrets
- Documentation and usage examples
Creating Templates
From Existing Agents
# Export an agent as a template
stn agent export 1 ./templates/database-monitor
# Create template bundle
stn template bundle ./templates/database-monitor --output db-monitor.tar.gz
Template Structure
database-monitor/
βββ manifest.json # Template metadata
βββ template.json # MCP server configurations
βββ agents/
β βββ monitor.prompt # Agent definition
βββ examples/
β βββ variables.yml # Example configuration
βββ README.md # Template documentation
Installing Templates
From Local Path
stn template install ./templates/database-monitor
From Bundle Registry
stn template install https://cloudshipai.github.io/registry/bundles/filesystem-bundle.tar.gz
From Git Repository
stn template install https://github.com/cloudshipai/station-templates/tree/main/database-monitor
Template Variables
Templates support Go template syntax for customization:
# template.json
{
"mcpServers": {
"postgres": {
"env": {
"DATABASE_URL": "{{ .DATABASE_URL }}"
}
}
}
}
Next Steps
- Bundle Registry - Browse available templates
- Creating Bundles - Package your own templates
- Publishing Bundles - Share with the community