Already created an agent in the Playground?
Other guides might be a better starting point for you.Deploy and call your first agent
Prerequisites
- ●A free Cartesia account, sign up here.
- ●Access to a terminal on your local machine.
1
Install the CLI
2
Connect to Cartesia
Authenticate with your Cartesia account. This will prompt you to add an API key from your playground.Verify authentication succeeded.
3
Clone a Line template locally
Clone a simple chat template using the CLI.
4
Initialize your agent
Link your local template to a Cartesia agent.You’ll see a success message with a link to your agent in the playground.
5
Deploy your agent
Deploy your agent to make it available in the playground.You’ll see deployment progress with a status command to track it.
6
Talk to your agent
Your agent should deploy in < 1 minute. Use the CLI to have your agent call your phone number.Or visit the Playground to call your agent from the web interface.
Setup local agent development
Now let’s set up your local environment to iterate on your agent.Additional Prerequisites
- ●Python 3.9+ installed on your machine.
- ○A Gemini API key (recommended for intelligent responses).(optional)
1
Install dependencies
Choose your preferred Python package manager.
2
(Optional) Setup your LLM API key
Set your Gemini API key to connect a language model.If you choose to skip this step, your agent will continue to give canned answers.
Line supports integrations with any LLM provider of your choice.
3
Chat locally with your template
Open two terminals. In the first, start the server.In the second terminal, chat with your agent.
This is a nifty way to test your agent’s reasoning and responses locally.

Customize and redeploy your agent
Let’s customize your agent’s personality and voice to make it truly unique.1
Customize your agent
Open Update the initial message in
config.py and modify SYSTEM_PROMPT to set your agent’s personality.config.py
main.py in the handle_new_call function.main.py
2
(Optional) Set remote environment variables
If you set a Gemini API key earlier, make it available to your deployed agent. Your prompt change will have no effect without this key.
Make sure to run this command in the same terminal where you previously set the
GEMINI_API_KEY environment variable.3
Redeploy your changes
Verify that you’re in the
simple-chat-example folder and redeploy your changes.4
Check deployment status
Check that your deployment is ready and get your agent URL.Visit your agent page in the Playground using the URL from the status command.
5
Update voice in the Playground
On your agent page, go to Configuration. Change the voice to “Stern French Man” to match your chef personality.

6
Call your custom agent