Skip to content

constitutional

constitutional is a three-step pipeline inspired by Constitutional AI: generate initial output, critique it against a set of principles, then revise to comply.

  • Safe content generation (harmlessness, helpfulness, honesty checks)
  • Style or brand guideline compliance
  • Any task where output must adhere to a fixed set of rules
  • Structured quality enforcement
agents/my-constitutional/
├── AGENT.md ← pattern: constitutional, config
├── critique.md ← critique step: check against principles
└── revise.md ← revise step: fix violations
---
name: safe-writer
description: Generates content that adheres to safety and style guidelines.
version: "1.0.0"
pattern: constitutional
call:
model:
role: writer
---
Generate a helpful, informative response to the user's request.
Be thorough and provide concrete examples where relevant.
Call finish with key="done" and your response as value.
You are a compliance reviewer. You have received a generated response.
Evaluate it against these principles:
1. **Accuracy** — no false claims or unsupported assertions
2. **Clarity** — no jargon without explanation
3. **Safety** — no potentially harmful instructions or content
4. **Tone** — professional and respectful
For each violation, quote the problematic text and explain the issue.
If there are no violations, say "COMPLIANT".
Call finish with key="done" and the critique (or "COMPLIANT") as value.
You have an original response and a compliance critique.
If the critique says "COMPLIANT", return the original response unchanged.
Otherwise, revise the response to address every identified violation.
Make targeted fixes — don't rewrite what's already compliant.
Call finish with key="done" and the revised response as value.
Terminal window
tama add constitutional my-agent
AGENT.md body → generate initial response
critique.md → check against principles, list violations
revise.md → fix violations, return compliant output

Three steps, always executed unconditionally. The revise step handles the “already compliant” case by checking the critique text.