Project Templates

Prev Next

Project templates are reusable blueprints that capture a project's configuration and session structure. They are shared across all users (not tied to a specific owner) and can be instantiated into new projects.

Creating a Template

From the Templates list in the sidebar, click New Template. The template editor has two views:

Form View

Provides structured fields:

  • Name — A unique name for the template (enforced at the database level).
  • Description — Optional context about the template's purpose.
  • Domain — Optional category (e.g., "Cost Savings", "Quality Metrics").
  • System Prompt — Instructions defining the AI's role and focus area.
  • Tools — Which capabilities the AI has access to.
  • Sessions — An ordered list of session definitions, each with:
    • Name — Session name.
    • Initial Request — The starting prompt for the session.
    • Disposition Schema — Structured output schema for the session.
    • Dependencies — References to other sessions in the template (by name), with optional conditional logic on disposition values.

Markdown View

A full-text markdown editor for the template. The format uses heading levels to structure the template:

# Template: My Workflow

## Description
A description of the workflow.

## Domain
Risk Management

## System Prompt
You are assisting a healthcare data analyst.

## Tools
QUERY_DATABASE, GET_MEASURE_METADATA, SEARCH_DATA_MODEL, PROMOTE_RESULT

## Sessions

### First Session
- **Initial Request:** Investigate the data
- **Disposition Schema:**
  - risk: HIGH | MEDIUM | LOW

### Second Session
- **Initial Request:** Dig into the high-risk cases
- **Dependencies:**
  - First Session [risk = HIGH]

Use the Reformat button to clean up markdown formatting. Switching from Markdown to Form view will parse the markdown; errors are shown inline.

Capturing a Project as a Template

On any project detail page, the owner can click Save as Template to create a new template from the project's current configuration and sessions. Session dependencies (which use UUIDs internally) are converted to session names in the template.

Creating a Project from a Template

On the template edit page, click Create Project from Template. This creates a new project with the template's configuration and sessions.

Validation

Templates are validated on save:

  • Name is required and must be unique.
  • Each session must have a name (no duplicates except against deleted templates).
  • Dependencies cannot self-reference.
  • Upstream session names must exist in the template.
  • Conditional dependencies require the upstream session to have the referenced disposition schema key as an enum type, and the value must be in the allowed list.
  • Circular dependencies are detected and rejected.

Access Control

  • Authenticated users can view the template list and individual templates.
  • Architects can create, edit, delete templates, create projects from templates, and capture projects to templates.