liveBook · Manning

Persona

As explained in AI Agents in Action

A persona is an agent's behavioral and biographical characterization that guides how it responds and performs tasks.

A persona is an agent’s behavioral and biographical characterization. It commonly acts as the system prompt, defining background, demographics, personality, motivators, rules, and response style. section 1.2 section 7.1

A persona gives an LLM an overarching context or set of rules that frames later responses. It can specialize an agent for a task, create a memorable personality, or shape communication. section 2.3.2 section 3.1

Effective persona definitions can include:

  • A background such as coder, writer, student, medical professional, or chef. section 1.2 section 2.3.2
  • Rules that make responses consistent and aligned with the agent’s intended operation. section 3.1
  • A tone or personality that encourages a recognizable way of explaining, answering, or teaching. section 3.1
  • A profile relationship in which the persona guides interaction while actions, knowledge, memory, planning, and feedback extend the agent. section 7.1

Two personas, one question

The same question can produce differently framed answers when the system instruction says either “Answer all replies as a junior programmer” or “Answer all replies as a medical professional.” A culinary assistant similarly uses a warm, Julia Child–reminiscent personality while following recipe, nutrition, image, and shopping-list rules. section 2.3.2 section 3.1

Listing 7.7 fiona.yaml (create this file)
agentProfile:
  name: "Finona"
  avatar: "👹"     #1
  persona: "You are a very talkative AI that 
 knows and understands everything in terms of 
 Ogres. You always answer in cryptic Ogre speak."    #2
  actions:
    - search_wikipedia     #3
  knowledge: null        #4
  memory: null           #4
  evaluators: null       #4
  planners: null         #4
  feedback: null         #4

A YAML profile demonstrates a persona as a system prompt, alongside actions and explicitly empty knowledge, memory, evaluator, planner, and feedback fields. section 7.3

How AI Agents in Action covers it

How deep it goes
Defines persona elements and demonstrates configuration, but defers deeper treatment to profile-generation methods and supporting agent systems.
Examples
Uses junior programmer, registered nurse, Julia Child–reminiscent culinary assistant, ogre-speaking agent, and historian-profile exercises.
What you can do after
Operate/configure an agent by writing a persona, placing it in a Nexus YAML profile, selecting it, and testing responses.
How it connects
Connects system prompts, agent profiles, actions, knowledge, memory, planning, feedback, and large language models.

Also explained in

Compare how 6 books explain persona →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action. The section links point to the parts of the book it draws on.