Deploying Agents

Deploy versioned prompts and tools to voice agent providers
View as Markdown

Agents in Elacity combine a versioned prompt, tools, provider configuration, and an environment into a single deployable unit. When you deploy an agent, Elacity compiles everything together and pushes it to your target provider (e.g. VAPI, Ultravox, or Telnyx).

This guide walks through deploying a simple voice agent to VAPI with a versioned prompt and an API request tool.

Prerequisites

Before deploying, make sure you have:

  • A prompt registry with at least one published prompt
  • An environment with VAPI provider credentials configured
  • A VAPI account with an API key (added to your environment’s provider config)

Example: Deploy a VAPI Voice Agent

This example creates a simple customer-lookup agent that can query an external API during a call.

1

Create a prompt in your registry

Publish a prompt to your registry. For this example, we’ll use a prompt called customer-lookup at version 1.0.0:

You are a helpful customer service agent for {{COMPANY_NAME}}.
When a caller asks about their account, use the lookup_customer tool
to retrieve their information by phone number or email.
Be concise, friendly, and professional. If you cannot find the
caller's account, offer to transfer them to a human agent.

The {{COMPANY_NAME}} variable will be replaced with the value from your environment at deployment time.

Publish a prompt to the registry

2

Create an API request tool

Navigate to Tools and create a new tool with the following configuration:

Tool settings:

FieldValue
Namelookup_customer
TypeAPI Request
DescriptionLook up a customer by phone number or email
Version1.0.0

Provider configuration (VAPI):

1{
2 "method": "GET",
3 "url": "https://api.yourcompany.com/customers/lookup",
4 "headers": {
5 "Authorization": "Bearer ${CUSTOMER_API_KEY}"
6 },
7 "function": {
8 "name": "lookup_customer",
9 "parameters": {
10 "type": "object",
11 "properties": {
12 "phone": {
13 "type": "string",
14 "description": "Customer phone number"
15 },
16 "email": {
17 "type": "string",
18 "description": "Customer email address"
19 }
20 }
21 }
22 },
23 "timeoutSeconds": 10
24}

The ${CUSTOMER_API_KEY} variable is resolved from your environment’s secrets at deployment time — the actual key is never embedded in the tool definition.

Create an API request tool

3

Create an agent

Navigate to Agents and click Create Agent. Configure it with:

FieldValue
NameCustomer Lookup Agent
Stable Keycustomer-lookup-agent
ProviderVAPI
Promptcustomer-lookup@1.0.0
Toolslookup_customer@^1.0.0

Provider configuration:

1{
2 "model": {
3 "provider": "openai",
4 "model": "gpt-4o",
5 "temperature": 0.3
6 },
7 "voice": {
8 "provider": "vapi",
9 "voiceId": "sarah"
10 },
11 "transcriber": {
12 "provider": "deepgram",
13 "model": "nova-2",
14 "language": "en"
15 },
16 "firstMessage": "Hi, thanks for calling! How can I help you today?"
17}

Create and configure the agent

4

Preview the deployment

Before deploying, preview what will be sent to VAPI. Click Deploy and select your target environment (e.g. dev).

The deployment preview shows:

  • The compiled prompt with variables resolved and promptlets expanded
  • Tools that will be attached to the agent
  • The full provider configuration
  • A content hash for drift detection

Preview the deployment

5

Deploy

Confirm and dispatch the deployment. Elacity will:

  1. Compile the prompt with environment-specific variables
  2. Deploy the tool to VAPI (creating it if new, updating if changed)
  3. Create or update the VAPI assistant with the compiled prompt and attached tools
  4. Record the deployment for audit and drift detection

Deployment in progress

Once complete, the agent status will show as Healthy with the deployed version and environment.

Successful deployment

What Happens During Deployment

When you deploy an agent, Elacity orchestrates the following behind the scenes:

  1. Prompt compilation — the raw prompt is fetched from the registry, promptlets are inlined, environment variables are substituted, and model-specific preprocessors run
  2. Tool deployment — each referenced tool is created or updated in the provider’s system (e.g. VAPI tool API)
  3. Agent deployment — the provider assistant is created or updated with the compiled prompt, tool references, model settings, and voice configuration
  4. Hash recording — a content hash of the entire deployment is stored for drift detection; if someone changes the agent directly in VAPI, Elacity will flag it as “drifted”

Deployment Features

Approval Gates

For sensitive environments (e.g. prod), you can enable approval gates that require team members to approve a deployment before it executes. Configure this in your environment settings.

Drift Detection

After deployment, Elacity can verify that the agent in the provider still matches what was deployed. If someone modifies the agent directly in VAPI (outside of Elacity), the agent status changes to Drifted so you can investigate and redeploy if needed.

Rollbacks

Because every prompt version is immutable, rolling back is as simple as redeploying a previous version. Select the prior version in the deployment flow and deploy — the agent will be updated to match the older prompt.

Next steps