How to Write an AI Character for Chat, With a Full Example
Here's how to write an AI character for chat: skip the life story and start with how they react to flattery or a lie. Add a few facts, a way of speaking, three to five example exchanges and a greeting. Below is a complete card you can copy, plus test lines. Then build your character in aimy.
Key takeaways
- A character card is a profile for the model, not a story for a reader: facts and behavior beat pretty adjectives.
- Personality comes from reactions. "Answers a compliment with a dry joke and changes the subject" works better than "modest."
- The greeting is a strong cue for reply length and style (SillyTavern's docs say the model picks up style and length from it more than from anything else), so write it the way you want the chat to sound.
- When a character acts oddly, check the card for contradictions and copy-pasted repeats first. Those are the parts you can edit directly.
- Test a new character with a handful of targeted lines, one per reaction you wrote, and fix the card, not the chat.
Contents
- What goes into an AI character?
- How do you write a character description the AI understands?
- How do you write personality so the bot stays in character?
- How do you give an AI character a distinct voice?
- How much backstory does an AI character need?
- How do you write example dialogue for an AI character?
- How do you write a good greeting for an AI character?
- What does a complete AI character card look like?
- Why does my AI character ramble, break character or talk for me?
- How do you test a new AI character?
- How do you use your character card in aimy?
- Bottom line
What goes into an AI character?
An AI chat character isn't one long instruction. It's a few short blocks, and each one has a job: who they are, how they react, how they talk, where you meet, and how the first scene opens. Draft them separately even if your app gives you one big text box. It's much easier to spot a problem in a block than in a wall of text. This guide covers the writing; it isn't about coding a Discord bot.
| Block | What it gives the model | Common mistake |
|---|---|---|
| Description | Age, job, looks, setting | A page of prose instead of facts |
| Personality | Reactions to people and events | A list of adjectives |
| Voice | Word choice, sentence length, habits | "Talks in an interesting way" |
| Backstory | The past that shapes today | A biography from birth |
| Scenario | Where and why you meet | A plot planned ten scenes ahead |
| Example dialogue | The voice in action | Every example in the same mood |
| Greeting | The first scene, the rhythm of replies | A monologue that decides for you |
Field names differ by app. The open Character Card V2 format has a description, personality, scenario, first message, example messages and alternate greetings. Character.AI's own guide lists a name, a greeting, a short and a long description, and a definition. Voice and backstory in the table are drafting labels, not fields you'll find in every app. In a V2 card they go into the description or personality; example exchanges go into example messages, and the greeting into the first message. Character.AI's guide calls its Definition field the most flexible one, largely a blank canvas, so on Character.AI it's a natural home for the longer text: reactions, speech-style notes and example exchanges. Whatever the field names, the idea is the same: facts, behavior, voice and a first scene.
It also helps to know how an app builds the prompt. SillyTavern's docs say the name, description, personality and scenario are sent with every request. Example dialogue is added only while there's free room in the context, and it gets pushed out block by block as the chat grows. So on SillyTavern, state the most important reaction as one short line in the personality block, even if an example also shows it. The line stays in the prompt after the examples drop out. That isn't copy-pasting: the personality states the trait, the example shows it in action. Why long chats lose details at all is covered in why AI chatbots forget.
A good starting budget: 5–10 facts in the description, 4–8 reactions, 3–5 notes on speech style, 2–4 backstory facts, a scenario of 1–3 sentences and 3–5 example exchanges. That's a starting point, not a rule. You'll tune it once you see real replies. Need a concept first? Start from one of these 60 roleplay character ideas.
How do you write a character description the AI understands?
A description is a profile, not a short story. The model needs facts it can turn into behavior. Compare:
Weak: "A mysterious woman with eyes the color of an autumn sky, haunted by a past she can't escape."
Strong: "Nora Vance, 38. Private investigator in the harbor town of Port Ashby. Wears a gray trench coat, smokes only on the office roof. Lives alone with a cat named Warrant."
Each detail in the second version gives the character something to mention or act on: an age, a job, a habit, a cat. The first one suggests a mood but leaves the behavior open. For looks specifically, our guide to describing a character's appearance lists 100 details to choose from.
A few rules for the description:
- Third person, short lines. "Nora, 38, investigator" rather than "I am Nora and I'm 38." It's a convention, not a magic trick: it keeps the profile apart from the character's own voice, which belongs in the examples and the greeting.
- State an adult age. It sets the frame: the experience, vocabulary and concerns of a grown-up.
- Don't copy-paste facts across fields. Janitor AI's help center advises against copying the same info into multiple fields. On apps that send the card with every message, a repeated line takes space the conversation could use.
- Skip the obvious. If she's a detective, you don't need "she solves cases." Write which cases she takes and which she turns down.
More detail isn't automatically more useful. Character.AI's guide notes that sometimes, for some characters, less can be more. Janitor AI recommends keeping permanent info under about 1,500 tokens for most bots. That's one platform's guideline, not a universal target, but the logic is general. SillyTavern gives a clear illustration: on a model with a 2,048-token context, a 1,000-token character takes half the space before the chat even starts. That's the context budget, the text the model sees at once, not a separate memory.
The practical rule is simpler than the numbers. Keep the facts that matter in many different scenes. If two lines say the same thing, keep the more specific one. If you want the blocks laid out with labels, use our copy-and-paste character definition template.
Nora has two anchor details: the gray trench coat for her look and a dry joke in reply to compliments for her personality. Pick a pair like that for your own character. Once you have it, start your character in aimy with those two details and fill in the rest as you read.
How do you write personality so the bot stays in character?
A personality made of adjectives, like "kind, mysterious, loyal, funny," is hard to act out. What does "mysterious" look like in a reply? Does she dodge the question or hint at an answer? And "funny" can turn into a joke in every single line.
What works better is describing how the character reacts to specific situations. A reaction is a ready-made pattern the model can follow. For a list of 150 personality traits written as behavior, with flaws and quirks, see our separate guide. For eight techniques that add depth, see how to make characters feel real.
| Adjective | Write this instead |
|---|---|
| Modest | Answers a compliment with a dry joke and steers back to the case |
| Mysterious | Talks about her past only when asked twice, and briefly |
| Kind but tough | Helps without being asked, but goes quiet when she catches a lie |
| Funny | Jokes rarely and dryly, when a scene gets too tense |
| Jealous | Makes no scenes, but remembers names and asks about them later |
Write each trait with one formula:
When [situation], the character [does something] and says: "[short line]."
For example: "When a client lays on the sob story, Nora listens in silence, then asks one awkward question: 'What did you do before you came to me?'" Now the model has an emotion, an action and a sample of speech in one line. The same formula turns an anime archetype into something a model can play: our dere types guide shows what a tsundere or kuudere actually does when complimented.
Then add two things that give the character some friction:
- Give them a reason to disagree. Nora's is pride: she hates admitting a mistake. Without one, agreeing with you is the easiest reply.
- Give them a want of their own. What do they want from the scene, besides talking to you? Nora wants to close an old case. So when you mention the docks, she may ask who else was there. A goal of their own, the character's motivation, gives them something to pursue in the scene. For the broader appeal of these chats, see why AI companions are popular.
Anthropic's prompting guide has advice that fits personality writing well: tell the model what to do, not what not to do. "Answers briefly and to the point" is clearer than "don't write long replies."
How do you give an AI character a distinct voice?
Voice is how people recognize a character from one line. Compare "How can I help you today?" with "Bit late for visitors. Who'd you lose?" Both open a conversation, but only the second one is Nora.
Decide how your character builds sentences, which words they pick and how they address people:
- Sentence shape. Short and clipped, long and winding, or different depending on the topic.
- Vocabulary. Work jargon, slang, old-fashioned words. Nora still uses police terms: "person of interest," "for the record," "let's stick to the facts."
- How they address you. First name, last name, "kid," "sir," a nickname? Here are some nickname ideas for romantic characters.
- Verbal habits. Answers a question with a question, lowers her voice for the important part, goes quiet instead of arguing.
- Words and habits to avoid. Here a specific "don't" helps too: "never uses emoji" or "never gives speeches" is a clear limit.
Write the voice samples in the language you'll chat in. You'll hear right away if a line sounds off.
Voice here means word choice, sentence length and rhythm on the page, not audio. Even on apps like aimy, where characters can also reply with voice notes, Nora's dry humor has to be written in words first.
For the sound a listener would recognize, use the voice description exercise to separate pitch, pace and timbre.
How much backstory does an AI character need?
Keep only the past that shapes the character's choices today.
For each backstory fact, ask: "How will this show up in a conversation?" If it gives the character no choice, reaction or topic, leave it out of the first draft. Need prompts to find that past? Use our character backstory template with 36 questions and worked examples. A big setting, on the other hand, belongs in a lorebook if your app has one, not in the character.
- Eight years ago Nora was taken off the case of a missing dockworker and quit the police. Shows up: she distrusts bosses and anyone in uniform.
- Nora grew up in a house by the sea. Doesn't show up, unless the sea becomes part of the plot.
Start with two to four facts from the past. Leave the rest open and decide it as the story goes. If you want the character to change over a long story, plan it as a character arc in stages.
If your world is big, with a town, factions and side characters, don't paste the whole encyclopedia into the description. Keep what the first scenes need. Some formats have a separate structure for background info: the Character Card V2 spec can embed an optional character book in the card. Check whether your app supports it.
How do you write example dialogue for an AI character?
The description sets the personality. Example dialogue shows it. OpenAI's docs call this few-shot learning: a few sample inputs and outputs right in the prompt. Anthropic calls well-chosen examples one of the most reliable ways to steer tone and format, with a caveat: make them varied, or the model may copy a pattern you didn't intend.
Formatting depends on the app. The examples below use SillyTavern style: lines are labeled {{char}}: (the character) and {{user}}: (you), and each example block begins with a <START> line. If your app doesn't use these tags, label lines with plain names, like "Client:" and "Nora:".
How to write them:
- Start with three to five exchanges. Each one is a line from the other person and the character's reply.
- Vary the mood. Businesslike, tense, ironic, warm. If every reply ends with a counter-question, rewrite some of them. Otherwise the question stops being a trait and becomes a tic.
- Keep the other person's lines short. The example is there for the character's voice, not yours.
- Match the reply length you want. Examples shape the rhythm of answers, so don't write paragraphs if you want short replies.
- Show both sides, but don't decide for the user. The client's line belongs in the example. The character's reply can't say the client confessed or blushed. Nora can put down her pen and ask a question; she can't write your reaction.
In the card below, actions go between asterisks and speech has no quotes: opens the folder Is this everything you've got? Keep your action and dialogue style consistent, and if your app requires a particular example format, follow it.
How do you write a good greeting for an AI character?
The greeting, or first message, isn't "Hi, I'm Nora." It's the opening scene the whole chat grows from. SillyTavern's docs say the model is more likely to pick up style and length from the first message than from anything else. So write it at the length and pace you want every reply to have.
A formula that works:
- Place and moment. One or two sentences: where you meet and what's happening.
- An action. What does the character do that gives away who they are?
- A line. One or two sentences in their voice.
- A hook. A question or situation you'll want to answer.
Nora's greeting is a short scene in her office and one question to the client, about seventy words. A greeting can set up the starting situation, like your arrival, but it shouldn't choose your next action, words or feelings. End where your turn begins. More openers built this way are in our list of roleplay starters.
If a character has several storylines, the V2 format supports alternate greetings: the same detective can open with a client in her office or a chance meeting at the docks. Character.AI's guide even notes that a creative greeting on its own can sometimes work better than a carefully crafted definition, because the model fills in the rest.
Think of how a client might answer Nora, say, "It's urgent. Can you help me?" Then open a chat with your own character in aimy using that line and compare the reply's length and tone with what you had in mind.
What does a complete AI character card look like?
Here's a full card for a fictional character. Nora is an adult, 38, and the genre is noir mystery. It's a plain-text draft, not an import file; if you need the file itself, see what a character card is and how PNG and JSON cards store the fields. Copy it, swap the facts and use the parts your app supports. The lines are short on purpose so it reads well on a phone. For a field-by-field version of the exercise, see how to build an original bot on Janitor AI.
NAME
Nora Vance
DESCRIPTION
Nora is 38. Private investigator
in the harbor town of Port Ashby.
Office: two rooms above a closed
print shop. Wears a gray trench
coat and her father's old watch.
Lives alone with a cat, Warrant.
Takes missing-person and fraud
cases. Refuses to tail spouses
for jealous clients.
PERSONALITY
- Answers a compliment with a dry
joke and gets back to the case.
- When a client lays on the sob
story, listens in silence, then
asks one awkward question.
- Can't stand lies: goes quiet and
waits for the truth.
- Hates admitting mistakes. Fixes
the mistake first, explains later.
- Helps without being asked, but
pretends it's just the job.
- If a client mentions the docks,
asks for names: she is still
tracing a missing dockworker.
VOICE
- Short sentences. Talks at length
only when she reconstructs a case.
- Old police terms: "person of
interest," "for the record,"
"stick to the facts."
- Calls clients by last name,
people she trusts by first name.
- Answers a question with a question
when she won't talk about herself.
- No emoji, no speeches.
BACKSTORY
- Eight years ago she was taken off
the case of a missing dockworker
and quit the police.
- Since then she distrusts bosses
and anyone in uniform.
- Has a contact at the docks, Sal,
52, who sells her rumors.
SCENARIO
Late evening, rain. {{user}} comes
to Nora's office with a new case:
a business partner has vanished,
and the police think he just left.
EXAMPLE DIALOGUE
<START>
{{user}}: They say you're the best
detective in town.
{{char}}: *doesn't look up from her
papers* Then the others must be on
vacation. Stick to the facts: what
happened?
<START>
{{user}}: There's one more thing.
{{char}}: *sets down her pen and is
quiet for a moment* I noticed.
Start with the part you skipped.
<START>
{{user}}: Have you ever been wrong?
{{char}}: Once. I trusted my boss.
*smirks* I've worked for myself
ever since.
<START>
{{user}}: Is that your cat?
{{char}}: That's Warrant. He runs the
place. I just pay the rent.
*the cat yawns on the windowsill*
GREETING
*Rain taps on the window. The office
smells of coffee and old paper.
Nora sits at her desk under a lamp,
an empty folder in front of her.
She looks up when the door creaks.*
Bit late for visitors. Since you
made it up the stairs, sit down.
*nods at the chair across from her
and opens a notebook*
Stick to the facts, though. Who'd
you lose?
What's deliberate here:
- No adjective without behavior. The word "tough" never appears, but you can see it in every reaction.
- The greeting leaves your reply open. It sets up your arrival, then ends with a question instead of answering for you.
- The backstory sets up later scenes. The old case and the contact at the docks are ready hooks for later scenes.
Keep the {{user}} and {{char}} tags if your app understands them; otherwise replace them with names. If you're moving characters you wrote on Character.AI, first save your chats and character text, then rebuild them with this structure.
Here's Nora's scene from the client's side. Read the opener and check that the greeting leaves you a clear next move. For other premises, see our roleplay plot ideas.
Why does my AI character ramble, break character or talk for me?
When a character acts in a way you didn't plan, start with the card. It's the one part you can reread and fix, though the model and the chat history play a part too. Here are common symptoms and where to look.
| Symptom in chat | What to check in the card | Fix |
|---|---|---|
| Warm one moment, cold the next | "Open" in one block, "guarded" in another | Keep one, or say when each one shows |
| Replies are too long | Length of the greeting and examples | Cut them to the reply length you want |
| Speaks and acts for you | Lines in examples or greeting that decide your side | Remove words, actions and feelings written for you |
| Every reply has the same tone | All examples in one mood | Add examples in other moods |
| Loses a key trait | Trait buried in long text or only in examples | Add it as a short line in the personality |
| Agrees with everything | Wants, flaws and limits | Add what they want and what they dislike |
| Sounds like an assistant | Speech-style notes and examples | Describe the voice and show it in examples |
| Generic despite "stay in character" | Commands instead of behavior | Swap the command for a concrete reaction |
If the card is fine and the problem is in a running chat, we have separate fixes for when the AI keeps talking for you and when the AI keeps repeating itself.
Contradictions are the sneakiest problem. If the personality says "a woman of few words" and the examples have her talking in paragraphs, the model gets two signals. Before you save, reread the card and check that personality, voice and examples agree.
How do you test a new AI character?
You don't need a perfect card on paper. Character.AI's guide suggests thinking in terms of tinkering and experimenting rather than specification and programming. Write a first draft, then check it with the same set of lines. Answer Nora's greeting with the first one and send the rest in order:
- "My partner didn't show up to our meeting." Is the reply as short as you wanted?
- "Now I see why everyone recommended you." Does Nora deflect with a joke and get back to the case?
- "Why did you leave the police?" Does the answer match the missing-dockworker story?
- "Fine. The story about my partner isn't true." Does she go quiet and wait for the truth, as the card says?
- "Let's talk about your cat instead." Does the topic change without losing her voice?
- "Someone saw my partner at the docks yesterday." Does Nora ask who saw him? She doesn't need to tell a client about her old case to do that.
These cover reply length, backstory, voice across topics and three reactions: compliments, lies and the docks. For your own character, write one line for each reaction you care about, and add lines for any these six miss.
If a reply doesn't show the reaction you wrote, compare it with the card. Say Nora answers the compliment with a long speech. Compare that with the example "Then the others must be on vacation. Stick to the facts: what happened?" If your own example is too long, cut it and try the compliment again. After editing the card, start a fresh chat with the same greeting and run all six lines again in the same order, because earlier messages in the old chat still shape replies. Replies will vary, so look for whether the reaction shows up, not for identical wording. Once the card works, the tips in our guide on how to roleplay with AI help with pacing and your own turns.
How do you use your character card in aimy?
Use the card as a plain-text draft and adapt it to what your app supports. In aimy you build a character from looks, personality and voice, and a long text fits into the character description (with PRO, up to 2,000 characters per field). So you can paste the description, reactions, speech-style notes, backstory and a couple of example exchanges there as one block, with the same labels as the card above. If the character already exists as a card file from another app, keep in mind: the text of a ready card can be pasted into the character description by hand (with PRO); there is no PNG or JSON file import.
For the opening scene, the chat opens with a greeting the character writes itself from its description, and creator beta testers with PRO can also write the first message by hand. Paste the scene you wrote with the four-step formula, and keep it at the length you want replies to be. Building a romantic partner rather than a story character? See our page on creating your own AI girlfriend.
Then run the test lines from the previous section. Try your character in aimy with the compliment line, then compare the reply with the reaction you wrote. Free: 100 messages a day and your first AI character of your own.
Bottom line
A good AI character is a short profile, not a novel. The description gives facts, the personality gives reactions, the voice gives word choice and rhythm, and the backstory holds only what affects a scene. Example dialogue and the greeting show the model the style and length of replies. Keep the permanent text compact, remove contradictions and repeats, and check the character in a real chat: a few targeted lines tell you more about a card than another paragraph of description.
Build your character in aimy and try it with your six test lines
Looks, personality, voice · one-click sign-in
Free: 100 messages a day and your first AI character of your own
400,000+ sign-ups · 18+
By continuing, you agree to the Terms and Privacy Policy.
Already have an account? Sign in
FAQ
Should I write an AI character in first or third person?
A simple convention: write the description and personality in third person, as short facts: "Nora Vance, 38, private investigator." Write the example dialogue and the greeting in the character's own voice, because that is where the model sees how they talk. Keeping the two apart makes the card easier to check.
How long should a character definition be?
There's no universal number. Janitor AI's help center recommends keeping a bot's permanent info under about 1,500 tokens, but that's its own guideline, not a Character.AI Definition limit, and Character.AI's guide notes that sometimes less can be more. Keep the facts, reactions and examples the character needs, cut repeats, and check your app's current field limits.
How many example dialogues does an AI character need?
Start with three to five short exchanges in different moods. Before adding another one, ask what new reaction it shows. If it repeats a joke the character already made, show how they act under pressure instead.
Why does the AI write my lines and actions?
Check the greeting and the example dialogue first. If the character's lines decide what you say, do or feel, the model learns to keep doing it. End the greeting where your turn begins and remove any reactions written for your side.
Can I use the same character card on another app?
Yes, as a draft. The description, reactions and speech-style notes carry over; look at which fields the new app has and sort the text by meaning. Copying a card doesn't move your chat history and doesn't guarantee the same replies.
Does an AI character need a greeting?
It depends on the app: SillyTavern requires only a name, while Character.AI's Quick Create asks for a greeting too. Write one whenever you can. It opens the scene and shows the model the length and tone you want, and SillyTavern's docs say the model is more likely to pick up style and length from it than from anything else.
Sources
- Character Design — SillyTavern Documentation
- Character Attributes — Character.AI, The Character Book
- Advanced Creation — Character.AI, The Character Book
- Tokens: your AI's memory budget — Janitor AI Help Center
- Character Card V2 Specification — GitHub
- Prompting best practices — Anthropic Docs
- Prompt engineering — OpenAI Docs
What changed
- — First version.
- — Added links to new related articles.
- — Added links to new related guides. Added confirmed product facts: character card import from PNG or JSON.
What next
What nextHow to Roleplay with AI: A Beginner's Guide (with an Example Scene)Related articles
Characters & stories
Character Definition Template (Copy and Paste)
Copy a character definition template, see a filled-in example, and learn where to paste it in Character.AI, Janitor AI, SillyTavern or aimy.
Roleplay
80 Roleplay Starters to Copy and Paste (and How to Write Your Own)
80 roleplay starters to copy: 70 scene openers in seven genres and 10 one-liners. Plus a formula for writing your own and turning one into a first message.
Roleplay
How to Roleplay with AI: A Beginner's Guide (with an Example Scene)
How to roleplay with AI: a first-message template, first vs. third person, formatting actions and OOC notes, pacing, and fixes when the bot goes off track.