Clara AI is a robust, zero-cost automation pipeline designed to streamline the transition from customer demo calls to fully-configured AI voice agents. By leveraging the free tier of the Gemini LLM and local orchestration tools like n8n, it extracts structured business requirements from transcripts, generates optimized Retell AI agent specifications, and maintains a versioned history of changes with beautiful diff visualizations.
Processes demo and onboarding call transcripts into Retell AI agent configurations — fully automated, versioned, with changelogs and a web dashboard.
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────┐
│ Demo Call │ │ LLM Extraction │ │ Prompt │ │ Retell Agent│
│ Transcript │────▶│ via Gemini API │────▶│ Template Engine │────▶│ Spec v1 │
│ (.txt) │ │ (extract.js) │ │ (generate- │ │ (JSON) │
└─────────────────┘ └──────────────────┘ │ agent-spec.js) │ └──────────────┘
└──────────────────┘ │
▼
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────┐
│ Onboarding Call │ │ Diff/Patch │ │ Regenerate │ │ Retell Agent│
│ Transcript │────▶│ Engine │────▶│ Agent Spec │────▶│ Spec v2 │
│ (.txt) │ │ (apply- │ │ + Changelog │ │ + Changelog │
└─────────────────┘ │ onboarding.js) │ └──────────────────┘ └──────────────┘
└──────────────────┘
Pipeline A (Demo → v1): Transcript → extract.js (Gemini LLM) → Account Memo JSON → generate-agent-spec.js → Agent Spec v1
Pipeline B (Onboarding → v2): Transcript + v1 Memo → apply-onboarding.js → Updated Memo + Agent Spec v2 + Changelog
# 1. Run the pipeline (processes all 10 transcripts)
node scripts/orchestrator.js
# 2. Launch the dashboard
node scripts/serve-dashboard.js
# → Open http://localhost:3000- Place demo call transcripts (
.txt) indataset/demo/ - Place onboarding call transcripts (
.txt) indataset/onboarding/ - Each transcript must have a header with
Account: <Company Name>for matching - Run
node scripts/orchestrator.js— it auto-discovers and processes all files - Outputs appear in
outputs/accounts/<account_id>/v1/andv2/
clara-ai-pipeline/
├── dataset/
│ ├── demo/ # 5 demo call transcripts
│ └── onboarding/ # 5 onboarding call transcripts
├── scripts/
│ ├── extract.js # LLM-based transcript extraction (Gemini)
│ ├── generate-agent-spec.js # Retell agent spec via prompt templates
│ ├── apply-onboarding.js # v1→v2 diff/patch engine + changelog
│ ├── orchestrator.js # Main batch pipeline runner
│ ├── serve-dashboard.js # Dashboard HTTP server
│ └── utils.js # Shared utilities
├── outputs/
│ ├── accounts/<id>/v1/ # v1 account memo, agent spec, prompt
│ ├── accounts/<id>/v2/ # v2 account memo, agent spec, prompt
│ └── pipeline_summary.json # Batch run summary
├── changelog/<id>/ # Per-account changelogs (JSON + Markdown)
├── dashboard/ # Web dashboard (HTML/CSS/JS)
├── workflows/ # n8n workflow export
├── tasks/ # Task tracker JSON (Asana alternative)
├── docker-compose.yml # Docker Compose for n8n
├── .env.example # Environment variables reference
└── README.md
| Output | Location |
|---|---|
| Account Memo (v1) | outputs/accounts/<id>/v1/account_memo.json |
| Agent Spec (v1) | outputs/accounts/<id>/v1/agent_spec.json |
| System Prompt (v1) | outputs/accounts/<id>/v1/agent_prompt.txt |
| Account Memo (v2) | outputs/accounts/<id>/v2/account_memo.json |
| Agent Spec (v2) | outputs/accounts/<id>/v2/agent_spec.json |
| System Prompt (v2) | outputs/accounts/<id>/v2/agent_prompt.txt |
| Changelog (JSON) | changelog/<id>/changes.json |
| Changelog (Markdown) | changelog/<id>/changes.md |
| Pipeline Summary | outputs/pipeline_summary.json |
| Task Tracker | tasks/tracker.json |
- Reads demo transcripts from
dataset/demo/ - Extracts structured Account Memo via the Gemini LLM API (zero cost free tier)
- Generates Retell Agent Draft Spec using prompt templates
- Saves v1 outputs
- Reads onboarding transcripts from
dataset/onboarding/ - Matches to existing v1 memo by account name
- Extracts onboarding updates and merges with v1 (smart conflict resolution)
- Computes v1→v2 diff and generates changelog
- Regenerates v2 agent spec
- Saves v2 outputs and changelog
- Zero-cost extraction: Uses the free tier of the Gemini API for highly accurate narrative extraction
- Idempotent: Re-running produces the same outputs, no duplication or corruption
- Retry logic: 3 attempts per file with error logging
- Versioning: v1/v2 with full diff tracking
- Changelogs: JSON + Markdown per account showing what changed and why
- Task tracker: Local JSON as Asana alternative
- Dashboard: Web UI with diff viewer (bonus)
- n8n export: Workflow JSON for visual orchestration
# Run full pipeline (demo + onboarding)
node scripts/orchestrator.js
# Run only demo processing (Pipeline A)
node scripts/orchestrator.js --demo-only
# Run only onboarding processing (Pipeline B)
node scripts/orchestrator.js --onboarding-onlynode scripts/serve-dashboard.js
# Open http://localhost:3000Features:
- Account overview with batch metrics
- Account Memo viewer (v1/v2 toggle)
- Agent Spec viewer (v1/v2 toggle)
- System Prompt viewer
- Diff viewer showing v1→v2 changes with color coding
- Docker and Docker Compose installed
# 1. Start n8n
docker-compose up -d
# 2. Open n8n UI
# → http://localhost:5678
# Login: clara / clara2024
# 3. Import the workflow
# - Go to Workflows → Import from File
# - Select workflows/n8n-workflow.json
# - Click "Import"
# 4. Configure file paths in each Code node to point to /home/node/scripts/
# 5. Execute the workflow manually or via the Schedule TriggerSee .env.example for all configurable variables:
GEMINI_API_KEY— API key for the Gemini LLMN8N_BASIC_AUTH_USER/N8N_BASIC_AUTH_PASSWORD— n8n loginPIPELINE_DATA_DIR— path to dataset folderPIPELINE_OUTPUT_DIR— path to outputs folderDASHBOARD_PORT— port for dashboard server (default: 3000)
The orchestrator processes all files in dataset/demo/ and dataset/onboarding/ automatically. To run all 10 files:
node scripts/orchestrator.js- Go to https://www.retellai.com/
- Sign up for a free account
- Navigate to Agents → Create Agent
Since Retell's free tier does not support programmatic agent creation via API, follow these manual steps:
- Open the generated prompt file:
outputs/accounts/<account_id>/v2/agent_prompt.txt - In Retell UI, create a new agent:
- Set Agent Name to the value in
agent_spec.json→agent_name - Paste the contents of
agent_prompt.txtinto the System Prompt field
- Set Agent Name to the value in
- Configure voice settings:
- Select a professional, friendly female voice
- Set speed to 1.0x
- Configure call transfer (if supported):
- Add transfer phone numbers from the
call_transfer_protocolsection inagent_spec.json - Set timeout values as specified
- Add transfer phone numbers from the
- Test the agent by calling the assigned phone number
- Repeat for each account
- Go to Settings → API Keys in Retell dashboard
- Copy the API key
- Set
RETELL_API_KEYin your environment (not needed for free tier)
| Component | Technology | Cost |
|---|---|---|
| Runtime | Node.js | Free |
| Extraction | Gemini LLM API | Free Tier (zero cost) |
| Agent Spec | Prompt templates | Free |
| Storage | Local JSON files | Free |
| Dashboard | HTML/CSS/JS + Node HTTP | Free |
| Orchestration | Node.js script / n8n (Docker) | Free |
| Task Tracking | Local JSON file | Free |
| n8n | Docker (self-hosted) | Free |
LLM Usage: Uses the free tier of the Gemini API (gemini-2.5-flash) for extraction. All prompt generation is template-based. Zero paid API calls, adhering to the zero-cost constraint.
- No real-time Retell API integration: Free tier doesn't support programmatic agent creation; specs must be pasted manually.
- No audio transcription: Pipeline accepts
.txttranscripts as input. If only audio recordings are provided, a separate transcription step (e.g., Whisper locally) would be needed. - English only: Extraction patterns are designed for English-language transcripts.
- Mock data for 4/5 accounts: Only one real transcript (Ben's Electric) was available; the remaining 4 demo and 5 onboarding transcripts are realistic mocks.
- Jobber integration pending: Clara's Jobber integration is marked as "coming soon" per the demo call.
- Retell API integration: With a paid Retell tier, auto-create and update agents programmatically via their API.
- Audio transcription pipeline: Add a Whisper-based transcription step to accept audio recordings directly.
- CRM integrations: Auto-push account data to Jobber, ServiceTitan, Housecall Pro via their APIs.
- Automated QA: Add validation checks comparing extracted data against the source transcript for accuracy scoring.
- Webhook-triggered pipeline: Auto-run when new transcripts are uploaded (via n8n webhook or file watcher).
- Multi-language support: Extend extraction patterns for French-Canadian and Spanish markets.
- Database storage: Replace local JSON with Supabase or SQLite for better querying and scalability.
- Agent testing framework: Automated test calls to verify agent behavior after deployment.
- Asana/project management integration: Replace local task tracker with actual Asana API for team collaboration.
- Go to https://www.retellai.com and click Sign Up
- Create a free account (no credit card required for sign-up)
Retell's free tier does not support programmatic agent creation via API. Therefore, the pipeline outputs a "Retell Agent Spec JSON" per account that you manually import:
- Run the pipeline to generate outputs:
node scripts/orchestrator.js
- Open the agent spec for a given account:
outputs/accounts/<account_id>/v1/agent_spec.json # Demo-derived v1 outputs/accounts/<account_id>/v2/agent_spec.json # Onboarding-refined v2 - In the Retell Dashboard, click Create Agent → Custom Agent
- Copy the
system_promptfield from the agent spec JSON and paste it into the System Prompt box - Set the Agent Name to match the
agent_namefield - Configure the Voice to match the
voice_stylefield (e.g., "professional, warm, conversational") - Under Functions / Tools, add transfer-call functions as described in the
call_transfer_protocolfield - Save the agent
The agent_prompt.txt file in each version directory contains the ready-to-paste prompt text.
| # | Account | Industry | Location |
|---|---|---|---|
| 1 | Ben's Electric Solutions | Electrical | Calgary, AB |
| 2 | Patriot Fire Protection | Fire Protection | Houston, TX |
| 3 | Summit HVAC Solutions | HVAC | Phoenix, AZ |
| 4 | Coastal Alarm Systems | Security/Alarms | Tampa, FL |
| 5 | Evergreen Mechanical Services | Plumbing/HVAC | Denver, CO |