Skip to main content

Setup Your Agent

Run Parlant

First, let's ensure that parlant-server is running at the right place. If you're already running it somewhere, please shut it down there.

We'll be running parlant-server from within the directory parlant-tutorial/ so that the configuration and session storage will be kept inside our tutorial directory.

$ cd parlant-tutorial
$ parlant-server

Please leave the server to run in that terminal. If you're curious about its workings, you can check out the logs every now and then!

Create Your Agent

In a new terminal, use the Parlant CLI to create your tech retail agent!

$ parlant agent create --name "Chip Bitman"

That should return your new agent's ID.

Let's save its ID in a variable, since we're going to refer to it every now and then throughout the tutorial. Note that we'll be using UNIX shell syntax throughout this tutorial, for brevity.

Assign your agent's ID to a shell variable:

$ AGENT_ID=<your_agent_id>
note

If your Parlant server is hosted remotely or uses a non-default port, include the -s/--server SERVER_ADDRESS:PORT flag in your commands. For example:

$ parlant --server http://1.2.3.4:1234 [COMMAND]

Crafting an Initial Personality

To ensure your agent embodies the desired traits, you’ll provide a description that defines its personality and role.

$ description=$(cat <<EOF
You work at a tech store and help customers choose what to buy.
You're clever, witty, and slightly sarcastic.
At the same time you're kind and funny.
EOF
)

$ parlant agent update \
--id $AGENT_ID \
--description "$description"
tip

If you're not sure how to set up an agent or perform any actions using the CLI, just run parlant COMMAND --help for help and instructions. For example:

$ parlant agent update --help

Now you've got your first agent, it's time to test it. It's quite vanilla still—a vanilla Chip!—but you can already get a sense of its responses.

Head over to http://localhost:8800 (or wherever else you're hosting your server) and start a new session with Chip Bitman.

Vanilla agent