Skip to main content
The Import from JSON method allows developers and platform teams to manage voice agents as code (GitOps). You can version-control your entire agent definition in Git, review diffs across pull requests, and deploy agent updates reproducibly across development, staging, and production environments.
Vaani Create Agent Menu showing Import from JSON

How to Import an Agent from JSON

1

Select 'Import from JSON'

In the Vaani Dashboard, click + New Agent and select Import from JSON.
2

Upload or Paste JSON Configuration

You can either drag and drop a .json configuration file or paste your JSON payload directly into the built-in syntax-highlighting code editor.
3

Validation and Linting

Vaani automatically validates the schema in real-time, verifying required keys, provider compatibility, and variable formatting.
4

Create Agent

Click Import Agent. Vaani instantiates the agent, sets up the pipeline, and generates a new agent_id.

Agent JSON Schema Specification

The import file uses the same format as Export JSON, so the quickest way to get a valid starting point is to export an existing agent (see below) or click Use sample format directly in the import dialog. Below is the minimal template - replace every value that starts with REPLACE::

Rules that keep the import valid

The system prompt must be at persona.identity.system_prompt. A top-level "system_prompt" key passes validation but is not used - the agent is created with an empty system prompt.
  • Strict JSON only: double quotes, no trailing commas, no comments, no ....
  • No raw line breaks inside strings. Write line breaks in the system prompt as \n (a pasted file with an actual line break inside a string fails with Invalid JSON syntax).
  • Greeting: the first thing the agent says is persona.identity.greeting_message.agent_message.
  • Variables: every {{variable}} used in the prompt or greeting must be a key in both metadata and persona.metadata, with a non-empty sample value (empty values are discarded on import).
  • Keep the structure: do not rename, move or add sections. Keep the provider, model and voice values unless you want to change them; if a provider or voice is unavailable on your account, the dialog asks you to pick a replacement before importing.
  • agent_id, timestamps, phone numbers and secrets are cleared on import.

Generating the file with an AI assistant

In the dashboard header menu, choose Copy Developer Prompt and paste it into Claude, ChatGPT or Cursor, then describe the agent you want. The prompt contains this template and the rules above, so the assistant returns a file you can paste directly into Import from JSON.

Exporting Existing Agents to JSON

You can also export any existing agent back to JSON at any time:
  1. Open your agent in the Vaani Dashboard.
  2. Go to the Overview tab.
  3. Click the three dots menu ... in the upper right corner and select Export JSON.
  4. Save the file directly to your code repository.

Next Steps

Agent API Reference

Create and update agents programmatically using the REST API

Configuring Your Agent

Explore the 6 core configuration pillars of your imported agent