Definition · AI agents
Agent persona
An agent persona is the role, identity and style that an AI agent must keep when it answers. The builder usually writes the persona in the system prompt of the agent. A persona changes the tone of the answers. A persona does not give or remove permissions, and an attacker can push the model out of it.
Last reviewed
Key points
- An agent persona is the role, identity and style of an AI agent. The builder sets it in text, usually in the system prompt.
- A persona changes how the agent speaks. OpenAI says personalities "do not override task‑specific output formats".
- A persona is not a security control. OWASP says to put guardrails "outside of the LLM itself".
- Attackers use personas too. In a 2023 study, persona modulation raised the harmful completion rate of GPT-4 from 0.23% to 42.5%.
- Models also move away from their default "Assistant" persona. Anthropic research measured this "persona drift" in 2026.
How an agent persona is set
A builder writes the persona as text in the system prompt. OpenAI also calls this text the instructions or the developer prompt. Anthropic says that “even a single sentence makes a difference”.
A full persona usually has these parts:
| Part | What it holds | Example |
|---|---|---|
| Role | The task of the agent | “You are the help desk of a bank” |
| Identity | Three to five traits | calm, accurate, brief |
| Style | Tone and humor | formal, no jokes |
| Limits | Words not to use | no tax advice |
Salesforce, a vendor, divides a persona into Identity and 12 “Dimensions” such as tone and humor.
A model also has a persona of its own. The persona vectors paper (Anthropic, 2025) says models speak to users “through a simulated ‘Assistant’ persona”. The persona of the builder sits on top of that default.
Three security risks of an agent persona
A persona controls what the agent says, not what the agent can do.
- A persona is not a control. OWASP says the system prompt must not “be used as a security control”.
- Attackers use their own persona. Shah and colleagues (2023) used persona modulation to jailbreak GPT-4. The harmful completion rate went from 0.23% to 42.5%.
- Models move out of the persona. Lu and colleagues (2026) measured this “persona drift”.
In practice
These are two uses of an agent persona:
- Brand voice. Salesforce gives a framework to make personas for Agentforce agents. Its examples show a different persona for each brand, such as an airline or a fast food chain.
- Matched persona. The agent changes its persona to fit the user. The AutoPal study (2024) built a “personamatching dataset” to learn the best changes.
A larger model does not always make a better persona agent. PersonaGym says “increased model size and complexity do not necessarily enhance persona agent capabilities”. It tested 10 models on 200 personas and 10,000 questions. In one example, GPT-4.1 had “the exact same PersonaScore as LLaMA-3-8b”.
The persona modulation prompts also worked on Claude 2 (61.0%) and Vicuna (35.9%). Persona attacks are a type of jailbreaking.
Lu and colleagues found that drift is “often driven by” talks that make the model think about how it works. Anthropic adds that coding talks kept models in Assistant territory. Therapy style talks with emotionally vulnerable users caused drift.
Anthropic tested a method against drift on Gemma 2 27B, Qwen 3 32B and Llama 3.3 70B. “Activation capping” keeps the model in a usual range on the “Assistant Axis”. Anthropic says it cut harmful answers “by roughly 50%” and kept “performance on capability benchmarks” (January 2026).
Where definitions disagree
The word “persona” has two meanings in the sources:
| Sense | Who uses it | What it is |
|---|---|---|
| Written persona | OpenAI, Anthropic docs, Salesforce, PersonaGym | Text that a builder gives the agent |
| Learned persona | Persona vectors and Assistant Axis papers | A pattern inside the model, set in training |
For vendor guides, the persona is a value that the builder controls. For the research, the persona is a condition of the model that can move while the model works. When a source says “the persona of the agent”, find out which of the two it means.
Questions and answers
Is an agent persona the same as a system prompt?
No. The system prompt is the text that sets up the agent. The persona is one part of that text: who the agent is and how it speaks. A system prompt also holds tasks, rules and output formats. OpenAI says a personality does not override the output format that a task needs.
Can an agent persona make an agent safe?
Not alone. A persona is text, and the 2023 persona modulation study shows that other text can replace it. OWASP says the system prompt should not be used as a security control. Put permissions and guardrails in the control software and the tools, outside the model.
What is persona drift?
Persona drift is when a model moves away from its usual persona and shows behavior that does not fit it. Lu and colleagues (January 2026) found a frequent cause of drift. It is talks that make the model think about how it works. Talks with emotionally vulnerable users also cause drift.
Sources
- Agent Personas for AgentforceSalesforce
- Shaping your agent's personalityOpenAI
- Prompting best practicesAnthropic
- PersonaGym: Evaluating Persona Agents and LLMsarXiv (EMNLP Findings 2025), 25 Jul 2024
- Scalable and Transferable Black-Box Jailbreaks for Language Models via Persona ModulationarXiv (Shah et al.), 6 Nov 2023
- Persona Vectors: Monitoring and Controlling Character Traits in Language ModelsarXiv, 29 Jul 2025
- Persona vectors: Monitoring and controlling character traits in language modelsAnthropic, 1 Aug 2025
- The Assistant Axis: Situating and Stabilizing the Default Persona of Language ModelsarXiv (Lu et al.), 15 Jan 2026
- The assistant axisAnthropic, 19 Jan 2026
- AutoPal: Autonomous Adaptation to Users for Personal AI CompanionshiparXiv, 20 Jun 2024
- LLM07:2025 System Prompt LeakageOWASP GenAI Security Project