← Back to Lessons
ElevenLabs + Claude Code

Build a Voice Agent From a Transcript

Clone the open-source workflow, drop in a discovery-call transcript, and let Claude Code build a production ElevenLabs voice agent — prompt, knowledge base, tools, and tests.
⏱ About 20 minutes

What this does. You'll clone a free, open-source repo, point Claude Code at a discovery-call transcript, and get a production-ready ElevenLabs voice agent out the other end — system prompt, knowledge base, webhook tools, config, and an automated test suite. The transcript is the input; a deployed agent is the output.

The idea. A 20-minute call with a business owner already contains everything an agent needs: hours, services, pricing, FAQs, booking rules. Instead of hand-building all of that in the ElevenLabs UI, you hand the transcript to Claude Code and it does the assembly, following a tested set of conventions baked into the repo.

Requirements: Claude Code installed, Node.js 18+, an ElevenLabs account with an API key, and Git. The GitHub CLI (gh) is optional but recommended.

View the repo on GitHub →

1
Install the prerequisites

You need four things on your machine before you start. If you already have them, skip ahead.

1 / 4 — Claude Code

The engine that reads the transcript and builds the agent. If you don't have it, follow the 5-minute macOS installer first, then come back here.

2 / 4 — Node.js 18+

Runs the elevenlabs-manager CLI. Check with node -v. Install from nodejs.org if missing.

3 / 4 — An ElevenLabs account

Sign up at elevenlabs.io — Google, GitHub, or email all work. You'll generate the API key itself in Step 4.

4 / 4 — Git (and optionally GitHub CLI)

Git ships with macOS. The GitHub CLI (gh) is optional — only needed if you want to push your copy to your own private repo in Step 2.

2
Clone the public repo

Open Terminal and run:

git clone https://github.com/chase-the-coder/elevenlabs-voice-agent-workflow.git cd elevenlabs-voice-agent-workflow

This pulls down the full workflow: the elevenlabs-manager CLI, a complete example agent (Johnson's HVAC), the Claude Code slash commands (/plan, /build, /review, /test), and a discovery questionnaire. Want to look before you clone? Browse the repo on GitHub.

What's in the box

The repo is MIT-licensed and works out of the box. The CLI talks to ElevenLabs directly over its API — no extra servers or accounts required beyond your ElevenLabs key.

3
Make it your own (recommended)

The clone still points at the original template. Detach it and create your own repo so your agents and client data live under your account:

git remote remove origin gh repo create my-voice-agents --private --source=. --remote=origin --push

Use --public instead of --private if you want it open. If you don't have the GitHub CLI, you can skip this step — it only affects where your version lives, not whether the workflow runs.

4
Create your ElevenLabs API key

The CLI authenticates to ElevenLabs with an API key. Here's how to generate one.

If you don't have an account yet, sign up at elevenlabs.io (Google, GitHub, or email all work). Then:

  1. Open the API keys page at elevenlabs.io/app/settings/api-keys. You can also reach it from the dashboard — click Developers in the bottom-left corner, then open the API keys tab.
  2. Click Create Key.
  3. Give it a descriptive name like voice-agent-workflow so you remember what it's for.
  4. Leave the defaults for a key with full access, or optionally set restrictions (limit which features the key can use) and a credit limit (cap how much it can spend). Full access is fine for this workflow.
  5. Click Create Key.
Copy it now — it's shown only once

ElevenLabs reveals the full key a single time. Hit the copy button immediately and store it somewhere safe. If you lose it you can't view it again — you'd have to delete it and create a new one. You'll paste it into your .env file in the next step.

5
Install the CLI and add your API key

Install the dependencies, then drop in the key you just created:

cd elevenlabs-manager npm install cp .env.example .env

Open the new .env file in your editor and paste the key you copied:

ELEVENLABS_API_KEY=your_api_key_here
Your key stays local

.env is git-ignored — it never gets committed or pushed. Your API key stays on your machine.

6
Drop in your transcript

Go back to the project root and make a folder to hold your discovery transcripts:

cd .. mkdir -p discovery

Save your discovery-call transcript as a plain text or markdown file inside it, for example discovery/acme-plumbing.txt. A transcript from any recorded call works — Zoom, a phone recording run through a transcriber, or notes you typed up.

Don't have a transcript yet?

The repo ships with discovery-template.md — a questionnaire covering business identity, services, pricing, top FAQs, and call goals. Walk a business owner through those questions on a call, transcribe it, and you have exactly what the next step needs. The better the answers, the better the agent.

7
Start Claude Code and orient it

From the project root, launch Claude Code:

claude

It automatically reads CLAUDE.md and learns the project's conventions. Run the priming command so it reads the structure, current branch, and existing agents before you ask for anything:

/prime
8
Plan the agent from the transcript

Now point Claude at your transcript. Describe the business and what the agent should do, and reference the file you dropped in:

/plan Build a voice agent for Acme Plumbing from the discovery transcript at discovery/acme-plumbing.txt. It should answer FAQs from a knowledge base and book service appointments.

Claude reads your transcript, studies the example agent for patterns, consults the bundled ElevenLabs docs, and writes a detailed plan to specs/todo/ — the system prompt, knowledge base sections, tool list, and config, all within the repo's tested token and latency budgets.

Nothing is built yet

/plan only writes a plan for your approval. No files are created and nothing touches ElevenLabs until the next step. Read it over and tell Claude to adjust anything before you build.

9
Build it

When the plan looks right, execute it:

/build

Claude creates a local git branch, generates the agent folder (prompt, knowledge base, tool definitions, config), registers it in elevenlabs-manager/config.json, and commits everything. Then it asks how you want to deploy:

Push to ElevenLabs Main

Changes go live in production immediately.

Create a new ElevenLabs branch

Deploys to an isolated branch you can A/B test against production before promoting. Recommended for a first build.

You're always in control

The workflow never pushes to ElevenLabs on its own. /build always stops and asks Main-or-branch, and you decide when to merge or split traffic.

10
Review and test before going live

Catch problems before a real caller does. First, verify the build against the plan:

/review

This checks prompt and KB word counts, section order, tool naming, and the latency settings — and flags issues by severity. Then run simulated phone calls against the agent:

/test acme-plumbing --runs 5

It auto-generates 8-15 test scenarios (happy paths, guardrails, emergencies, edge cases, tool failures), runs each one five times in parallel, and classifies every test as PASS, FLAKY, or FAIL — with a suggested prompt fix for anything that fails. Tests use mocked tool responses, so you don't need any backend wired up to run them.

Prefer the raw CLI?

Every slash command maps to a npm run script in elevenlabs-manager/. The test suite is npm run tests:run <agent-key>; add --verbose to print full conversation transcripts.

11
Go live

Once tests are green, promote your agent to production. If you built on an ElevenLabs branch, merge it to Main:

cd elevenlabs-manager npm run branches:merge acme-plumbing

Or push the current local version straight to Main:

npm run agents:push acme-plumbing

That's the full loop: transcript in, deployed agent out. To iterate, edit the transcript or run /plan again with new instructions, then /build and /test. Your local git history and the ElevenLabs branches give you two independent layers of version control the whole way.

12
Troubleshooting

npm run says command not found

Run CLI commands from inside the elevenlabs-manager/ directory (cd elevenlabs-manager). The slash commands in Claude Code handle this for you.

ElevenLabs returns an auth error

Confirm elevenlabs-manager/.env exists and contains a valid ELEVENLABS_API_KEY. Regenerate the key at elevenlabs.io/app/settings/api-keys if needed.

Claude doesn't see my transcript

Make sure the file path you give /plan is correct and relative to the project root (e.g. discovery/acme-plumbing.txt), and that the file is plain text or markdown.

A test comes back FLAKY

FLAKY means the instruction exists in the prompt but isn't strong enough — it passes some runs, not all. Ask Claude to reinforce that prompt section (the repo's convention is to mark critical steps with "This step is important"), then re-run /test.

Do I need any MCP servers?

No. The elevenlabs-manager CLI does everything — push, pull, tools, KB, branches, tests — over the ElevenLabs API on its own. MCP servers are optional add-ons documented in the repo's README.

Questions?

Built by AI Service Engine · view the repo on GitHub · install Claude Code first