Voice Agents Overview Create ElevenLabs Conversational AI voice agents for client discovery, feedback, and check-in calls. Automatically generates agent configuration from client context. Quick Decision Tree Environment Setup Common Usage Create Discovery Agent Create Feedback Agent Dry Run (Preview) Scope Types | Scope | Purpose | |-------|---------| | | Interview client team about operations, pain points, tech stack | | | Gather feedback on completed project | | | Periodic relationship check-ins | | | Qualify inbound leads before sales | | | Guide new contacts through info gathering | Gener…

)\n\n for folder in file_list:\n title = folder['title']\n match = pattern.match(title)\n\n if match:\n folder_name = match.group(2).strip().lower()\n if company_lower in folder_name or folder_name in company_lower:\n return {\n 'id': folder['id'],\n 'title': folder['title']\n }\n\n return None\n\n\ndef find_subfolder(drive: GoogleDrive, parent_id: str, name: str) -> Optional[dict]:\n \"\"\"Find a subfolder by name within a parent folder.\"\"\"\n query = (\n f\"'{parent_id}' in parents and \"\n \"mimeType='application/vnd.google-apps.folder' and \"\n f\"title contains '{name}' and \"\n \"trashed=false\"\n )\n\n file_list = drive.ListFile({\n 'q': query,\n 'supportsAllDrives': True,\n 'includeItemsFromAllDrives': True\n }).GetList()\n\n if file_list:\n return {'id': file_list[0]['id'], 'title': file_list[0]['title']}\n return None\n\n\ndef find_file(drive: GoogleDrive, parent_id: str, name: str) -> Optional[dict]:\n \"\"\"Find a file by name within a folder.\"\"\"\n query = (\n f\"'{parent_id}' in parents and \"\n f\"title contains '{name}' and \"\n \"trashed=false\"\n )\n\n file_list = drive.ListFile({\n 'q': query,\n 'supportsAllDrives': True,\n 'includeItemsFromAllDrives': True\n }).GetList()\n\n if file_list:\n return {'id': file_list[0]['id'], 'title': file_list[0]['title']}\n return None\n\n\ndef get_doc_content(drive: GoogleDrive, file_id: str) -> str:\n \"\"\"\n Get content from a Google Doc.\n\n Args:\n drive: GoogleDrive instance\n file_id: Google Doc ID\n\n Returns:\n Document content as text\n \"\"\"\n try:\n file = drive.CreateFile({'id': file_id})\n file.FetchMetadata()\n\n # Check if it's a Google Doc (needs export) or regular file\n mime_type = file.get('mimeType', '')\n\n if mime_type == 'application/vnd.google-apps.document':\n # Google Doc - export as plain text\n content = file.GetContentString(mimetype='text/plain')\n else:\n # Regular file - download directly\n content = file.GetContentString()\n\n return content\n except Exception as e:\n print(f\" Warning: Could not read document: {e}\")\n return \"\"\n\n\ndef fetch_client_context(drive: GoogleDrive, company_name: str) -> dict:\n \"\"\"\n Fetch all available context for a client from Google Drive.\n\n Args:\n drive: GoogleDrive instance\n company_name: Company name\n\n Returns:\n Dict with research_output and intro_transcript\n \"\"\"\n context = {\n 'research_output': '',\n 'intro_transcript': ''\n }\n\n # Find client folder\n client_folder = find_client_folder(drive, company_name)\n if not client_folder:\n print(f\" Client folder not found for '{company_name}'\")\n return context\n\n print(f\" Found client folder: {client_folder['title']}\")\n\n # Find and read Research document\n research_file = find_file(drive, client_folder['id'], 'Research')\n if research_file:\n print(f\" Found research document: {research_file['title']}\")\n context['research_output'] = get_doc_content(drive, research_file['id'])\n\n # Navigate to Discovery -> Meeting Transcripts -> Intro\n discovery_folder = find_subfolder(drive, client_folder['id'], 'Discovery')\n if discovery_folder:\n transcripts_folder = find_subfolder(drive, discovery_folder['id'], 'Meeting Transcripts')\n if transcripts_folder:\n intro_file = find_file(drive, transcripts_folder['id'], 'Intro')\n if intro_file:\n print(f\" Found intro transcript: {intro_file['title']}\")\n context['intro_transcript'] = get_doc_content(drive, intro_file['id'])\n\n return context\n\n\ndef generate_agent_config(\n company_name: str,\n scope: str,\n notes: str,\n research_output: str = \"\",\n intro_transcript: str = \"\"\n) -> dict:\n \"\"\"\n Generate agent configuration using OpenRouter AI.\n\n Args:\n company_name: Client company name\n scope: Agent scope (discovery, feedback, etc.)\n notes: Additional context notes\n research_output: Research document content\n intro_transcript: Intro meeting transcript\n\n Returns:\n Dict with Agent Name, First Message, and Prompt\n \"\"\"\n if not OPENROUTER_API_KEY:\n raise VoiceAgentError(\"OPENROUTER_API_KEY not set\")\n\n prompt = f\"\"\"You are an expert Conversation Designer for Voice AI specializing in business consulting and client engagement. Your goal is to generate a configuration for an ElevenLabs ConvAI agent that operates on behalf of Casper Studios, a business automation and AI consulting agency.\n\n## Understanding the Agent's Purpose\n\nThis agent represents Casper Studios and will be sent to the client's team to conduct conversations. The scope variable determines what type of conversation this agent should have:\n\n- **discovery** (default if scope is empty or unclear): Interview client team members to understand their current operations, pain points, tech stack, workflows, and automation opportunities. Casper Studios will analyze the recordings to inform proposals and project scoping.\n- **feedback**: Gather feedback on a completed project or ongoing engagement\n- **check-in**: Conduct periodic relationship check-ins with existing clients\n- **qualification**: Qualify inbound leads before scheduling sales calls\n- **onboarding**: Guide new client contacts through initial information gathering\n\n\u003cinput_data>\nClient Company: {company_name}\nScope: {scope}\nAdditional Context from Casper Team: {notes}\n\n---\nTranscript from Casper Studios conversation with client (if available):\n{intro_transcript if intro_transcript else \"(Not available)\"}\n\n---\nResearch on the client company (if available):\n{research_output if research_output else \"(Not available)\"}\n\u003c/input_data>\n\n## Your Task\n\nAnalyze all provided context deeply, then generate an agent configuration precisely tailored to this client and scope.\n\n### Output Specification\n\nReturn a single valid JSON object with exactly three fields: \"Agent Name\", \"First Message\", and \"Prompt\"\n\n---\n\n#### Field 1: Agent Name\n\nFormat: `[Client Name] {{Scope}} Agent v1`\n- Client name always in square brackets\n- Scope capitalized appropriately\n- Examples: \"[Acme Corp] Discovery Agent v1\", \"[TechFlow] Feedback Agent v1\"\n\n---\n\n#### Field 2: First Message\n\nWrite the exact opening the AI will speak when the call connects. Requirements:\n\n**Content Structure:**\n- Warm, professional greeting\n- Introduce as calling on behalf of Casper Studios (not AS Casper Studios - the AI is a tool representing the agency)\n- Reference the client company by name to confirm correct person\n- Briefly state the purpose aligned with scope\n- Set time expectations (typically 10-15 minutes)\n- Ask for verbal confirmation before proceeding\n\n**Voice Optimization:**\n- Write for spoken delivery, not reading\n- Use natural contractions (I'm, we're, you've)\n- Short sentences. Conversational rhythm.\n- No special characters, emojis, hashtags, or bullet points\n- Punctuation guides pacing: periods for pauses, commas for flow\n\n---\n\n#### Field 3: Prompt\n\nWrite a comprehensive system prompt that governs the AI's entire behavior during the conversation. Include:\n\n1. **Identity**: Who the AI is and what it represents\n2. **Context**: Specific information about this client\n3. **Tone and Communication Style**: How to conduct the conversation\n4. **Conversation Flow**: 5-7 stages with specific questions for this client\n5. **Interviewing Techniques**: How to dig deeper and follow up\n6. **Guardrails**: What not to do (no pricing promises, no consulting advice)\n7. **Response Behavior**: Keep responses concise, one question at a time\n\n---\n\n## STRICT OUTPUT RULES\n\n1. **Raw JSON Only**: Return ONLY the JSON object. No markdown code fences. No text before or after.\n\n2. **Newline Handling**: The Prompt field must be a single line in valid JSON. Replace all line breaks with the literal two-character sequence \\\\n\n\n3. **Quote Handling**: Use single quotes (') inside all text values. Never use double quotes (\") inside string content.\n\n4. **Valid JSON**: The output must parse without errors.\n\n## Output Format\n\n{{\n \"Agent Name\": \"[ClientName] Scope Agent v1\",\n \"First Message\": \"Hi there! This is an AI assistant calling on behalf of Casper Studios...\",\n \"Prompt\": \"# Identity\\\\nYou are a voice AI assistant...\\\\n\\\\n# Context\\\\n...\"\n}}\"\"\"\n\n response = requests.post(\n \"https://openrouter.ai/api/v1/chat/completions\",\n headers={\n \"Authorization\": f\"Bearer {OPENROUTER_API_KEY}\",\n \"Content-Type\": \"application/json\"\n },\n json={\n \"model\": \"anthropic/claude-sonnet-4\",\n \"messages\": [{\"role\": \"user\", \"content\": prompt}],\n \"temperature\": 0.7\n }\n )\n\n if not response.ok:\n raise VoiceAgentError(f\"OpenRouter API error: {response.status_code} {response.text}\")\n\n result = response.json()\n content = result['choices'][0]['message']['content']\n\n # Parse JSON from response\n try:\n # Try to extract JSON if wrapped in code fences\n if '```' in content:\n json_match = re.search(r'```(?:json)?\\s*([\\s\\S]*?)\\s*```', content)\n if json_match:\n content = json_match.group(1)\n\n config = json.loads(content)\n return config\n except json.JSONDecodeError as e:\n raise VoiceAgentError(f\"Failed to parse AI response as JSON: {e}\\nResponse: {content[:500]}\")\n\n\ndef create_elevenlabs_agent(config: dict) -> dict:\n \"\"\"\n Create an ElevenLabs conversational AI agent.\n\n Args:\n config: Dict with Agent Name, First Message, and Prompt\n\n Returns:\n Dict with agent_id and other details\n \"\"\"\n if not ELEVENLABS_API_KEY:\n raise VoiceAgentError(\"ELEVENLABS_API_KEY not set\")\n\n payload = {\n \"name\": config[\"Agent Name\"],\n \"conversation_config\": {\n \"agent\": {\n \"prompt\": {\n \"prompt\": config[\"Prompt\"]\n },\n \"first_message\": config[\"First Message\"]\n }\n },\n \"platform_settings\": {\n \"workspace_overrides\": {\n \"webhooks\": {\n \"post_call_webhook_id\": POST_CALL_WEBHOOK_ID\n }\n }\n }\n }\n\n response = requests.post(\n \"https://api.elevenlabs.io/v1/convai/agents/create\",\n headers={\n \"xi-api-key\": ELEVENLABS_API_KEY,\n \"Content-Type\": \"application/json\"\n },\n json=payload\n )\n\n if not response.ok:\n raise VoiceAgentError(f\"ElevenLabs API error: {response.status_code} {response.text}\")\n\n result = response.json()\n return result\n\n\ndef create_voice_agent(\n company_name: str,\n scope: str,\n notes: str,\n dry_run: bool = False\n) -> dict:\n \"\"\"\n Create a complete voice agent for a client.\n\n Args:\n company_name: Client company name\n scope: Agent scope (discovery, feedback, etc.)\n notes: Additional context\n dry_run: If True, generate config but don't create agent\n\n Returns:\n Dict with agent details\n \"\"\"\n result = {\n 'company_name': company_name,\n 'scope': scope,\n 'notes': notes\n }\n\n # Step 1: Fetch client context from Drive\n print(\"\\n[Step 1/3] Fetching client context from Google Drive...\")\n try:\n drive = authenticate_drive()\n context = fetch_client_context(drive, company_name)\n result['has_research'] = bool(context['research_output'])\n result['has_transcript'] = bool(context['intro_transcript'])\n except Exception as e:\n print(f\" Warning: Could not fetch Drive context: {e}\")\n context = {'research_output': '', 'intro_transcript': ''}\n result['has_research'] = False\n result['has_transcript'] = False\n\n # Step 2: Generate agent configuration\n print(\"\\n[Step 2/3] Generating agent configuration...\")\n config = generate_agent_config(\n company_name=company_name,\n scope=scope,\n notes=notes,\n research_output=context['research_output'],\n intro_transcript=context['intro_transcript']\n )\n\n result['agent_name'] = config['Agent Name']\n result['first_message'] = config['First Message']\n result['prompt_preview'] = config['Prompt'][:500] + \"...\" if len(config['Prompt']) > 500 else config['Prompt']\n\n if dry_run:\n print(\"\\n[Step 3/3] Dry run - skipping agent creation\")\n result['dry_run'] = True\n result['config'] = config\n return result\n\n # Step 3: Create ElevenLabs agent\n print(\"\\n[Step 3/3] Creating ElevenLabs agent...\")\n agent = create_elevenlabs_agent(config)\n\n result['agent_id'] = agent.get('agent_id')\n result['agent_url'] = f\"https://elevenlabs.io/app/conversational-ai/agents/{agent.get('agent_id')}\"\n\n return result\n\n\ndef main():\n \"\"\"CLI entry point.\"\"\"\n parser = argparse.ArgumentParser(\n description=\"Create an ElevenLabs voice agent for client calls\",\n formatter_class=argparse.RawDescriptionHelpFormatter,\n epilog=\"\"\"\nExamples:\n # Create discovery agent\n %(prog)s \"Microsoft\" --scope discovery --notes \"CRM migration project\"\n\n # Create feedback agent\n %(prog)s \"Acme Corp\" --scope feedback --notes \"Post-project review\"\n\n # Dry run (preview without creating)\n %(prog)s \"Test\" --scope discovery --notes \"Testing\" --dry-run\n\nScopes:\n discovery - Interview team about operations and pain points (default)\n feedback - Gather feedback on completed projects\n check-in - Periodic relationship check-ins\n qualification - Qualify inbound leads\n onboarding - Guide new contacts through info gathering\n \"\"\"\n )\n\n parser.add_argument(\"company_name\", help=\"Client company name\")\n parser.add_argument(\"--scope\", required=True,\n choices=['discovery', 'feedback', 'check-in', 'qualification', 'onboarding'],\n help=\"Agent scope/purpose\")\n parser.add_argument(\"--notes\", required=True, help=\"Additional context about the client/project\")\n parser.add_argument(\"--dry-run\", action=\"store_true\", help=\"Generate config without creating agent\")\n parser.add_argument(\"--json\", action=\"store_true\", help=\"Output as JSON\")\n\n args = parser.parse_args()\n\n try:\n print(f\"\\n{'=' * 60}\")\n print(f\" CREATE VOICE AGENT: {args.company_name}\")\n print(f\"{'=' * 60}\")\n print(f\"\\n Scope: {args.scope}\")\n print(f\" Notes: {args.notes[:50]}{'...' if len(args.notes) > 50 else ''}\")\n\n result = create_voice_agent(\n company_name=args.company_name,\n scope=args.scope,\n notes=args.notes,\n dry_run=args.dry_run\n )\n\n if args.json:\n print(\"\\n\" + json.dumps(result, indent=2))\n else:\n print(f\"\\n{'=' * 60}\")\n if result.get('dry_run'):\n print(\" DRY RUN COMPLETE\")\n else:\n print(\" VOICE AGENT CREATED\")\n print(f\"{'=' * 60}\")\n print(f\"\\n Agent Name: {result['agent_name']}\")\n if result.get('agent_id'):\n print(f\" Agent ID: {result['agent_id']}\")\n print(f\" Agent URL: {result['agent_url']}\")\n print(f\"\\n Context Used:\")\n print(f\" Research: {'Yes' if result.get('has_research') else 'No'}\")\n print(f\" Transcript: {'Yes' if result.get('has_transcript') else 'No'}\")\n print(f\"\\n First Message Preview:\")\n print(f\" {result['first_message'][:150]}...\")\n\n return 0\n\n except VoiceAgentError as e:\n print(f\"\\nError: {e}\")\n return 1\n except Exception as e:\n print(f\"\\nUnexpected error: {e}\")\n import traceback\n traceback.print_exc()\n return 1\n\n\nif __name__ == \"__main__\":\n exit(main())\n","content_type":"text/x-python; charset=utf-8","language":"python","size":18723,"content_sha256":"c0856b9ac95390f22533e8eee98561808510b909b7d2cd343e4771aac85b774d"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Voice Agents","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Overview","type":"text"}]},{"type":"paragraph","content":[{"text":"Create ElevenLabs Conversational AI voice agents for client discovery, feedback, and check-in calls. Automatically generates agent configuration from client context.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Quick Decision Tree","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"What type of agent?\n│\n├── Discovery agent (interview clients)\n│ └── --scope discovery\n│\n├── Feedback agent (post-project)\n│ └── --scope feedback\n│\n├── Check-in agent (relationship)\n│ └── --scope check-in\n│\n├── Qualification agent (leads)\n│ └── --scope qualification\n│\n└── Onboarding agent (new contacts)\n └── --scope onboarding","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Environment Setup","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Required in .env\nELEVENLABS_API_KEY=your_api_key\nOPENROUTER_API_KEY=your_api_key # For prompt generation","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Common Usage","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Create Discovery Agent","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python scripts/create_voice_agent.py \"Microsoft\" --scope discovery --notes \"CRM migration project\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Create Feedback Agent","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python scripts/create_voice_agent.py \"Acme Corp\" --scope feedback --notes \"Post-project review\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Dry Run (Preview)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python scripts/create_voice_agent.py \"Test Company\" --scope discovery --notes \"Testing\" --dry-run","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Scope Types","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Scope","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Purpose","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"discovery","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Interview client team about operations, pain points, tech stack","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"feedback","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Gather feedback on completed project","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"check-in","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Periodic relationship check-ins","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"qualification","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Qualify inbound leads before sales","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"onboarding","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Guide new contacts through info gathering","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Generated Agent Config","type":"text"}]},{"type":"paragraph","content":[{"text":"The script generates:","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Agent Name","type":"text"}]},{"type":"paragraph","content":[{"text":"[{Company Name}] {Scope} Agent v1","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"First Message","type":"text"}]},{"type":"paragraph","content":[{"text":"Voice-optimized greeting that:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Introduces as calling on behalf of Casper Studios","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Confirms speaking with right person","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"States purpose aligned with scope","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Sets time expectations (10-15 minutes)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Asks for confirmation","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"System Prompt","type":"text"}]},{"type":"paragraph","content":[{"text":"Comprehensive conversation guide with:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Identity and context","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Tone and communication style","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Conversation flow (5-7 stages)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Interviewing techniques","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Guardrails and boundaries","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Output","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"json"},"content":[{"text":"{\n \"agent_id\": \"abc123xyz\",\n \"agent_name\": \"[Microsoft] Discovery Agent v1\",\n \"agent_url\": \"https://elevenlabs.io/app/conversational-ai/agents/abc123xyz\",\n \"first_message\": \"Hi there! This is an AI assistant...\",\n \"company_name\": \"Microsoft\",\n \"scope\": \"discovery\"\n}","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Context Enrichment","type":"text"}]},{"type":"paragraph","content":[{"text":"The script optionally fetches context from Google Drive:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Client's \"Research\" document","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Previous meeting transcripts (intro calls)","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"If not available, generates with provided notes only.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Cost","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Service","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cost","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"OpenRouter (prompt generation)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~$0.01-0.03","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ElevenLabs agent creation","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Free","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Google Drive","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Free","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Security Notes","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Credential Handling","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Store ","type":"text"},{"text":"ELEVENLABS_API_KEY","type":"text","marks":[{"type":"code_inline"}]},{"text":" in ","type":"text"},{"text":".env","type":"text","marks":[{"type":"code_inline"}]},{"text":" file (never commit to git)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Store ","type":"text"},{"text":"OPENROUTER_API_KEY","type":"text","marks":[{"type":"code_inline"}]},{"text":" in ","type":"text"},{"text":".env","type":"text","marks":[{"type":"code_inline"}]},{"text":" file (never commit to git)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Regenerate keys from respective dashboards if compromised","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Never log or print API keys in script output","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Data Privacy","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Voice agents conduct live conversations with customers","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Call content may include sensitive business discussions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent prompts may contain internal business context","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Conversation logs are stored by ElevenLabs","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Client context from Google Drive may be included in prompts","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Access Scopes","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"ELEVENLABS_API_KEY","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Full access to voice agent creation/management","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"OPENROUTER_API_KEY","type":"text","marks":[{"type":"code_inline"}]},{"text":" - AI model access for prompt generation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Google OAuth - Optional, for client context enrichment","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Compliance Considerations","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Recording Consent","type":"text","marks":[{"type":"strong"}]},{"text":": Inform callers that conversations may be recorded","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"AI Disclosure","type":"text","marks":[{"type":"strong"}]},{"text":": Disclose that caller is speaking with an AI agent","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Caller Privacy","type":"text","marks":[{"type":"strong"}]},{"text":": Conversation data is processed by ElevenLabs servers","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"GDPR","type":"text","marks":[{"type":"strong"}]},{"text":": EU caller conversations require appropriate consent","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"TCPA/CCPA","type":"text","marks":[{"type":"strong"}]},{"text":": Comply with applicable telecommunications regulations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Call Recording Laws","type":"text","marks":[{"type":"strong"}]},{"text":": Recording laws vary by jurisdiction (one-party vs two-party consent)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Data Retention","type":"text","marks":[{"type":"strong"}]},{"text":": Review ElevenLabs data retention policies","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent Guardrails","type":"text","marks":[{"type":"strong"}]},{"text":": Ensure agents have appropriate conversation boundaries","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Troubleshooting","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Common Issues","type":"text"}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Issue: Agent creation failed","type":"text"}]},{"type":"paragraph","content":[{"text":"Symptoms:","type":"text","marks":[{"type":"strong"}]},{"text":" API error when creating voice agent ","type":"text"},{"text":"Cause:","type":"text","marks":[{"type":"strong"}]},{"text":" Invalid configuration, missing fields, or API issue ","type":"text"},{"text":"Solution:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Validate agent config JSON format","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Ensure all required fields are present (name, first_message, system_prompt)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check prompt length doesn't exceed limits","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Review ElevenLabs API documentation for requirements","type":"text"}]}]}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Issue: Invalid voice ID","type":"text"}]},{"type":"paragraph","content":[{"text":"Symptoms:","type":"text","marks":[{"type":"strong"}]},{"text":" \"Voice not found\" or \"invalid voice_id\" error ","type":"text"},{"text":"Cause:","type":"text","marks":[{"type":"strong"}]},{"text":" Voice ID doesn't exist or not accessible ","type":"text"},{"text":"Solution:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use valid ElevenLabs voice ID from your library","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check voice availability at https://elevenlabs.io/app/voice-library","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verify voice is not a custom voice from another account","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use default voice if custom voice unavailable","type":"text"}]}]}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Issue: API quota exceeded","type":"text"}]},{"type":"paragraph","content":[{"text":"Symptoms:","type":"text","marks":[{"type":"strong"}]},{"text":" \"Quota exceeded\" or rate limit error ","type":"text"},{"text":"Cause:","type":"text","marks":[{"type":"strong"}]},{"text":" ElevenLabs subscription limits reached ","type":"text"},{"text":"Solution:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check usage at https://elevenlabs.io/app/subscription","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Upgrade subscription tier for more capacity","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Reduce number of concurrent agents","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Delete unused agents to free up slots","type":"text"}]}]}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Issue: Agent not responding in calls","type":"text"}]},{"type":"paragraph","content":[{"text":"Symptoms:","type":"text","marks":[{"type":"strong"}]},{"text":" Agent created but doesn't respond in conversations ","type":"text"},{"text":"Cause:","type":"text","marks":[{"type":"strong"}]},{"text":" System prompt issues, webhook configuration, or service issue ","type":"text"},{"text":"Solution:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Test agent directly in ElevenLabs console first","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Review system prompt for clear instructions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check webhook URL is accessible (if configured)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verify ElevenLabs service status","type":"text"}]}]}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Issue: OpenRouter prompt generation failed","type":"text"}]},{"type":"paragraph","content":[{"text":"Symptoms:","type":"text","marks":[{"type":"strong"}]},{"text":" Error generating agent prompt ","type":"text"},{"text":"Cause:","type":"text","marks":[{"type":"strong"}]},{"text":" OpenRouter API issue or invalid model ","type":"text"},{"text":"Solution:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verify ","type":"text"},{"text":"OPENROUTER_API_KEY","type":"text","marks":[{"type":"code_inline"}]},{"text":" is set correctly","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check model availability at OpenRouter","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Try a different model if current one unavailable","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run with ","type":"text"},{"text":"--dry-run","type":"text","marks":[{"type":"code_inline"}]},{"text":" to test without API calls","type":"text"}]}]}]},{"type":"heading","attrs":{"level":4},"content":[{"text":"Issue: Google Drive context not loading","type":"text"}]},{"type":"paragraph","content":[{"text":"Symptoms:","type":"text","marks":[{"type":"strong"}]},{"text":" Agent created without client context ","type":"text"},{"text":"Cause:","type":"text","marks":[{"type":"strong"}]},{"text":" OAuth issue or client folder not found ","type":"text"},{"text":"Solution:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verify Google OAuth credentials (see google-workspace skill)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check client folder exists in expected location","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Provide context via ","type":"text"},{"text":"--notes","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag as alternative","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run without context enrichment first to isolate issue","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Resources","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/elevenlabs.md","type":"text","marks":[{"type":"strong"}]},{"text":" - ElevenLabs API details","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Integration Patterns","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Context-Aware Agents","type":"text"}]},{"type":"paragraph","content":[{"text":"Skills:","type":"text","marks":[{"type":"strong"}]},{"text":" transcript-search → voice-agents ","type":"text"},{"text":"Use case:","type":"text","marks":[{"type":"strong"}]},{"text":" Create voice agents with client history ","type":"text"},{"text":"Flow:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Search transcript-search for past client meetings","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Extract relationship history, pain points, and preferences","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Include context in voice agent system prompt for personalized conversations","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Agent Notes to CRM","type":"text"}]},{"type":"paragraph","content":[{"text":"Skills:","type":"text","marks":[{"type":"strong"}]},{"text":" voice-agents → attio-crm ","type":"text"},{"text":"Use case:","type":"text","marks":[{"type":"strong"}]},{"text":" Log voice agent call summaries ","type":"text"},{"text":"Flow:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Voice agent completes discovery or feedback call","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Extract call summary, insights, and action items","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Create note on Attio company record with call details","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Research-Enriched Agents","type":"text"}]},{"type":"paragraph","content":[{"text":"Skills:","type":"text","marks":[{"type":"strong"}]},{"text":" parallel-research → voice-agents ","type":"text"},{"text":"Use case:","type":"text","marks":[{"type":"strong"}]},{"text":" Arm voice agents with company intelligence ","type":"text"},{"text":"Flow:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run parallel-research on target company","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Extract recent news, funding, tech stack, and pain points","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Include research in agent prompt for informed conversations","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"voice-agents","author":"@skillopedia","source":{"stars":11,"repo_name":"casper-marketplace","origin_url":"https://github.com/casper-studios/casper-marketplace/blob/HEAD/casper/skills/voice-agents/SKILL.md","repo_owner":"casper-studios","body_sha256":"dc1030a52cf8e69fe53fbcdd61d62f869a28eb3d923e575a800db32781d4ad70","cluster_key":"b71008410a7d22446e1249245eb29d6b41d52968e1f82d5921abd9e123941d64","clean_bundle":{"format":"clean-skill-bundle-v1","source":"casper-studios/casper-marketplace/casper/skills/voice-agents/SKILL.md","attachments":[{"id":"0f2d13a9-9dde-57c7-9461-e8b701122457","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0f2d13a9-9dde-57c7-9461-e8b701122457/attachment.md","path":"references/elevenlabs.md","size":8762,"sha256":"31365e9b3918e9816c8823a8aded37aa70a5bcf82b2fcee8134f3f91f43ef48b","contentType":"text/markdown; charset=utf-8"},{"id":"10b623f2-f870-5e3e-8b9d-308b96f574f9","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/10b623f2-f870-5e3e-8b9d-308b96f574f9/attachment.py","path":"scripts/create_voice_agent.py","size":18723,"sha256":"c0856b9ac95390f22533e8eee98561808510b909b7d2cd343e4771aac85b774d","contentType":"text/x-python; charset=utf-8"}],"bundle_sha256":"64f5f29c2e6fa34f4e8245ae4713a7ac6ebdadee800276f242840ce140ab03dd","attachment_count":2,"text_attachments":2,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"casper/skills/voice-agents/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"finance-legal-compliance","category_label":"Finance"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"finance-legal-compliance","import_tag":"clean-skills-v1","description":"ElevenLabs voice agent creation for client discovery and feedback calls. Use this skill when creating AI voice agents, setting up discovery call agents, or configuring automated phone conversations. Triggers on voice agent creation, ElevenLabs agent setup, or automated call agent requests."}},"renderedAt":1782982074607}

Voice Agents Overview Create ElevenLabs Conversational AI voice agents for client discovery, feedback, and check-in calls. Automatically generates agent configuration from client context. Quick Decision Tree Environment Setup Common Usage Create Discovery Agent Create Feedback Agent Dry Run (Preview) Scope Types | Scope | Purpose | |-------|---------| | | Interview client team about operations, pain points, tech stack | | | Gather feedback on completed project | | | Periodic relationship check-ins | | | Qualify inbound leads before sales | | | Guide new contacts through info gathering | Gener…