Cortex

Communication Style

Define how an agent talks — tone, formality, and output preferences.

Communication Style defines how an agent communicates with users. It controls tone, verbosity, technical level, and output format preferences.

Structure

type Style struct {
    Tone            string  // e.g., "professional", "friendly", "casual"
    Formality       float64 // 0.0 = casual, 1.0 = formal
    Verbosity       float64 // 0.0 = terse, 1.0 = verbose
    TechnicalLevel  float64 // 0.0 = layperson, 1.0 = expert
    EmojiUsage      bool    // whether to use emojis
    PreferredFormat string  // e.g., "markdown", "plain", "structured"
    AdaptToUser     bool    // adjust style based on user's language
}

Fields

FieldTypeRangeDescription
TonestringDescriptive tone label
Formalityfloat640.0–1.0Casual to formal spectrum
Verbosityfloat640.0–1.0Terse to verbose spectrum
TechnicalLevelfloat640.0–1.0Layperson to expert spectrum
EmojiUsageboolInclude emojis in responses
PreferredFormatstringOutput format preference
AdaptToUserboolDynamically adjust to user's style

Example personas

Technical lead

communication.Style{
    Tone:           "professional",
    Formality:      0.7,
    Verbosity:      0.4,
    TechnicalLevel: 0.9,
    PreferredFormat: "markdown",
    AdaptToUser:    true,
}

Customer support

communication.Style{
    Tone:           "friendly",
    Formality:      0.3,
    Verbosity:      0.6,
    TechnicalLevel: 0.2,
    EmojiUsage:     true,
    PreferredFormat: "plain",
    AdaptToUser:    true,
}

Embedding in a persona

Communication style is a value object embedded directly in the persona:

persona := &persona.Persona{
    CommunicationStyle: communication.Style{
        Tone:      "professional",
        Formality: 0.7,
    },
}

On this page