# Write the character

> Deepgram workshops › Build a voice agent › Mission 05: Mystery guest › Section 2 of 5
> Web version: https://workshops.deepgram.com/voice-agent/stay-in-character/write-the-character
> About 20 min (estimate). Check it: `make check 05` (offline, no key).

## Fill in the template

**Goal:** Fill in two fields so your agent plays the figure and hints at who it is without saying the name.

The prompt is a template, a script with blanks for you to fill. Two fields fill the blanks, and the secret name stays on the server.

**Do:** Fill in **Era and work** and **How they talk**. Keep the name out of both. That's the only edit.

_On the web page, this step has the Settings panel; in your own code the same settings are in the start file._

The code tabs below show the same name swap in a server you'd write. It runs on the server, never in the browser.

_On the web page, this step shows the code panel with the matching code._

**You should see:** your two lines in the fields, with no name in either. Playing solo with **Just me: surprise me**? Leave both fields empty, and the server describes the figure.

## Talk to it

There's no greeting, so the agent waits for you to speak first.

**Do:** Tap **Start the agent** and ask what it does all day.

**Listen for:** a clue.

_On the web page, this step has the agent console: talk or type to the agent there, or run the same mission in your own code._

**Check:** It has a personality and a secret.

**You should see:** an answer in character with a clue in it, and the check passing. If it says the character is still blank, fill in **Era and work** and **How they talk**. Or replace `[ONE_OR_TWO_LINES]` in the Prompt, then tap **Reconnect and apply**.

**How it works**

Example: **Era and work** "Renaissance Florence, painter and engineer", **How they talk** "curious about everything, answers a question with a question." Rather edit the prompt? Replace `[ONE_OR_TWO_LINES]` on its first line instead.

Pick a **Voice** that fits, and for a big personality push **Expressivity** up a notch.

**Where the name gets in.** **Settings JSON** is exactly what this browser sends, and the prompt still says `{{secret}}`. The server swaps the name in on its own copy, the one that goes to Deepgram.

**What every line does.**

- Era, work and how you talk: filled from your two fields, the clues the agent plays from. Keep the name out of it.
- The secret identity, and never confirm until guessed: the server fills in the name. "Are you Napoleon?" gets no confirmation. Trait questions such as "are you a painter?" are fair play. Only a correct guess ends it.
- Speak aloud, one to three sentences: keeps out bullet points, asterisks, and monologues.
- One true detail per answer: a clue each turn, so the guesser has something to work with.
- Nothing after your death: most of the comedy. Ask it about phones.
- The AI question: the one sanctioned break. Asked what it is, it answers plainly, then goes back into the role.
