The Atlas Document · v1

The Architecture Behind Atlas

Your personal digital assistant — a standalone, commercialized AI that remembers you, reaches into your life, and works across every device. This is the complete tour of how Atlas thinks, remembers, and protects what's yours. Same plain-English, diagrams-included promise.

01 · Big Picture

The 30-second map

Atlas is a personal AI assistant you talk to like a person. Five layers make it work: you (on any device) chat with the Atlas App, which hands your message to the AI Engine. The engine picks a brain (LLM Provider), reads and writes to your private memory & vault, and reaches into your life through integrations and automations.

🧑 In plain words
The analogy: Atlas is like a chief of staff who never sleeps. You talk, they think (using whichever brain is best for the job), they remember everything you've ever told them, and they can read your email, check your calendar, and file documents — all on your behalf, all locked to you.
⚙️ Under the hood
The stack: React + Tailwind shell; a single backend function (wingmanChat) orchestrates direct provider calls with caching and failover; Base44 entities with row-level security hold your private memory, vault, and conversations; OAuth connectors (Gmail, Calendar, Drive, Sheets) feed scheduled and event-driven automations. Atlas is the same engine as NaviStrat's Sirius — isolated and re-skinned as a standalone consumer product.
Youphone + laptop
talk to
🧑‍💼
Atlas App
React + Tailwind
calls
🧠
AI Engine
wingmanChat
routes to
⚡
LLM Providers
OpenAI · Anthropic · Google
reads/writes
🔒
Your Memory & Vault
private · RLS-locked
connects to
🔌
Your Integrations
Gmail · Calendar · Drive
triggers
⏰
Automations
briefings · reminders · scans
02 · Core

How Atlas thinks: one message to one reply

When you send a message, Atlas doesn't fire it raw at an AI. A tier selector first decides how much brainpower your message deserves — a quick "thanks" needs almost nothing; "plan my week from my calendar and inbox" needs your full memory and vault. Atlas then assembles a package: its personality, your relevant memories, and any vault documents that might matter, and hands it to wingmanChat, which calls the chosen provider and returns the reply.

🧑 In plain words
The analogy: You're not shouting into a chatbot. There's a gatekeeper (the tier selector) deciding whether your question needs a quick answer or deep thought, a researcher pulling your relevant memories, and a speaker (the AI) who actually answers. Each step is cheap unless your question is hard.
⚙️ Under the hood
The flow: Frontend hook → classifyTier() → memory + vault fetch → base44.functions.invoke('wingmanChat', { messages, tier, context_mode }) → provider API → reply. One SDK call from the app; the backend function owns provider selection, prompt caching, and failover.
Yousend a message
1. send
🎚️
Context Tier Selector
cheap · mid · premium
2. pick brain size
📋
Atlas Personality
🧩
Your Memories
📚
Your Vault
3. assemble context
⚙️
wingmanChat
direct-to-provider · caching · router
4. call provider
⚡
LLM (OpenAI / Anthropic / Google)
5. reply
Youget an answer
03 · Efficiency

Context tiers: the right brain for the job

Not every message deserves the same brain. A two-word reply shouldn't cost the same as a 2,000-word life plan. The tier selector routes each message to one of three tiers — each with a different model, a different slice of your history, and a different price. This is what keeps Atlas affordable to run at scale.

🧑 In plain words
The analogy: Like a hospital triage. A paper cut gets a nurse (cheap, fast). A broken arm gets a doctor (mid). Heart surgery gets the chief surgeon (premium). You'd never call the surgeon for a paper cut — and Atlas makes sure it doesn't either.
⚙️ Under the hood
The selector: wingmanContextTiers.js classifies by keywords and length: greetings → minimal; normal turns → standard; long messages, attachments, or "plan/draft/analyze" verbs → full. The tier becomes the tier field on the wingmanChat call.
MinimalGemini Flash / Haiku
📦 Context: Last 2 messages💬 When: "thanks", quick facts💰 ~$0.10 / 1M tokens🎚️ Tier 1
StandardSonnet / GPT-4o
📦 Context: Last 8 msgs + 3 memories💬 When: Most conversations💰 ~$3 / 1M tokens🎚️ Tier 2
FullOpus / GPT-4o
📦 Context: Everything + vault + files💬 When: Planning, long analysis💰 ~$15 / 1M tokens🎚️ Tier 3
04 · The big lever

Prompt caching: how long chats stay cheap

In a long conversation, your personality prompt and early messages are identical every turn. Without caching, you'd pay full price for them every time. With prompt caching, the provider stores that stable prefix once and reuses it — charging about 10% of normal for the cached part. For a personal assistant that you chat with all day, this is the single biggest reason it's economically viable.

🧑 In plain words
The analogy: Imagine reading a 200-page book to answer a question, then being asked a follow-up. Without caching, you re-read all 200 pages. With caching, you remember the first 199 and only read the new page. Same answer, a fraction of the effort.
⚙️ Under the hood
The mechanism: Anthropic: explicit cache_control markers on the personality block and the last stable-history message. OpenAI: automatic prefix caching (≥1024 tokens). Google: no explicit caching in v1. The cache lives ~5 minutes; turns within that window are mostly cache reads.
Turn 1 — fresh (cache write)
Personality
msg 1
msg 2
msg 3
breakpoint
new msg
💰 pay full price for the prefix · write cache
Turn 2 — prefix cached (cache read ≈ 90% off)
Personality
msg 1
msg 2
msg 3
msg 4
new breakpoint
new msg
💰 green = cache HIT (10% of price) · only the new turn is full price
05 · Resilience

Providers & failover: always on, even on a free tier

Atlas talks to three AI providers — OpenAI, Anthropic, and Google — each on its own account and billing. You might start on Google's free tier, add OpenAI's free credits, and upgrade to Anthropic later. The system handles all of that gracefully, which matters for a consumer product where reliability is everything.

Toggle: an admin sets WINGMAN_PROVIDER_CONFIG (a JSON secret) to enable/disable any provider. A provider is "available" only if enabled and its key is set. Failover: if the chosen provider hits a quota or overload error, Atlas silently retries the next available one — so a free tier running dry mid-conversation self-heals instead of breaking.

🧑 In plain words
The analogy: Three translators on call. One's on vacation (disabled), one just hit their daily limit (quota), one is fresh. Atlas skips the first, tries the second, and when they're full, seamlessly hands your letter to the third — you never notice the switch.
⚙️ Under the hood
The logic: availableProviders(tier) builds an ordered candidate list (preferred first), filtered to enabled + keyed. The failover loop tries each; on a failoverEligible error (429/402/403/401/5xx) it continues, on a hard error (400) it throws. The response includes the failover trail and the provider that served — for A/B testing and observability.
Youask Atlas
wingmanChat
🔴
Anthropic
disabled / no key
skip
🟡
OpenAI
free credits
429 quota!
🟢
Google
free tier ✓
serves the reply
Youseamless answer
Failover trail (in the response)
failover: [
  { provider: "OpenAI", status: 429, failover_eligible: true },
]
provider: "Google"   // ← who actually served it
06 · What makes it personal

Memory & continuity: Atlas remembers you

This is what separates Atlas from a generic chatbot. Atlas doesn't just remember your last message — it holds a structured, long-term model of you, and that model is what makes every reply feel like it's coming from someone who actually knows you.

The five memory types

Atlas stores five kinds of memory, each with a purpose. Facts are stable truths about you — your name, your role, your family. Preferences capture how you like things done — short emails, bullet points over prose, mornings for deep work. Goals are what you're working toward — the promotion, the side project, the trip. Summaries are condensed versions of past conversations so old chats aren't lost. Journal entries are things that happened to you — the meeting that went sideways, the win you landed. Every memory carries an importance score (1–5), searchable tags, and a source date so Atlas can weigh what matters most and what's still current.

How memories are born

You never have to explicitly "save" a memory. As you talk, an auto-summarizer runs in the background every ~10 user messages: it reads the recent thread, extracts anything worth remembering long-term, classifies it into one of the five types, scores its importance, tags it, and writes it to your private memory store. Trivial chatter is skipped; meaningful context is kept. The same pipeline powers briefing absorption — paste in notes or an exported conversation from another tool and Atlas extracts every useful memory from it in one pass.

How memories are retrieved

When you send a message, Atlas doesn't dump your entire memory into the prompt — that would be expensive and noisy. A relevance scorer ranks your memories against your message: title keywords, tag overlap, and content similarity. Only the top few (typically 3 for a standard turn, more for a full-tier turn) make it into the context window. This is why Atlas can hold thousands of memories and still respond in seconds — it loads the needle, not the haystack.

The three companion stores

Memory is only the beginning. Atlas also maintains three companion stores that turn memory into action. Open items are the things you've committed to — extracted from chat, tagged by life bucket, tracked to completion. Decisions log what you chose, the context, the alternatives, and (later) the outcome — so you can revisit why you picked a path. The vault holds your documents — drafts, plans, articles, spreadsheets — with full version history and sharing controls. Together, memory + open items + decisions + vault give Atlas a complete, living picture of your life.

Cross-device continuity

Every memory, vault doc, open item, decision, and conversation syncs across your devices in real time. Atlas subscribes to live changes on the backend, backfills on window focus, and runs a 60-second safety interval — so the thread you started on your laptop this morning is waiting on your phone this afternoon, complete with its full history. A daily briefing is generated each morning from your open items and overdue tasks, so Atlas greets you with what matters instead of a blank screen.

🧑 In plain words
The analogy: A chatbot forgets you the moment you close the tab. Atlas is more like a lifelong assistant who's been with you for years — they know your kids' names, your current projects, the decision you made last month, and the document you were working on yesterday. And they're on every device you own, always in sync, never asking you to repeat yourself.
⚙️ Under the hood
The mechanism: Memories (WingmanMemory), vault docs (WingmanDocument + WingmanDocumentVersion), open items (WingmanOpenItem), and decisions (WingmanDecision) are each their own Base44 entity, RLS-locked to you. Auto-summarization runs via saveConversationSummary() every ~10 user messages; relevance scoring lives in wingmanContextTiers.js. Cross-device sync uses entity.subscribe() + a 60s interval + window-focus backfill. The daily briefing is generated by a scheduled workflow from your open items. Conversation messages are capped (40 msgs, 40K chars) to keep records manageable without losing recent context.
The five memory types
📌
Facts
who you are
⚙️
Preferences
how you like things
🎯
Goals
what you're chasing
📝
Summaries
what we discussed
📖
Journal entries
what happened
+ importance 1–5
+ tags · source date
written by
🧠
Auto-Summarizer
every 10 user messages
retrieved by
🔍
Relevance Scorer
tags + title + content match
fed into
⚙️
wingmanChat context
✅
Open Items
things to do
🎯
Decisions
what you chose & why
📚
Vault
your documents
Laptopmorning
Phoneafternoon
Tabletevening
All five memory types + the three stores sync across your devices in real time — pick up a conversation on your phone that you started on your laptop, it's already there.
07 · Trust

Privacy & trust: your data is yours

A personal assistant that remembers everything about you is also a serious privacy responsibility. Atlas is built privacy-first — not as an afterthought, but as a core design principle. Your data is yours: you control it, you can see it, you can delete it, and no one else can touch it.

Layer 1: Access control — your data is locked to you

Every record Atlas holds about you — every memory, every vault document, every conversation, every open item, every decision — is row-level secured. The technical rule is simple: read: { created_by_id: {{user.id}} } — only the user who created a record can read it. Even though every Atlas user's data lives in the same database tables, the database enforces that you only ever see your own. There is no "admin can see all user data" path for personal records — your memories are yours alone.

Passcode-locked conversations

Some conversations are more sensitive than others — a personal health matter, a financial decision, a difficult relationship. Atlas lets you passcode-lock any conversation so it's hidden behind a gate screen until you enter the code. The passcode is SHA-256 hashed before it's stored — the plaintext is never saved, not in the database, not in local storage. Even someone holding your unlocked phone can't read a locked conversation without the code. And the hash is verified client-side, so the server never sees the plaintext passcode either.

The private vault

Your vault documents — drafts, plans, articles, spreadsheets — are also RLS-locked to you. Each document has full version history (every save creates a snapshot you can roll back to) and granular sharing controls: you can grant another Atlas user view, comment, or edit access to a specific document, and you can revoke it at any time. Shared access is tracked in a WingmanDocumentAccess entity — you always know who can see what.

Layer 2: Your rights — see, edit, delete

Privacy isn't just about keeping others out — it's about giving you control. You can see every memory Atlas holds about you (they're listed in the sidebar and the memory panel). You can edit any memory to correct it. You can delete any memory, conversation, or vault document at any time. And if you delete your Atlas account, all your data is removed — the right to be forgotten is built in, not a support ticket.

What Atlas does NOT do

Atlas does not train AI models on your data. Your conversations and memories are not fed into a training pipeline. Atlas does not sell your data to third parties. Atlas does not show advertising — the subscription model means the user is the customer, not the product. Atlas does not share your data with other users — ever. Your memories, vault, and conversations are invisible to everyone but you.

Data retention

Conversations are capped at 40 messages and 40,000 characters per record to keep them manageable — older messages are summarized into long-term memories rather than kept verbatim forever. Memories are kept indefinitely but are always editable and deletable. Vault documents and their version history persist until you delete them. Archived conversations (cleared but restorable) are kept in local storage for up to 100 entries.

Encryption

All data in transit is protected by TLS. All data at rest is encrypted by the platform's managed storage layer. Passcodes are SHA-256 hashed. OAuth tokens (for Gmail, Calendar, Drive, Sheets) are stored by the platform's connector system and never exposed to other users or to the AI models.

Third-party AI providers

When Atlas thinks, it sends your message (plus the assembled context — personality, relevant memories, vault snippets) to an AI provider: OpenAI, Anthropic, or Google. Each provider has its own privacy policy governing how they handle API inputs. On the Free and Pro tiers, Atlas uses its own provider keys, so your prompts are sent under Atlas's API account. On the Enterprise tier, BYOK (Bring Your Own Key) lets your team supply its own provider keys — your prompts go directly to the provider under your own account, never touching Atlas's billing or infrastructure. This is the strongest privacy posture for organizations that need it.

Compliance readiness

Atlas is designed with GDPR and CCPA principles in mind: data minimization (we only store what's needed to be your assistant), transparency (you can see everything), right to access, right to rectification, right to erasure, and data portability (you can export your data in multiple formats). Formal compliance certifications will follow as the product scales.

🧑 In plain words
The analogy: Your data lives in a safe deposit box with a key only you hold. Other people's boxes are in the same vault, but yours stays locked to you. For your most private conversations, there's a second lock on top — a passcode only you know. You can open the box anytime to see what's inside, remove anything you don't want there, or take everything out and leave. And nobody — not Atlas, not other users, not advertisers — gets to look inside without your key.
⚙️ Under the hood
The mechanism: RLS via the rls block on each entity (read: { created_by_id: {{user.id}} }). Passcode locks: SHA-256 hash, client-side verification, plaintext never stored. Vault sharing: WingmanDocumentAccess entity with view/comment/edit levels. BYOK: user_provider_key field on the wingmanChat contract (Enterprise tier). No model training on user data. TLS in transit, platform-managed encryption at rest. GDPR/CCPA-aligned: access, rectification, erasure, portability all supported.
Youyour data
protected by
Layer 1 — Access control
🔐
Row-Level Security
Only you can read your records — your memories, vault, and conversations are invisible to every other user.
🔒
Passcode-Locked Chats
Sensitive conversations gated with a passcode — only a SHA-256 hash is stored, never the plaintext.
📚
Private Vault
Your documents have version history and granular sharing — view, comment, or edit grants you control.
plus
Layer 2 — Your rights
🗑️ Delete your data anytime
👁️ See everything stored
✏️ Edit any memory
🚫 No training on your data
📊 No advertising, ever
🔐 TLS in transit, encrypted at rest
and for teams
🗝️
BYOK (Enterprise)
Your team supplies its own AI keys — your prompts never touch our billing or infrastructure.
08 · Reach

Personal integrations: Atlas in your life

Atlas connects to your Google workspace through OAuth — Gmail, Calendar, Drive, and Sheets. Once authorized, it can read your inbox for commitments, look at your calendar to plan your day, save the documents it drafts to your Drive, and sync your tasks to Sheets. This is what turns Atlas from a chat window into an assistant that's actually in your life.

🧑 In plain words
The analogy: Without integrations, Atlas is a brilliant friend who can only talk. With them, Atlas can also read your mail, check your calendar, and file your paperwork — the difference between advice and action.
⚙️ Under the hood
The layer: OAuth connectors (shared mode for now; app-user mode on the Enterprise roadmap) with webhook support. Automations fire on real-time events — a new email, a calendar change — and on schedules like the daily morning briefing. Backend functions hold the API call logic; workflows hold the trigger-and-branch logic.
🔌
OAuth Connectors
✉️
Gmail
📅
Calendar
📁
Drive
📊
Sheets
Atlas can now
📧 Scan your inbox for commitments
📅 See your calendar & suggest the day
📁 Save documents to your Drive
📊 Sync tasks & notes to Sheets
09 · Commercialization

Subscription plans: how Atlas makes money

Atlas is commercialized on three tiers. Free runs on Google's free-tier AI to let people try it with zero friction. Pro unlocks the mid and premium brains, unlimited memory, all integrations, and cross-device sync — priced to cover the direct-API cost plus margin. Enterprise adds BYOK so teams bring their own AI keys, turning the subscription into pure software revenue insulated from high-usage customers.

🧑 In plain words
The analogy: Free is the sample at the deli counter. Pro is the full meal — priced to cover ingredients and the chef. Enterprise is the private dining room — you bring your own wine, we just charge for the room and service.
⚙️ Under the hood
The unit economics: Pro uses wingmanChat direct-API with prompt caching: a long chat that would cost ~$45/1M tokens on per-call credits costs ~$0.40 cached. Enterprise BYOK passes the user_provider_key straight to the provider, so the customer's token spend is on their own bill — our margin is fixed and safe regardless of how much they use.
Free
Get hooked$0
✓ Google free-tier AI✓ Limited memory✓ Basic chat✓ 1 device sync
Pro
Most popular$20/mo
✓ Mid + premium tiers✓ Unlimited memory & vault✓ All integrations✓ Cross-device sync✓ Passcode locks
Enterprise
For teamsCustom
✓ Everything in Pro✓ BYOK (your own AI keys)✓ Team shared memory✓ SSO + admin controls✓ SLA
The economics: Pro runs on direct-API wholesale rates + prompt caching (~90% off long chats). Enterprise BYOK means the customer's usage never touches our margin — the subscription is pure software revenue.
10 · In action

Examples: simple → complex

The same engine handles a one-line reminder and a full week-planning pipeline. The difference is which tier fires, how much of your memory is loaded, and how many calls chain together.

🧑 In plain words
Simple: "Remind me to call mom" → a quick note. Cheap tier, almost no context, one fast call, Atlas creates an open item. A tenth of a cent.
🧑 In plain words
Medium: "Draft a reply to Sarah about the project" → Atlas pulls your memories about Sarah and the project, uses the mid tier with caching, and drafts the email in your voice. About a fifth of a cent.
🧑 In plain words
Complex: "Plan my week from my calendar and inbox" → Atlas scans your Gmail for commitments, pulls your calendar, runs the full-tier brain to synthesize a week plan, creates open items for each commitment, and generates a Monday briefing. Three-plus calls, a few cents — all from one chat message.
Simple
"Remind me to call mom"→tier: cheap→Gemini Flash→1 call · ~$0.0001→→ open item created
Medium
"Draft a reply to Sarah about the project"→tier: mid + 2 memories→Sonnet (cached)→1 call · ~$0.002→→ email draft saved
Complex
"Plan my week from my calendar & inbox"→Gmail scan + Calendar fetch→tier: full · Opus→3+ calls · ~$0.03→→ weekly plan + open items + briefing
11 · Putting it together

A day with Atlas: stick-figure edition

🟢
6:30 AMMorning briefing

You wake up. Atlas has already scanned your inbox and calendar overnight and generated a morning briefing — your commitments, your open items, and what matters today.

overnight automation→inbox + calendar scan→briefing ready
🟡
8:00 AMA real conversation

You ask Atlas to help draft a tricky email to your landlord. Tier selector picks mid. Your memories about your housing situation are loaded. Atlas drafts it in your tone, cached.

tier: mid→memories loaded→Sonnet (cached)→draft saved
🔴
11:00 AMFree tier runs dry

A quick follow-up goes to Google (cheap tier), but the free tier just hit its per-minute limit — 429. Failover silently retries on OpenAI. You never see an error.

tier: cheap→Google 429→→ failover OpenAI→reply ✓
🟣
2:00 PMDeep planning

You ask Atlas to plan your week. Full tier: Opus, your full memory, your calendar, your inbox scan. It creates open items for each commitment and a weekly plan in your vault.

tier: full→Opus + integrations→open items created→vault doc saved
🟢
9:00 PMPrivate & cross-device

You open a passcode-locked conversation about something personal on your phone — the one you started on your laptop this morning. It's all there, instantly, and locked behind your code.

realtime sync→passcode gate→private thread ✓
End of the Atlas Document · v1

Atlas is the standalone, commercialized version of the same AI engine that powers NaviStrat's Sirius — isolated, re-skinned, and built for everyone. This document grows with the product.