Renderer protocol.
Built-in Renderers
TerminalRenderer
TheTerminalRenderer uses the Rich library to create a polished, interactive terminal UI with colored panels, formatted tables, progress bars, and real-time prompts.
Features
- Colored risk panels — Green (LOW), Yellow (MEDIUM), Orange (HIGH), Red (CRITICAL)
- Risk bar visualization — Filled/empty bar showing the score position
- Formatted action details — Function name, arguments, docstring, agent ID
- Interactive prompts — Y/N, multiple choice, free-text input
- Timer display — Shows elapsed review time
- Auto-approve notification — Brief flash for low-risk actions
Example Output
Usage
If the Rich library is not installed, Attesta automatically falls back to
PlainRenderer. Install Rich with pip install attesta[terminal] or pip install attesta[all] to enable the terminal UI.PlainRenderer
ThePlainRenderer uses Python’s built-in print() and input() functions. No external dependencies are required. This renderer is ideal for environments where Rich is unavailable or where structured output is preferred over visual formatting.
Example Output
Usage
The Renderer Protocol
All renderers implement theRenderer protocol with four methods:
Custom Renderer Examples
Web UI Renderer
Build a renderer that sends challenges to a web dashboard:Slack Renderer
Send approval requests to a Slack channel:Renderer Selection Logic
Attesta selects a renderer using this priority:- Explicit — If you pass a
rendererparameter, it is used - Rich available — If Rich is installed and stdout is a TTY,
TerminalRendereris used - Fallback —
PlainRendereris used in all other cases
Configuration via YAML
attesta.yaml
Custom Renderer Guide
Step-by-step guide to building a custom renderer
Challenge System
The challenges that renderers present to operators