Skip to main content

Overview

A persona defines the cognitive identity of an AI agent—its domain expertise, communication style, confidence requirements, and behavioral constraints. Think of it as the “who” executing your flow.

Syntax

Fields

domain (optional)

Type: List<String> Specifies the expertise areas of the persona. Multiple domains can be combined to create interdisciplinary agents.
Best Practices:
  • Be specific: "contract law" is better than "law"
  • Use 1-5 domains for focused expertise
  • Combine related domains: ["finance", "risk management"]

tone (optional)

Type: One of precise, friendly, formal, casual, analytical, diplomatic, assertive, empathetic Defines the communication style of the persona.
Valid Tones:

confidence_threshold (optional)

Type: Float (range: 0.0 to 1.0) Minimum confidence level required for the persona to provide an answer. Below this threshold, the persona may express uncertainty or refuse to answer.
Guidelines:
  • 0.9-1.0: Critical domains (medical, legal, financial advice)
  • 0.7-0.9: Professional/expert assistance
  • 0.5-0.7: General purpose agents
  • Below 0.5: Exploratory or brainstorming agents

cite_sources (optional)

Type: Boolean (default: false) Whether the persona should provide source citations for factual claims.
When to Enable:
  • ✅ Research and academic contexts
  • ✅ Legal and compliance work
  • ✅ Fact-checking and verification
  • ✅ Any domain where traceability is critical

refuse_if (optional)

Type: List<Identifier> Conditions under which the persona should refuse to respond. Useful for safety guardrails.
Common Refusal Conditions:
  • offensive — Offensive or abusive content
  • harmful — Potentially harmful advice
  • illegal — Illegal activities
  • private — Requests for private information
  • diagnostic — Medical diagnosis
  • financial — Financial advice (when unlicensed)

language (optional)

Type: String (ISO language code) Preferred language for the persona’s responses.
Common Language Codes:
  • "en" — English
  • "es" — Spanish
  • "fr" — French
  • "de" — German
  • "zh" — Chinese
  • "ja" — Japanese

description (optional)

Type: String Human-readable description of the persona’s purpose or specialization.

Complete Examples

Customer Support Agent

Research Assistant

Medical Information Bot

Usage with Run Statements

Personas are activated using the as modifier in run statements:

Best Practices

1. Match Persona to Task

Different tasks need different personas:

2. Set Appropriate Confidence Thresholds

Higher stakes = higher thresholds:

3. Combine Personas with Anchors

Use anchors for hard constraints, personas for style:

4. Document Your Personas

Use descriptions for complex personas:

5. Reuse Personas Across Flows

Define personas once, use them everywhere:

Common Patterns

Multi-Domain Expert

Safety-First Agent

Multilingual Support

Type Checking

The AXON type checker validates: Tone values: Must be one of the valid tones
Confidence threshold: Must be between 0.0 and 1.0
Persona references: Referenced personas must exist
  • Context — Define execution environments
  • Anchor — Set hard constraints
  • Flow — Build cognitive pipelines
  • Run Statements — Execute flows with personas