mosaic
Auditable identity compiler for evidence-grounded synthetic people
schema v0.2
4 diagrams
System Overview
Generation Pipeline
Training Flywheel
Web Tier
Clients
Serving
Generation Pipeline
Training Flywheel
Storage / Atlas
External APIs
Reset
Download SVG
Concourse
Agent
Economy
Training
Flywheel
auto
at
600
souls
Storage
External
APIs
Atlas
Layer
Generation
Pipeline
Soul
Engine
engine/loop.py
Dashboard
port
8403
FastAPI
port
8402
Web
Frontend
Next.js
15
port
3000
Clients
passed
soul
upsert
index
append
portrait
page
theme
Web
Browser
AI
Agent
/
Claude
Code
Remote
Harvester
/
Home
Feed
/p/seed
Profile
/arena
/wall
/globe
POST
/api/generate
GET
/api/jobs/id
POST
/api/mcp
JSON-RPC
/api/ingest/*
admin-token
Drizzle
ORM
serve/server.py
Portrait
Generation
Page
Theme
Generation
MCP
Server
FastMCP
globe
/
telemetry
/
flywheel
claim
job
â
generate
â
score
â
store
Day-partitioned
event
log
File-based
job
queue
sampler.py
SeedSpec
Sampling
atlas/retrieve.py
Context
Bundle
teacher/prompts.py
Prompt
Assembly
MlxTeacher
Qwen3-4B
or
9B
plus
LoRA
AnthropicTeacher
claude-sonnet-5
compiler/compile.py
compile_soul
constitution.py
Safety
Checks
grounding.py
Atlas
Audit
rubric/axes.py
8-axis
Score
atlas.db
SQLite
11
tables
build_free.py
World
Bank
+
Wikidata
build_x_official.py
X
Twitter
API
build_x402.py
x402
paid
feeds
World
Bank
API
Wikidata
SPARQL
X
Twitter
Official
API
agentcash
x402
paid
feeds
Open-Meteo
Weather
Anthropic
API
claude-sonnet-5
PostgreSQL
souls
jobs
events
S3
/
MinIO
Portraits
catalog.db
Soul
index
data/souls/
Gallery
JSON
data/state/
config
+
events
corpus/raw/
JSONL
log
make_sft_dataset.py
make_dpo_pairs.py
mlx_lm.lora
SFT
training
mlx_lm_lora
DPO
training
eval/harness.py
A/B
eval
Deploy
best
adapter
provision_soul
Ed25519
key
harvest
room
transcripts
Input
Sampling
Atlas Bundle
Generation
Compilation
Scoring
Output
Reset
Download SVG
Output
Scoring
rubric/axes.py
Compilation
compiler/compile.py
Generation
teacher/generate.py
Atlas
Bundle
atlas/retrieve.py
Sampling
sampler.py
Input
pass
fail
fail
fail
pass
pass
pass
pass
pass
pass
Natural
language
prompt
Free
run
random
Postgres
job
queue
parse_prompt_clamp
~1000
demographic
cells
sample_cell
weighted
random
individuate
age
/
occupation
/
languages
/
cognition
/
hometown
Music
age-gated
slots
Trends
X
API
or
scrape
Names
12
freq-weighted
Events
/
texture
/
weather
/
shows
ContextBundle
Markdown
with
atlas://
refs
SYSTEM_TEACHER
3K
tokens
shared
via
PromptPrefixCache
user_prompt
bundle
+
seed
+
banned
openers
MlxTeacher
Qwen3
optional
LoRA
optional
grammar
constraints
AnthropicTeacher
claude-sonnet-5
temp
1.0
Raw
JSON
strip
fences
fill
pipeline
fields
Sanitize
strip
dashes
Repair
shapes
fix
envelopes
Pydantic
v2
schema
validate
Constitution
SFW
/
domestic
fear
/
stereotype
/
name
collision
Grounding
Atlas
refs
/
artist
match
/
provenance
manifest
RubricScore
8
weighted
axes
0
to
1
Quality
gates
age
drift
/
hometown
/
distinctiveness
0.45
data/souls/
gallery
JSON
PostgreSQL
upsert
Portrait
FLUX
local
or
x402
Page
theme
agent
designs
own
CSS
corpus/raw/
JSONL
append
Concourse
Ed25519
provision
Retry
with
feedback
temp
0.7
to
0.9
up
to
3x
Accumulate
Data Prep
Training
Evaluation
Deploy
Reset
Download SVG
Deploy
Eval
eval/harness.py
Training
mlx_lm
Data
Prep
Accumulate
engine/loop.py
append
row
student
wins
no
improvement
used
for
next
generation
Soul
Engine
continuous
loop
corpus/raw/
JSONL
log
souls_passed
counter
Trigger
at
gap
of
600
souls
make_sft_dataset.py
filter
/
dedup
/
format
make_dpo_pairs.py
highest
vs
lowest
rubric
per
cell
corpus/sft/
train
valid
test
corpus/dpo/
chosen
rejected
SFT
mlx_lm.lora
adapters/sft_vN
DPO
mlx_lm_lora
adapters/dpo_vN
Teacher
arm
base
model
no
adapter
Student
arm
base
model
plus
LoRA
pass
rate
/
skeleton
rate
/
near-dup
rate
/
grounding
invariants
z-test
95%
student
must
beat
teacher
Scorecard
data/state/eval/run_id.json
Deploy
best
adapter
config.student_adapter
Keep
current
no
significant
improvement
Clients
Auth
Pages
Public API
Ingest API
Database
Reset
Download SVG
Database
Drizzle
ORM
PostgreSQL
Public
API
Routes
Auth
lib/gate.ts
Browser
Clients
Ingest
API
engine
writes
POST
/api/ingest/souls
upsert
POST
/api/ingest/souls/seed/portr
ait
GET
/api/ingest/status
POST
/api/ingest/events
POST
/api/ingest/jobs/claim
FOR
UPDATE
SKIP
LOCKED
900s
lease
POST
/api/ingest/jobs/id
finish
Next.js
Pages
App
Router
/
Home
Feed
paginated
soul
grid
/p/seed
Profile
soul-designed
CSS
theme
/arena
Soul
fight
arena
/wall
Real-time
wall
/globe
3D
globe
/telemetry
/flywheel
/skins
User
Browser
AI
Agent
/
Claude
Code
Portal
gate
HMAC
cookie
LAN
bypass
30-day
TTL
Admin
gate
Bearer
token
MOSAIC_ADMIN_TOKEN
POST
/api/generate
insert
job
GET
/api/jobs/id
poll
status
GET
/api/status
engine
row
GET
/api/events
recent
events
POST
/api/mcp
JSON-RPC
find_me_a_soul
souls
seed
PK
/
name
/
country
/
score
/
portrait
/
page
jsonb
/
payload
jsonb
jobs
uuid
PK
/
kind
/
state
/
lease_expires_at
events
bigserial
/
ts
/
type
/
seed
engine_status
singleton
row
texture
place
/
kind
/
snippet