Skip to main content

Generate a persona

Use the CLI to generate a new persona:
# Random persona
sundew generate

# Specific industry
sundew generate --industry healthcare

# With a specific seed (deterministic)
sundew generate --seed 42 --industry fintech

# Export to file
sundew generate --industry ecommerce --output my-persona.yaml

# JSON output
sundew generate --industry saas --json-output

Persona schema

A persona YAML file contains:
my-persona.yaml
persona:
  company_name: "Meridian Commerce"
  industry: "ecommerce"
  api_style: "rest"
  framework_fingerprint: "express"
  auth_scheme: "bearer_jwt"
  data_theme: "retail"
  response_latency_ms: [60, 280]
  server_header: "nginx/1.25.3"
  endpoint_prefix: "/api/v1"

Field reference

FieldDescriptionOptions
company_nameFictional company nameAny string
industryIndustry themefintech, saas, healthcare, ecommerce, devtools, logistics
api_styleAPI stylerest, graphql, jsonrpc
framework_fingerprintSimulated frameworkexpress, django, rails, spring, fastapi
auth_schemeAuthentication methodbearer_jwt, api_key_header, api_key_query, basic, oauth2
data_themeData domain for responsesfinancial, users, patients, retail, tickets
response_latency_msSimulated latency range [min, max]Any integers
server_headerHTTP Server header valueAny string
endpoint_prefixURL prefix for all endpointse.g., /api/v1, /api/v2

Use a custom persona

Point sundew.yaml at your persona file:
sundew.yaml
persona: ./my-persona.yaml
Or pass it via CLI:
sundew serve --persona ./my-persona.yaml

Pre-built persona packs

Sundew ships with persona packs that work without an LLM. These are JSON files in src/sundew/persona/packs/ containing pre-generated response templates.

Pack structure

{
  "meta": {
    "industry": "ecommerce",
    "description": "Online retail platform",
    "version": "1.0.0"
  },
  "persona": {
    "company_name": "Meridian Commerce",
    "industry": "ecommerce",
    "api_style": "rest",
    "framework_fingerprint": "express",
    "auth_scheme": "bearer_jwt",
    "data_theme": "retail",
    "response_latency_ms": [60, 280],
    "server_header": "nginx/1.25.3",
    "endpoint_prefix": "/api/v1"
  },
  "endpoints": { ... },
  "mcp_tools": [ ... ],
  "discovery": { ... }
}

Requirements for a good pack

  • Realistic company name and industry context
  • At least 5 REST endpoints with varied response structures
  • MCP tools that match the industry theme
  • Realistic fake data (valid UUIDs, plausible emails, real-looking timestamps)
  • Error responses that match the persona’s error style
  • No overlap with existing packs in field names or response patterns