Skip to content
GitHubOpen source
Product
Docs
Solutions
IndustriesAll industries
CompareCompare all AI data-leak tools
Benchmarks
GitHubApache-2.0

Personas

A persona is a coherent fake identity for one machine: a company, its domain, a city, a primary person, colleagues, a username, a user id and a hostname. Shadow creates it once, on shadow init or the first Shadow::open, stores it in persona.json, and draws every fake from it.

$ shadow identity
◆ Persona — what AI providers see
company Xinghe Technology Co., Ltd. (xinghe.cn)
person Ying Chen <ying.chen@xinghe.cn>
location Chengdu, China · Asia/Shanghai · zh-CN
user id user-941ea3e72322
username yingchen
hostname xinghe-srv-11
colleagues Tao Zhu, Hui Yang, Lei Li, Yong Xu

shadow identity --json prints the full record, including the region code, locale, dial code and creation time.

Random, unrelated fakes make prompts incoherent: an email at one fake company, a signature from another, a phone number from a third country. Models notice, and answers get worse. A persona keeps fakes consistent with each other:

  • your organisation maps to the persona’s company, and emails at your domain map to addresses at the persona’s domain;
  • your own git identity and OS user map to the persona’s primary person and username;
  • phone numbers use the persona region’s dial code; names come from the region’s naming conventions;
  • your machine’s hostname maps to the persona hostname.

And because the persona is persistent, the same customer shows up under the same fake name tomorrow, which keeps conversation history and long-running agents consistent.

By default the persona’s region is chosen far from the real one, based on the machine’s timezone. A machine in Europe gets a persona in, for example, China, Japan or Brazil. The idea is that the fake identity should not be a near miss of the real one.

Available regions:

CodeCountryCodeCountry
CNChinaINIndia
JPJapanAUAustralia
KRSouth KoreaMXMexico
BRBrazilZASouth Africa
USUnited StatesCACanada
DEGermany

Pin a region in configuration or at init:

[persona]
region = "JP" # or "auto" (default)
Terminal window
shadow init --region JP

The region matters for answers. A persona in Shenzhen gets advice about Chinese public holidays and phone formats. If your prompts depend on locale (tax rules, address formats, legal context), pick a region that suits your work.

You can choose the company name and domain yourself:

[persona]
company = "Northwind Trading Ltd."
domain = "northwind.example"

Everything else is still generated.

KindFake
EmailA name from the persona region at the faked domain: your organisation’s domain becomes the persona domain, webmail domains such as gmail.com are kept. Separators, digits and case follow the original
PersonA name from the persona region’s first and last names
OrganisationThe persona company for your primary organisation (and its short name for the bare name); other organisations get a generated name that keeps the original legal form (Globex Ltd becomes, for example, Zephyr Ltd)
Term (codename, project)A generated codeword such as Velora Quilent
PhoneSame digit layout with the persona’s dial code
Credit cardSame length and grouping, valid Luhn check digit
IBANSame country and length, valid mod-97 check digits
National IDSame format
IP / MACSame family and format
HostnameA generated domain with the persona region’s TLD; internal TLDs (.internal, .corp, .lan, .local) and generic labels such as www or api are kept
Username (in paths)A username in the persona region’s style; your own OS user maps to the persona username
SecretSame prefix and shape (sk-proj-… stays sk-proj-…) with a random body; PEM blocks keep their header and footer. Opt in to redaction instead
AddressA house number and a street from the persona region

Every fake is checked against the vault so that no two real values share one.

shadow init --force deletes persona.json and vault.bin and starts over with a new identity. The old mapping is gone, so responses to old prompts that mention old fakes are no longer restored. To move the same identity to another machine, copy persona.json, vault.bin and vault.key (see The vault).