Skip to main content

Source: docs/manual/templates.md

This page is generated by site/scripts/sync-manual-docs.mjs.

Templates and Scaffolding

Agent templates provide a quick-start scaffold for new agent projects. They generate a pre-configured directory with environment settings, Docker Compose overrides, and helper scripts so you can go from zero to a running agent in minutes.

This document is for developers creating new agent projects or customizing existing scaffolds.

Prerequisites: Go 1.25+, Cruvero repository cloned locally.

Template Structure

The agent scaffold is located in templates/agent and contains:

FilePurpose
README.mdProject-specific documentation for the generated agent
agent.yamlAgent configuration: system prompt, tool list, model preferences, workflow settings
scripts/dev.shBootstraps the local development environment (starts services, seeds registry, launches worker)
scripts/run.shExecutes a prompt using the agent's configured defaults
.env.exampleTemplate environment file with all required CRUVERO_* variables
docker-compose.override.ymlOverrides for the base Docker Compose (ports, volumes, environment)

CLI Usage

The cmd/temporal-agent CLI manages agent scaffolds:

Initialize a New Agent

go run ./cmd/temporal-agent init --name my-agent --module github.com/myorg/my-agent

This creates a my-agent/ directory with all scaffold files. Use --force to overwrite existing files.

Start Local Development

go run ./cmd/temporal-agent dev --config my-agent/.env

This seeds the tool registry, starts the worker, and connects to local Temporal. Use --no-worker to skip the worker if you want to run it separately. Use --registry-version to specify a registry version (default v2.0.7).

Run a Prompt

go run ./cmd/temporal-agent run --prompt "Summarize the status" --config my-agent/.env

Executes a single agent run using the configuration from the scaffold's env file.

Check Status

go run ./cmd/temporal-agent status --config my-agent/.env

Reports connectivity to Temporal and Postgres, registry availability, and worker health.

Customization

After generating a scaffold, customize it by editing:

  • agent.yaml — Change the system prompt, adjust tool lists, set model preferences, or configure workflow parameters (max steps, approval timeout, etc.).
  • .env.example — Add provider API keys, database URLs, and feature flags. Copy to .env for local use.
  • docker-compose.override.yml — Add additional services, change port mappings, or mount local directories.
  • scripts/dev.sh — Modify the dev bootstrap sequence if you need additional setup steps.