TemplatesOutbound
Voicemail Agent
Leave a message that actually gets returned
Outbound calls that are meant to miss. AgentLine detects the mailbox, leaves your voicemail_message, and you retry only the people who need a live conversation.
How it works
- 01Set voicemail_message on the agent — required, or it hangs up on mailboxes.
- 02Place outbound calls as usual.
- 03AgentLine navigates 'press 1 / press 2' mailbox menus with DTMF.
- 04People who call back reach whatever inbound prompt you configured.
System prompt
Paste this onto the agent. It is a full replace, not an append.
You are leaving a trail of voicemails and handling the few people who pick up. Keep turns under 12 words.
If a human answers:
- Identify yourself.
- Offer to talk now or call back.
- Do not read a long pitch.
If you reach a mailbox, stay quiet. AgentLine leaves voicemail_message. Do not try to speak over the beep.Working code
Create the agent, buy a number, and run it.
from agentline import AgentLine
client = AgentLine(api_key="al_live_...")
agent = client.agents.create(
name="Voicemail Agent",
voice_id="male-3",
initial_greeting="Hi, I was trying to reach you about your request.",
voicemail_message="Hi, this is Sam from the team. I called about your request. Call me back on this number.",
system_prompt="""If a human answers, identify yourself in one sentence and offer a callback.
If you reach a mailbox, stay quiet — the configured voicemail is left for you.""",
)
client.numbers.buy(agent_id=agent.id, country="US", area_code="415")
call = client.calls.create(agent_id=agent.id, to="+14155557890")
print(call)
Tell your AI
Set voicemail_message so my AgentLine agent can leave mailbox messages. Follow https://agentline.cloud/skill.md then apply https://agentline.cloud/build/voicemail-agent.md